Leadership Epochs and Fencing Tokens

Order grants of authority and ensure the protected component can reject work authorized by an obsolete leader.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A lease or election result needs enforcement beyond the leader
  2. Store the decision at the resource boundary

A lease or election result needs enforcement beyond the leader

A process may pause while another obtains leadership, then resume with local state describing the old grant. A protected service can insist that each operation carry a monotonically increasing epoch. Once the service has accepted an epoch \(7\), a request carrying epoch \(6\) is stale under that rule, regardless of which worker sends it.

Store the decision at the resource boundary

The comparison and the protected effect must agree under concurrency and recovery. An issuer also needs a consistent way to allocate epochs and define who can obtain them. Epochs do not themselves guarantee that a particular operation is applied only once. Timeout suspicion explains why the older leader may be alive. Idempotency keys handle duplicate operations within a valid authority period.[1]

References

  1. MIT 6.5840, Distributed Systems: Course Readings ↩