Redis rebalance - slot migration process
1. source node
cluster setslot {slot} importing {sourceNodeId}
2. target node
cluster setslot {slot} migrating {targetNodeId}
3. source node
cluster getkeysinslot {slot} {count}
4. source node
migrate {targetIp} {targetPort} "" 0 {timeout} keys {keys...}
5. repeat 3 and 4
repeat 3 and 4 until get nothing from getkeysinslot
6. all master nodes
cluster setslot {slot} node {targetNodeId}
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here