fencing-token · shipping

Fencing token

A fencing token identifies an ownership generation that a receiving service checks to reject operations from an obsolete owner.

Related Observatory article: Read on hesela.com

In one lock-service design, a holder can request a sequencer, an opaque byte string recording the lock name, the acquisition mode (exclusive or shared) and the lock generation number. A receiving server checks it against the lock service or against the most recent sequencer it has observed, and rejects stale requests. Merely issuing or attaching a token does not enforce exclusion. The 2006 design caps lock-delay at 1 minute for failed or unreachable holders; normal release makes the lock immediately available. This is not a current default or an I/O completion guarantee. [1]

In a worked example, a client holding token 33 pauses while its lease expires, a second client obtains token 34 and writes, and storage then rejects the delayed write carrying 33 because it has already processed a higher number. Stop-the-world garbage collection pauses of several minutes and a recorded network packet delay of 90 seconds show that such pauses outlast realistic leases. [3]

Relations

related
Minuet (SAN coordination), I/O fencing, SCSI persistent reservations, Shared-disk file system, Lock-delay

Advantages

  • Because the resource itself enforces ordering, safety does not depend on bounded process pauses, bounded network delay or accurate clocks at the lock holder. [3]

Limitations

  • The token source must be strictly monotonic across its own failures: a unique random value lacks ordering, a single-node counter can be lost and independent counters on several nodes drift apart, which points toward consensus. [3]
  • Protection covers only resources that check tokens, so services unable to validate sequencers remain exposed to stale operations. [1]
  • Rejecting obsolete requests does not by itself provide multi-resource transaction atomicity. Minuet keeps per-resource session state at the target and adds a separate transaction and log-recovery protocol. [4]

Citations

  1. Mike Burrows. The Chubby lock service for loosely-coupled distributed systems. OSDI 2006, sections 2.1 and 2.4. (accessed 2026-10-23)
  2. Martin Kleppmann. How to do distributed locking. Essay, 8 February 2016, sections on fencing and synchrony assumptions. (accessed 2026-10-23)
  3. Ermolinskiy, Moon, Chun and Shenker. Minuet: Rethinking Concurrency Control in Storage Area Networks. FAST 2009, sections 3.2 and 3.4.2. (accessed 2026-10-24)

Further reading

  1. Storage fencing: why a lost heartbeat does not stop writes (accessed 2026-10-11)
Sources & caveats
  • lock-service-osdi06 read 2026-10-23, section 2.4, for sequencer contents, server-side checking and the lock-delay bound.
  • fencing-essay read 2026-10-23, sections on fencing and timing assumptions, for the 33 and 34 token example, pause durations and token-source requirements.
  • A companion analysis on stale storage writes is listed but not used in prose.
  • Section 2.4 rechecked 2026-10-23: the delay follows loss of a holder, not ordinary release; the historical cap does not bound delayed I/O.

JSON: /data/terms/fencing-token.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Fencing token. Hesela. 2026-11-30. https://hesela.dev/terms/fencing-token/