Distributed Locks with Redis in Spring Boot
How to implement distributed locks using SET NX PX and Lua scripts, using Redisson with watchdog, writing tests with Testcontainers, and avoiding common pitfalls.
How to implement distributed locks using SET NX PX and Lua scripts, using Redisson with watchdog, writing tests with Testcontainers, and avoiding common pitfalls.
Use Bloom filter on Redis (via Redisson) to block requests querying non-existent keys before they penetrate the cache and hit the database.
How to identify hot keys and big keys in Redis using redis-cli, MEMORY USAGE, OBJECT FREQ, and how to handle them by key sharding, UNLINK, local cache, and key replication.
How to apply cache-aside pattern with Redis in Spring Boot, delete cache after commit, handle race conditions, and test with Testcontainers.
Understand how Redis writes data to disk using RDB and AOF, configure each mode, and identify scenarios where data loss still occurs even with persistence enabled.
Use Redis Streams and consumer groups in Spring Boot 3 to process at-least-once events with manual ACK, retry pending messages, and dead-letter streams.
Comparing three popular caching strategies with Redis and Spring Boot 3: implementation, pros and cons, common errors, and when to use each one.
Understand the Redlock algorithm, implement it yourself using Jedis, write tests with Testcontainers, and learn why Martin Kleppmann believes it is not safe.
Hold seats temporarily in a ticketing system using Redis SET NX PX: atomic locking, auto-expiry, safe release with Lua, with Spring Boot 3 examples and tests.
Use Redis Geo (GEOADD, GEOSEARCH) and Spring Data Redis to store coordinates, find nearby stores, and calculate distances.
Use Redis sorted set with Spring Boot 3 to build leaderboards, priority/delay queues and sliding window rate limiters. Includes working code and tests.
Compare Redis Pub/Sub and Redis Streams, with specific Java code examples to help you choose the right messaging model for your system.
Learn how to configure TTL, Redis eviction mechanisms, and how to prevent cache stampede when multiple requests miss the cache simultaneously.
A guide to building a rate limiter with Redis and Lua scripts, applied to Spring Boot APIs, with testing examples using Testcontainers.
A comprehensive guide to Redis's main data types (String, Hash, List, Set, Sorted Set) with Java examples and real-world use cases.