Implementing Distributed Locks with Redis

Single-System Locks In single-system architectures, locks like ReentrantLock are effective for controlling concurrent access within a single JVM. However, when multiple instances of an application are running behind a load balancer, these locks become ineffective as each instance operates independently. Testing with JMeter to simulate high co ...

Posted on Tue, 07 Jul 2026 16:32:24 +0000 by Stingus

Configuring RabbitMQ Dead Letter Exchanges, Redis Seckill with Redisson, Elasticsearch Logging, and Redis-Driven Features

RabbitMQ Setup with Dead Letter Handling To handle timed‑order expiry, a RabbitMQ infrastructure consisting of a direct exchange, a durable queue, and a dedicated dead‑letter exchange (DLX) is defined. The queue is declared with arguments that route expired (unconsumed) messages to the DLX after a configured TTL. Below is the Spring configurati ...

Posted on Mon, 15 Jun 2026 16:42:04 +0000 by emfung

Distributed Lock Implementations in Java with Redis and ZooKeeper

Redis-Based Distributed Locking with Redisson Distributed systems often require mechanisms to ensure that only one process or thread can access a shared resource at a time across different service instances. Redis, a popular in-memory data store, can be effectively leveraged for this purpose, particularly through libraries like Redisson. Maven ...

Posted on Sun, 07 Jun 2026 18:00:34 +0000 by Pilly

Redisson: A Comprehensive Guide to Redis-Based In-Memory Data Grid

Overview Redisson is an in-memory data grid built on top of Redis that provides distributed Java objects and services. Beyond standard Redis operations, it offers a rich set of distributed structures including Queue, Lock, AtomicLong, CountDownLatch, Publish/Subscribe, and ExecutorService. Redisson abstracts away the complexities of Redis, allo ...

Posted on Wed, 03 Jun 2026 17:48:26 +0000 by we4freelance

Redis Distributed Lock Failures During Master-Slave Failover and Mitigation Strategies

Redis Lock Vulnearbility Analysis Asynchronous replication creates critical vulnerabilities during failover scenarios: Timeline: 1. Client A acquires lock on master (SET resource_id unique_val NX EX 30) 2. Lock replication to replica delayed (ms to hundreds of ms) 3. Master fails, sentinel triggers failover (3-10 seconds) 4. Replica becomes new ...

Posted on Mon, 25 May 2026 19:45:58 +0000 by 182x

Understanding Bloom Filters: Efficient Probabilistic Set Membership

Solving Cache Penetration Consider a typical product lookup service: public Product getProductById(Long id) { Product product = cache.get(id); if (product != null) { return product; } product = database.query(id); if (product != null) { cache.put(id, product); } return product; } If a product ID ...

Posted on Sun, 24 May 2026 19:43:02 +0000 by facets