Quorums, Leases and Changing the Membership
A majority is one point on a curve: any read set and write set that intersect will do, and the choice moves cost between reads and writes. A lease buys a leader a bounded window of authority, and changing the member set safely needs a protocol of its own.
What a learner can do afterwards
- Choose read and write quorum sizes for a stated read-heavy workload and justify them
- Say what a lease assumes about clocks and what breaks when that assumption fails
- Explain why adding and removing members in one step can split a cluster
1 · Read
A majority is one point on a curve. Any read set and write set that intersect will do, and the choice moves cost between reads and writes. For five nodes with a read quorum of 2, the write quorum must exceed 3, so 4 is the smallest that still overlaps every read.
A read-heavy shop picks read quorum 2 and write quorum 4 on five nodes. Every 2-node read meets every 4-node write in at least one node, so reads stay cheap while writes pay the price. Check the maths the same way every time: read plus write must exceed the node count.
A lease buys the leader a bounded window of authority without asking anyone, which quorums alone cannot give. It assumes clocks stay roughly in sync. When clocks skew, two leaders can believe themselves in charge at once.
Changing members needs care. Say A, B and C grow to A, B, C, D and E. Nodes switch at different moments. A and B can still count 2 of 3 as a majority and elect one leader. C, D and E can count 3 of 5 and elect another. No node sits in both groups, so two leaders rule at once. The safe way uses a joint stage first, where every decision needs a majority of the old set and of the new set. Then the cluster moves to the new set alone.
Change the member set in stages, never in one jump. At every stage, check that old and new majorities overlap.
Intersecting quorums trade read cost for write cost, leases rent authority on clock trust, and membership changes go stepwise.
Lesson, quiz and flashcard text written for this dataset and revised in the P25 source pass.
2 · Watch
En anglaisTake it off screen
Where it sits
Learn first
This opens up
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.