Redis is deceptively simple. These questions check whether a candidate understands its data structures, persistence and the failure modes of caching.
Hiring a Redis developer is easy. Telling a real one from a convincing résumé is the hard part — and it’s most of what we do. These are grouped by level, because the same question that stretches a junior is a warm-up for a senior.
Junior Redis interview questions
0–2 years
Basics and data types.
What is Redis and what is it used for?
An in-memory key-value store used for caching, sessions, queues, rate limiting and real-time data, prized for speed.
Thinks it’s only a cache and nothing else.
What data structures does Redis support?
Strings, hashes, lists, sets, sorted sets, plus streams, bitmaps and HyperLogLog — choosing the right one is the skill.
Stores everything as JSON strings.
Why is Redis fast?
It keeps data in memory and uses efficient data structures with a mostly single-threaded command loop, avoiding lock overhead.
Thinks it’s fast because it’s NoSQL.
How does key expiration (TTL) work?
Keys can be set to expire after a time, used for caches and sessions; expired keys are removed lazily and periodically.
Never sets TTLs and lets memory grow unbounded.
What is the difference between a list and a sorted set?
Lists are ordered by insertion (queues/stacks); sorted sets order by a score, enabling leaderboards and ranges.
Uses a list where ordering by score is needed.
How do you use Redis as a cache?
Store computed results with a TTL and check the cache before the source (cache-aside); handle misses gracefully.
Caches with no expiry or miss handling.
What is an atomic operation in Redis?
Individual commands are atomic; operations like INCR avoid race conditions without external locks.
Reads-modifies-writes with a race condition.
How does pub/sub work?
Publishers send messages to channels and subscribers receive them, useful for real-time fan-out (without persistence).
Expects pub/sub to persist missed messages.
Mid-level Redis interview questions
2–5 years
Patterns and persistence.
What caching patterns do you know?
Cache-aside, read-through, write-through and write-behind, each with different consistency and complexity tradeoffs.
Only knows “put things in Redis.”
What is cache invalidation and why is it hard?
Keeping the cache consistent with the source; TTLs, explicit invalidation and versioned keys all have pitfalls.
Never invalidates and serves stale data indefinitely.
How does Redis persistence work (RDB vs AOF)?
RDB snapshots periodically; AOF logs every write for better durability at some performance cost; they can be combined.
Assumes Redis never loses data, or that it’s purely volatile.
What is a cache stampede and how do you prevent it?
Many requests recomputing an expired hot key at once; mitigations include locks, early recomputation and jittered TTLs.
No idea why load spikes when a hot key expires.
How do you implement rate limiting with Redis?
Atomic counters with expiry, or sliding-window/token-bucket algorithms using sorted sets or Lua scripts.
In-memory counters that don’t work across instances.
What are Lua scripts used for?
Running multiple operations atomically on the server, avoiding round-trips and race conditions.
Does multi-step logic with race conditions client-side.
How do you use Redis for distributed locks safely?
Locks with TTL and a unique token (with awareness of the limitations); understand that naive locks can be unsafe.
Implements a lock with no TTL that can deadlock.
How do transactions (MULTI/EXEC) work?
They queue commands to execute atomically; combined with WATCH for optimistic concurrency.
Assumes MULTI provides rollback like SQL.
Senior Redis interview questions
5+ years
Scaling and reliability.
How does Redis scale beyond one node?
Replication for read scaling/HA, and Redis Cluster for sharding data across nodes by hash slot.
Assumes one node scales forever.
What are the eviction policies and when do they matter?
When memory is full, policies like allkeys-lru or volatile-ttl decide what to drop; the wrong policy evicts needed data.
Runs out of memory with no eviction policy set.
How do you achieve high availability?
Redis Sentinel or Cluster for automatic failover, plus persistence and replication.
Single instance with no failover.
What are the risks of using Redis as a primary datastore?
Memory cost and durability limits; it can be a source of truth with AOF and replication, but many use it alongside a durable DB.
Uses Redis as the only store for critical data with no durability plan.
How do you keep the keyspace healthy?
Sensible key naming, TTLs, avoiding huge keys, and monitoring memory and slow commands.
Creates giant keys and never expires them.
What commands are dangerous in production?
KEYS, big DEL/FLUSHALL and other O(N) blocking commands on large datasets; use SCAN instead.
Runs KEYS * on a huge production instance.
How do you design keys for a cluster?
Understand hash slots and use hash tags to co-locate related keys for multi-key operations.
Multi-key ops fail because keys land on different shards.
How do you monitor and troubleshoot Redis?
Track memory, hit rate, evictions, latency and slow logs; alert before memory pressure causes evictions.
Flies blind until it falls over.
Build and score a full interview with our free interview scorecard tool, browse the full question hub, or see how we interview engineers.