Reference · Cheat sheet

Sentinel & Cluster

Automatic failover, and sharding by hash slot. Print it, pin it.

From lesson 0007See also glossary

Sentinel — HA for one primary

Cluster — HA + horizontal sharding

RedirectMeaningClient action
-MOVEDslot permanently elsewhereupdate slot map, retry (and future keys)
-ASKslot migrating nowASKING + retry this query only
Gotchas

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.

Which?

← lesson 0007 · Sources: Sentinel · Scaling · Cluster spec