Distributed Lock
In plain terms
A lock coordinating access to a resource across machines.
Going deeper
A distributed lock ensures only one node performs a critical operation at a time across a cluster, preventing conflicts. It extends mutual exclusion across machines.
Under the hood
Hard to do correctly, needs lease timeouts and fencing tokens; tools like Redis (Redlock) and ZooKeeper provide them.
Examples
Leader election, Redis Redlock, ZooKeeper, preventing duplicate jobs, coordination.
Think of it like...
Like a single shared key passed between offices so only one acts at a time.