-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c730e9e
commit 21f924c
Showing
5 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
GOPATH := $(CURDIR)/../vendor:$(GOPATH) | ||
|
||
all: build | ||
|
||
build: | ||
go build | ||
|
||
clean: | ||
go clean | ||
|
||
check: | ||
@go list -f '{{join .Deps "\n"}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}} {{.Dir}}{{end}}' | column -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# roshi-walker | ||
|
||
roshi-walker walks the keyspace of a Roshi farm in semirandom order (random | ||
order of Redis instances; Redis [SCAN][scan] command on each instance) and a | ||
user-defined rate. It makes Select request for each key, using the | ||
[SendAllReadAll read strategy][send-all-read-all] in order to perform complete | ||
read repair. | ||
|
||
[scan]: http://redis.io/commands/scan | ||
[send-all-read-all]: https://github.com/soundcloud/roshi/tree/master/farm#read-strategies | ||
|
||
## Getting and building | ||
|
||
roshi-walker uses vendored dependencies and a "blessed build" process to ensure | ||
stability over time. Users should get and build roshi-walker by cloning this | ||
repository and running `make` in the roshi-walker subdirectory. A working Go | ||
toolchain is assumed. | ||
|
||
git clone [email protected]:soundcloud/roshi | ||
cd roshi/roshi-walker | ||
make | ||
|
||
It's also possible to get roshi-walker via `go get`, and/or build it with a | ||
simple `go build`, with the caveat that it will use your normal GOPATH to | ||
resolve dependencies, and therefore will enforce no constraints on dependency | ||
versions, which could introduce bugs or strange behavior. | ||
|
||
## Usage | ||
|
||
roshi-walker is designed to be used in two situations. | ||
|
||
### Walk forever | ||
|
||
One or more roshi-walker instances can be started for a given Roshi farm, set | ||
to walk at a moderate rate and run forever. That will ensure that all keys are | ||
made consistent, within some upper time bound. That in turn improves data | ||
durability, especially if normal reads are non-uniform or low volume. | ||
|
||
It's recommended to run a few roshi-walker processes in this mode on every | ||
Roshi farm. Test against your infrastructure to determine an appropriate rate. | ||
|
||
### Walk once | ||
|
||
roshi-walker supports a **-once** flag, which will walk the entire keyspace | ||
once and exit. This is useful if a Redis instance has crashed and come back | ||
online with no data. In this situation, while the farm still returns correct | ||
data, it is less resilient to further node failure. After the walk is | ||
complete, the empty instance will be repopulated with relevant data via read | ||
repair, and the resiliency of the farm is returned to normal levels. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters