Preparing for a DevOps interview that covers Redis? These questions come up again and again - here are strong, concrete answers.
Q: What is Redis and why use it?
Redis is an in-memory key-value store with rich data structures (strings, hashes, sorted sets, streams) used for caching, session storage, leaderboards, queues and rate limiting.
- Sub-millisecond reads/writes for hot data
- Versatile data structures beyond plain key-value
- Built-in TTLs, pub/sub and streams
Q: What are the best practices you follow?
- Set an eviction policy (e.g. allkeys-lru) and TTLs on cache keys
- Use SCAN instead of KEYS in production
- Right-size memory and monitor fragmentation
Q: What mistakes have you seen?
- Using Redis as a primary database without a persistence/backup plan
- Unbounded keys with no TTL slowly eating all memory
- Big O(N) commands (KEYS *) blocking the single-threaded server
Q: Show a basic configuration
Cache-aside pattern and a simple rate limiter.
# cache-aside with a 60s TTL
redis-cli SET user:42 '{...}' EX 60
redis-cli GET user:42
# fixed-window rate limit
redis-cli INCR rl:ip:1.2.3.4
redis-cli EXPIRE rl:ip:1.2.3.4 60Want senior help putting Redis to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.