Skip to content

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}
Small world. Big idea!
  • Welcome to visit the knowledge base of SRE and DevOps!
  • License under CC BY-NC 4.0
  • No personal information is collected
  • Made with Material for MkDocs and generative AI tools
  • Copyright issue feedback, replace # with @
  • Get latest SRE news and discuss on Discord Channel