What Is a Distributed Lock?
A distributed lock provides mutual exclusion across separate processes or hosts, typically backed by a consensus store or coordination service. A process acquires the lock, performs its critical section, and releases it, while others wait. Robust implementations add lease timeouts and fencing tokens so a stalled holder cannot corrupt state.
Why it matters
Many workflows, such as running a migration once or applying infrastructure, must not execute concurrently across runners. A distributed lock enforces single execution even when the actors live on different machines.
Related guides
What Is a Leader Election Protocol?A leader election protocol lets a group of replicas agree on a single active leader so that only one instance…
What Is State File Locking?State file locking prevents two infrastructure-as-code runs from modifying the same state at once, avoiding c…
What Is Idempotency Key Handling?Idempotency key handling uses a client-supplied unique token to ensure a retried request is processed at most…