Redis Interview Questions
Core data types, RDB & AOF persistence, key expiration & eviction, sorted sets, pub/sub, pipelining, transactions, Cluster & Sentinel, distributed locks, streams and caching patterns.
61 questions
Popular Searches
1. What is Redis and what makes it different from a traditional relational database?
easyFundamentals 6 mins2. What are the core data types in Redis and when do you use each?
mediumData Structures 7 mins3. How does Redis achieve its high performance as an in-memory store?
hardPerformance 7 mins4. What is the difference between Redis persistence with RDB and AOF?
mediumPersistence 7 mins5. How does Redis handle key expiration and TTL?
mediumExpiration 6 mins6. What is the difference between Redis as a cache and as a primary datastore?
mediumArchitecture 7 mins7. What are the common cache eviction policies in Redis (LRU, LFU, TTL)?
mediumCaching 7 mins8. What is a Redis hash and how does it differ from storing a serialized object?
mediumData Structures 7 mins9. What are Redis sorted sets and what problems do they solve?
mediumData Structures 7 mins10. How does pub/sub messaging work in Redis?
mediumMessaging 6 mins11. What is Redis pipelining and how does it improve throughput?
mediumPerformance 6 mins12. What are Redis transactions and how do MULTI/EXEC work?
mediumTransactions 6 mins13. What is the difference between Redis replication and Redis Cluster?
mediumScaling & Availability 7 mins14. How does Redis Sentinel provide high availability?
mediumScaling & Availability 7 mins15. How does sharding work in Redis Cluster with hash slots?
hardScaling & Availability 8 mins16. What is a cache stampede (thundering herd) and how do you prevent it in Redis?
hardCaching Patterns 8 mins17. What is the difference between write-through, write-behind, and cache-aside patterns?
mediumCaching Patterns 7 mins18. How do you implement a distributed lock with Redis?
hardConcurrency 8 mins19. What are Redis streams and how do they compare to pub/sub?
mediumMessaging 7 mins20. What is the difference between SET with NX and a plain SET in Redis?
easyCommands 6 mins21. How does Redis handle atomic operations like INCR?
mediumConcurrency 7 mins22. What is a Redis bitmap and what use cases does it enable?
mediumData Structures 6 mins23. What is HyperLogLog in Redis and when would you use it?
mediumProbabilistic Data Structures 6 mins24. How does Redis handle memory management and the maxmemory setting?
hardOperations 7 mins25. What is the difference between Redis SCAN and KEYS and why does it matter?
mediumCommands & Operations 6 mins26. How do Lua scripts work in Redis and why are they atomic?
mediumScripting 7 mins27. What is cache invalidation and what strategies work with Redis?
mediumCaching Patterns 7 mins28. What are the trade-offs of using Redis for session storage?
mediumCaching & State 7 mins29. How does Redis handle blocking operations like BLPOP?
mediumData Structures 7 mins30. What is the difference between Redis and Memcached?
mediumCaching Systems 7 mins31. A Redis instance shows intermittent latency spikes in production — how do you diagnose the cause?
hardPerformance & Troubleshooting 9 mins32. Redis reports far more resident memory than stored data — how do you interpret and fix fragmentation?
hardMemory Management 9 mins33. How do you find and fix big keys and hot keys in a Redis deployment?
hardPerformance & Troubleshooting 9 mins34. How does Redis client-side caching with CLIENT TRACKING work, and when is it worth it?
hardCaching Patterns 10 mins35. How do you secure a production Redis deployment beyond setting a password?
hardSecurity 10 mins36. How does live resharding work in Redis Cluster, and what can go wrong during slot migration?
hardClustering 10 mins37. Why can a Redis failover lose acknowledged writes, and how do you reduce that risk?
hardReplication & Availability 10 mins38. What are Redis Functions, how do they differ from EVAL scripts, and what are the rules for writing them safely?
hardServer-Side Scripting 10 mins39. How would you upgrade or migrate a live Redis deployment without downtime or data loss?
hardOperations 10 mins40. How would you implement distributed rate limiting with Redis, and which algorithm would you choose?
hardApplied Patterns 10 mins41. Why can a Redis background save cause a memory spike and a latency pause, and how do you control it?
hardPersistence & Operations 10 mins42. Can you build an event pipeline on Redis keyspace notifications, and what are their delivery guarantees?
hardEvents & Messaging 10 mins43. Application latency to Redis is poor although the server reports fast commands — how do you tune the client?
hardClient Configuration 11 mins44. How should a client library route commands in Redis Cluster, and what happens during MOVED, ASK and failover?
hardClustering 11 mins45. What happens between starting a Redis process and it serving traffic, and how do you make restarts safe?
hardPersistence & Operations 10 mins46. Which Redis metrics would you alert on, and how do you choose thresholds without guessing?
mediumMonitoring & Observability 10 mins47. A Lua script is running long and the whole instance is unresponsive — what is happening and what do you do?
hardScripting & Concurrency 11 mins48. A stream consumer crashes mid-processing — how do its pending messages get reclaimed and eventually retired?
hardEvents & Messaging 11 mins49. Can a read from a Redis replica return a key that has already expired, and how do you reason about staleness?
hardReplication & Consistency 10 mins50. Would you separate tenants or environments using Redis databases, key prefixes, or separate instances?
mediumData Modelling 10 mins51. How do you test code that depends on Redis, including its failure behaviour?
mediumTesting & Quality 10 mins52. Two Redis instances hold the same logical data but one uses far more memory — how do object encodings explain that?
hardMemory & Data Structures 11 mins53. Redis is described as single-threaded — what exactly is single-threaded, and what does that mean for how you design commands?
mediumArchitecture & Internals 8 mins54. Which Redis commands are dangerous to run against a production instance, and how do you stop them being run?
mediumOperations & Safety 8 mins55. What guarantees does SCAN actually give you, and how do you iterate a large keyspace safely?
hardKeyspace & Data Access 9 mins56. What actually happens the moment a Redis instance reaches maxmemory?
hardMemory & Eviction 9 mins57. What durability does an AOF actually give you, and how do the fsync policies and rewrites change that?
hardPersistence & Durability 10 mins58. When is it safe to read from a Redis replica, and how do you deal with the staleness?
hardReplication & Consistency 9 mins59. Why does a multi-key command fail with CROSSSLOT in Redis Cluster, and how do hash tags fix it?
hardRedis Cluster 9 mins60. Why is a naive SET NX lock unsafe, and what does a fencing token actually protect?
hardDistributed Coordination 10 mins61. How do you choose between pipelining, MULTI/EXEC and a Lua script for a multi-command operation?
mediumCommand Execution Patterns 9 mins