Request Routing — Finding the Shard, Surviving a Move

Request Routing — Finding the Shard, Surviving a Move A sequence diagram generated by Archify. read or write key K which node owns shard 5? routing must know keys and shards Node A — authoritative map forward to the owning node stream the shard 5 data transfer takes time take ownership of shard 5 notify: shard 5 → Node B subscribers keep routing up to date request still in flight to the old owner forward or reject during cutover reply from the new owner Route a request Shard 5 moves to Node B Cutover and in-flight requests Client · Sequence participant Client Routing Tier · shard-aware balancer · Sequence participant Routing Tier shard-aware balancer ZooKeeper / etcd · authoritative shard map · Sequence participant ZooKeeper / etcd authoritative shard map Node A · owner of shard 5 · Sequence participant Node A owner of shard 5 Node B · new owner of shard 5 · Sequence participant Node B new owner of shard 5 Legend main request return async trace message