How it works
Leaderless replication removes the ordering node altogether. A client, or a coordinator acting for it, sends each write to several replicas and reads from several. Cassandra and Riak work this way. The mechanics of N, W, R, quorum overlap, sibling versions, and repair are in the Key-Value Store chapter, so this lesson covers where the model fits.
Its main gift is the absence of failover. With N = 3, W = 2, R = 2, one replica can die and nobody gets promoted: requests carry on with the other two, and the returning node is repaired later. Waiting for the fastest two of three also hides one slow node from latency. What you give up is a single order. Overlapping quorums make fresh reads likely, but concurrent writes to one key still need a rule, and last-write-wins discards data. Multi-row transactions and uniqueness checks do not come naturally either.
To choose, ask what should happen if two writes touch the same item at once. If one must be refused, use a single leader: seat reservations, ledgers, and most business data belong here, and it is the right default because transactions and constraints work as expected. If writers must be in separate places and conflicts can be merged or avoided, use multiple leaders: an offline notes app, or profiles edited from two regions with a home region for each user. If keys rarely collide and writes must continue through node loss, consider leaderless: sensor readings keyed by device and timestamp cannot conflict, and a lost node must not pause ingestion.
A delivery company needs storage for GPS pings from 200,000 vehicles, each sending one every 5 seconds, and for its customer billing ledger. A team proposes one replication model for both to keep operations simple. What would you recommend?
Two models, if you can afford to run them. Pings arrive at 40,000 per second, each with a unique key of vehicle and timestamp, so conflicts cannot occur and an occasional lost ping is tolerable: a leaderless store with W = 1 or W = 2 fits. The ledger needs one order, constraints, and no lost acknowledged writes, so it belongs on a single leader with a semi-synchronous follower. For a small team, sharded single-leader for both is a defensible way to avoid running two systems until pings outgrow it.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Quorums remove failover: a node can die without anyone being promoted.
- Overlapping quorums make fresh reads likely but do not order concurrent writes.
- Start with one leader, and move only when writes must land in many places or never pause.