Reference · Cheat sheet
Automatic failover, and sharding by hash slot. Print it, pin it.
quorum Sentinels agree → objectively down.quorum only detects; a majority
of Sentinels must elect a leader to actually fail over → minority partition can't promote.HASH_SLOT = CRC16(key) mod 16384.| Redirect | Meaning | Client action |
|---|---|---|
-MOVED | slot permanently elsewhere | update slot map, retry (and future keys) |
-ASK | slot migrating now | ASKING + retry this query only |
Multi-key across slots → CROSSSLOT error. Force one slot with a
hash tag: only the substring in { } is hashed, so {u1}:a
and {u1}:b share a slot.
Not strongly consistent: async replication per shard → can lose acked writes. A
primary that can't reach the majority stops accepting writes after node-timeout.
← lesson 0007 · Sources: Sentinel · Scaling · Cluster spec