How do I redistribute these 67mm keys across all nodes?

42 views
Skip to first unread message

rathboma

unread,
Oct 6, 2017, 3:44:50 PM10/6/17
to Redis DB
Hey all,

I have a production 3 node cluster with 250mm keys, and have been trying to build a test cluster with about 1/3 of the total data (so I can use it for testing).

What I tried to do was grab a rdb file from one of the production nodes, and use it as the seed for one of the test-cluster nodes, thinking I could redistribute the keys after that.

What I ended up with was three nodes with even slots, but all the data still on a single node. calling redis-trib rebalance or redis-trib reshard don't really seem to be able to help me rebalance the keys.

What can I do better? Does anyone have an idea how to get this to work?


Tuco

unread,
Oct 7, 2017, 12:21:07 AM10/7/17
to Redis DB
one of the ways would be the following

1) create the empty cluster with 3 master nodes.(using cluster meet command)
2) assign all the slots to a single node in a cluster (using cluster addslots command )
3) stop the node having all the slots, put the rdb from the production in the location of its rdb.
4) start the node having all the slots, it should have now both the data and the slots.
5) reshard using redis-trib.
Reply all
Reply to author
Forward
0 new messages