Practice this topic in a realistic system design interview
A distributed lock lets one client act on a shared resource while other clients wait, retry, or skip the work.
A local mutex works because the operating system controls the threads and memory. A distributed lock does not get those simple guarantees. It has to deal with crashes, network partitions, long process pauses, and clocks that disagree.
Distributed locks are used for:
The lock store decides who currently holds the lock. Everyone else must respect that decision.
This chapter explains how distributed locks work, where they fail, and how to use them without trusting them too much.