System Design
18. Advanced Distributed ArchitectureAnimated
Distributed Lock Managers
Services granting locks across nodes.
The idea
Lock managers use consensus and leases so locks survive failures.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
A asks for the lock with a time-limited lease.
- step:
- 1/7
- from:
- Client A
- to:
- Lock service
1/7
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Request a lock
- 2The manager grants it with a lease and token
- 3Holder works
- 4Release or expire
Where it is used
Exclusive access.
Watch out for
Fencing tokens are needed to stop stale holders.