Redis Tutorials & Guides
In-depth articles to help you master Redis and key-value databases.
Redis Key Design Best Practices: Prefixes, Versioning & TTL
Learn how to design Redis keys like a pro. Covers naming conventions, prefix strategies, key versioning, TTL management, and common pitfalls in production.
Redis Cache Penetration, Breakdown & Avalanche: Strategies and Commands
Understand the three deadly cache problems — penetration, breakdown, and avalanche. Learn practical Redis commands and strategies to defend against each.
Redis Rate Limiting: INCR, Sliding Window, Leaky Bucket & Token Bucket
Implement rate limiting in Redis using four different algorithms. Compare fixed window, sliding window, leaky bucket, and token bucket with real commands.
Redis Distributed Lock: SET NX PX Done Right + Retry Strategies
Master the correct way to implement distributed locks in Redis with SET NX PX. Covers common mistakes, unlock safety, retry with backoff, and Redlock.
Redis Leaderboard with ZSET: Ranking, Pagination, Updates & Deletion
Build a production-ready leaderboard with Redis Sorted Sets. Covers real-time ranking, score updates, pagination, tie-breaking, and member removal.
Redis Delayed Queue: ZSET + Timestamp Pattern
Build a reliable delayed queue with Redis Sorted Sets and timestamps. Covers scheduling, polling, atomic consumption, retry logic, and production pitfalls.
Redis Message Queue: LIST vs STREAM — Differences and Use Cases
Compare Redis LIST and STREAM for message queue implementations. Understand blocking pops, consumer groups, acknowledgment, and when to use each.
Redis Hash for Object Modeling: When and How to Use HSET
Learn how to model objects with Redis Hashes. Covers HSET patterns, partial updates, memory optimization, nested data strategies, and Hash vs String trade-offs.
Redis Hot Key & Big Key: Detection, Risks, and Solutions
Learn how to detect and handle hot keys and big keys in Redis. Covers monitoring tools, risk analysis, splitting strategies, and production best practices.
Redis SCAN vs KEYS: Safe Key Iteration in Production
Learn why KEYS * is dangerous in production and how to use SCAN, HSCAN, SSCAN, and ZSCAN for safe, incremental key iteration with pattern matching.
Redis Data Types: The Ultimate Guide for Beginners
Master the 5 core Redis data types: Strings, Lists, Sets, Hashes, and Sorted Sets. Learn syntax, use cases, and complex examples.