System Design · Senior · Question 71 of 75
Why does a distributed lock need fencing tokens?
- ✓Correct answer: A client may pause (GC, network) after its lock expires and still write; a monotonically increasing token lets storage reject stale writers
- 2To encrypt the lock
- 3Fencing tokens make locks faster
Explanation
Lock expiry alone doesn't guarantee mutual exclusion in the presence of pauses and clock issues.