Skip to content
All concepts

Concept

Fencing token

A fencing token is a number that goes up every time a lock or lease is granted. Every write carries the token, and the storage refuses any write whose token is lower than the highest it has seen. That stops a holder that paused and woke up late from overwriting the work of whoever took over.

Watch the old worker wake up and send its write: the storage refuses it because the token is out of date. A live step from the lesson Split brain & fencing tokens (Consensus & replication). Timings and counts are illustrative.

Where you'll see it