Redis Redlock is the most widely deployed distributed lock implementation. Its limitations are well-documented; it is appropriate for use cases where the consequence of occasional split-brain is low (idempotent operations, best-effort deduplication). It is not appropriate for use cases where correctness is critical (financial transactions, database record updates).
Apache ZooKeeper provides ephemeral nodes and session-based locking. HBase uses ZooKeeper for region server coordination. Kafka used ZooKeeper for leader election and partition assignment until KRaft replaced it in Kafka 3.x.
etcd (part of Kubernetes) provides a similar abstraction to ZooKeeper: lease-based locks with session expiry. Kubernetes uses etcd for all cluster state, including leader election for the controller manager.
Google Chubby is the internal distributed lock service that inspired ZooKeeper. It provides a coarse-grained locking service built on Paxos. Chubby is used for leader election, name service, and distributed configuration in Google’s infrastructure.
DynamoDB conditional writes implement optimistic
locking at the storage layer. DynamoDB’s
ConditionExpression allows CAS-style updates: “write only
if this attribute equals this value.” This pattern is used in AWS Step
Functions and DynamoDB Streams to implement exactly-once processing
without an external lock service.
Concept: Distributed Lock
Thread: T9 (Consensus)
Core Idea: Mutual exclusion across machines requires an external arbitration service; the service’s failure modes (TTL expiry, network partition, crash) introduce split-brain risks that single-machine locks do not have.
Tradeoff: AT1 — Consistency/Availability: a distributed lock enforces consistency (one writer) at the cost of availability (workers block when the lock service is unavailable).
Failure Mode: FM12 — Split-Brain: a paused process resumes after TTL expiry while another process has acquired the lock; both believe they are the sole holder.
Signal: When two instances of a background worker produce conflicting results for the same job, or a database record contains partially applied updates from two concurrent writers.
Maps to: AT1, AT9, FM5, FM12