32 Redis interview questions with answers
32 Redis interview questions with detailed answers, sorted from basic to advanced. Free to practice, with progress saved automatically.
All Redis interview questions
What is Redis and why is it extremely fast?
Redis data types: when should you use String, Hash, List, Set, and Sorted Set?
Redis persistence: what is the difference between RDB and AOF, and when should you use each?
What is Redis Pub/Sub? How does it work and what are its limitations compared to Kafka?
Transactions in Redis: how do MULTI/EXEC and pipeline differ?
Lua scripting in Redis: why use it and what are the typical use cases?
Key expiration and eviction policies in Redis: what are the policies and when should you use each?
Compare Redis and Memcached: when should you use each?
What are the most common production use cases for Redis?
Key naming conventions in Redis: best practices for organizing namespaces?
How does Redis Cluster work? Explain sharding, slot allocation, and resharding.
What are Redis Streams? How do they compare to Pub/Sub and Kafka, and when should you use them?
Memory optimization in Redis: what techniques reduce memory footprint?
What is a cache stampede (thundering herd)? How do you prevent it in Redis?
Redis in production: what are the most important best practices to follow?
What is Redis HyperLogLog? When should you use it instead of a Set?
What are Redis Bitmaps? What real-world applications are they best suited for?
Redis Sorted Set: how do you implement a real-time leaderboard and a sliding window rate limiter?
When should you use Redis Hash vs String to store an object? What are the memory and performance trade-offs?
Caching strategies: Cache-Aside, Write-Through, Write-Behind — when should you use each?
Distributed locking with Redis: how do you implement it? What problem does the Redlock algorithm solve?
Session storage with Redis: why is Redis a better choice than a database for sessions?
Cache invalidation strategies: how do you handle data freshness in Redis?
What is Redis Sentinel? How does it provide High Availability?
Redis Cluster: hash slots, MOVED/ASK redirects, and how sharding works?
Redis eviction policies: LRU, LFU, allkeys vs volatile — when should you use each policy?
What is Redis Pipelining? When does it significantly improve performance?
What is a cache stampede (thundering herd) and how do you handle it?
When should you NOT use Redis?
What security features does Redis provide?
Redis lives in RAM — is data lost on a power cut? Should Redis be the primary database?
What is a hot key in Redis Cluster? How do you detect and fix it?