A process mutex cannot coordinate machines#
Only one worker should generate today's billing report. Worker A asks a lock service for report:2026-08-14; B is denied or waits. Ownership needs identity, acquisition, release, expiration, and behavior when the owner crashes.
A permanent lock can outlive a crashed owner forever, so distributed locks commonly use leases. Yet a lock is not the automatic answer: a database transaction, row lock, unique constraint, single partition owner, idempotent operation, or serialized queue can enforce the invariant more simply.
- Assuming a distributed lock guarantees one actor forever.
- Releasing a lock without verifying owner identity.
- Using a lock where the protected store can enforce the invariant.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- In Search of an Understandable Consensus AlgorithmUSENIX / Stanford
- Reliability design patternsMicrosoft Azure Architecture Center