Skip to content

Handle more complex cluster topologies - #78

Open
jgaskins wants to merge 7 commits into
masterfrom
test-cluster-topology
Open

Handle more complex cluster topologies#78
jgaskins wants to merge 7 commits into
masterfrom
test-cluster-topology

Conversation

@jgaskins

@jgaskins jgaskins commented Aug 7, 2026

Copy link
Copy Markdown
Owner

The current implementation of Redis::Cluster assumes that a shard serves only a single range of hash slots. It also assumes that it's always a range, not a single slot. On a pristine cluster, this is generally true because it'll divide the hash slots among all the cluster primaries during initialization. But over time, as key slots are shuffled between shards to mitigate hot keys and rebalance memory consumption, you end up with a hash-slot distribution that isn't always quite so clean.

This PR attempts to address this by allowing for multiple hash slots per node that are either a single hash slot, a range of slots, or a migration marker.

Fixes #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster topology parsing only keeps a node's first slot range

1 participant