Skip to content
Tagged articles

fencing token

3 articles · Page 1 of 1
IT Services Circle
IT Services Circle
Oct 5, 2026 · Databases

Redis Distributed Locks: 7 Critical Pitfalls and How to Avoid Them

This article details seven common pitfalls in Redis distributed locking, covering atomic acquisition, ownership verification, lease expiration, watchdog limitations, replication risks, Redlock assumptions, and the need for fencing tokens, with code examples and comparisons to ZooKeeper and etcd.

Distributed LocksMartin KleppmannRedis
0 likes · 32 min read
Redis Distributed Locks: 7 Critical Pitfalls and How to Avoid Them
Programmer XiaoFu
Programmer XiaoFu
Mar 3, 2026 · Backend Development

Why Can a Redis Lock Be Stealed by Another Thread Before Its TTL Expires?

In high‑concurrency Java services, a Redis lock that appears to have a valid TTL can still be taken by another thread when a long Stop‑The‑World pause freezes the JVM clock, causing the lock to expire on Redis while the original holder remains paused, leading to data races.

Full GCJVMOptimistic Lock
0 likes · 8 min read
Why Can a Redis Lock Be Stealed by Another Thread Before Its TTL Expires?
dbaplus Community
dbaplus Community
Mar 16, 2017 · Backend Development

Redlock vs Antirez: A Deep Dive into Distributed Lock Safety and Fencing Tokens

This article revisits the Redlock debate by examining Antirez's rebuttal to Martin Kleppmann, analyzing Hacker News discussions, comparing Redis, ZooKeeper, and Chubby lock implementations, and exploring timing assumptions, clock skew, and fencing token mechanisms to assess distributed lock safety.

ChubbyDistributed LocksRedlock
0 likes · 32 min read
Redlock vs Antirez: A Deep Dive into Distributed Lock Safety and Fencing Tokens