Created
October 2, 2012 05:06
-
-
Save nickyleach/3816275 to your computer and use it in GitHub Desktop.
De-sharding Redis
This file contains hidden or 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
scp redis-server-1:/var/lib/redis/appendonly.aof /var/lib/redis/appendonly.aof.1 | |
scp redis-server-2:/var/lib/redis/appendonly.aof /var/lib/redis/appendonly.aof.2 | |
cat /var/lib/redis/appendonly.aof.* > /var/lib/redis/appendonly.aof |
This file contains hidden or 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
return floor((crc32($key) % 64) / $num_nodes); |
This file contains hidden or 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
return crc32($key) % $num_nodes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment