CLUSTER-...ATESLOTS(3valkey)

πŸ“¦ version 9.0.6, in fedora 44

πŸ’– CLUSTER-...ATESLOTS(3valkey) πŸ’–

okay bestie, welcome to the Valkey Command Manual entry for CLUSTER MIGRATESLOTS β€” aka cluster-migrateslots (3valkey). this is the one that yeets your slots to other nodes, no cap. πŸ¦‹


✨ NAME ✨

cluster-migrateslots β€” Migrate the given slots from this node to the specified nodes.


πŸŽ€ SYNOPSIS πŸŽ€

CLUSTER MIGRATESLOTS SLOTSRANGE start-slot end-slot [start-slot end-slot ...] NODE node-id [SLOTSRANGE start-slot end-slot [start-slot end-slot ...] NODE node-id ...]

🌸 DESCRIPTION 🌸

so like, CLUSTER MIGRATESLOTS kicks off an asynchronous migration of the slot range(s) you point at, sending them to the target node you name, using valkey-atomic-slot-migration(7). it's giving "move out, slots, we're going to a new home" energy. πŸ’…

this command is super flexible: you can do many slot ranges in one migration by repeating start and end slot pairs inside the SLOTSRANGE block. and you can do multiple migrations in one command by repeating whole SLOTSRANGE and NODE blocks. for example:

CLUSTER MIGRATESLOTS SLOTSRANGE 0 9 20 29 NODE <target A> SLOTSRANGE 10 19 NODE <target B>

that right there initiates two slot migration jobs: one to <target A> with 20 slots (0-9 inclusive, 20-29 inclusive) and another to <target B> with 10 slots (10-19 inclusive). periodt. πŸ’–

if all slot migrations are successfully initiated, you get OK back. if not, you get an error message and no slot migrations are initiated β€” like, none, zero, zilch. 😭

wanna check on the progress of the slot migration? use the valkey-cluster-getslotmigrations(7) CLUSTER GETSLOTMIGRATIONS command. it's the vibe check for your migrations. πŸ‘‘


⚑ COMPLEXITY ⚑

O(N) where N is the total number of the slots between all start slot and end slot arguments.


πŸ‘‘ ACL CATEGORIES πŸ‘‘

  • @admin
  • @dangerous
  • @slow

πŸ•°οΈ HISTORY πŸ•°οΈ

  • Available since: 9.0.0

πŸ”— SEE ALSO πŸ”—


and that's the whole page, bestie! this was 9.0.0 from 2025-10-21, the CLUSTER-...ATESLOTS(3valkey) manual. go slay those slot migrations! πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from