Redis

Operations Interview Questions

Operations interview questions for Redis — fundamentals through advanced scenarios.

  • 20Questions with answers
  • 3Difficulty levels

Questions (20)

Browse beginner, intermediate, and advanced questions with answers — hide them when you want to self-test.

Question 1
Interview Beginner
Question

What do you look at first in INFO during an incident?

Answer:

INFO is the first ops lens: memory, persistence, replication, clients, stats. used_memory versus maxmemory, mem_fragmentation_ratio, connected_clients, and instantaneous_ops_per_sec tell you which class of incident you are in. Do not start with KEYS.

Question 2
Interview Beginner
Question

How do you measure replica lag in a way that is safer than "the replica is up"?

Answer:

Replica lag: INFO replication master_repl_offset minus the replica offset. Seconds lag is derived. Lagging replicas must not take failover. Alert on offset delta, not only on replica is up.

Question 3
Interview Beginner
Question

What does a real failover drill need to prove besides the process restarting?

Answer:

Failover drill: Sentinel FAILOVER or CLUSTER FAILOVER on a replica in staging, then confirm clients follow MOVED or Sentinel publishes. Applications must retry with a cluster or sentinel-aware client. A drill that only kills a process without watching the app is incomplete.

Question 4
Interview Beginner
Question

What does a high mem_fragmentation_ratio usually mean?

Answer:

Memory fragmentation: mem_fragmentation_ratio well above 1.5 with a stable dataset often means allocator holes after expire storms or COW. activedefrag yes or restart replicas one by one. Do not raise maxmemory to fix fragmentation.

Question 5
Interview Beginner
Question

How do you recognize an eviction storm?

Answer:

Eviction storms: expired_keys and evicted_keys spike together with latency. Causes include aligned TTLs, maxmemory too tight, or a thundering fill. Jitter TTLs, raise maxmemory, and lazyfree. Check LATENCY DOCTOR during the storm.

Question 6
Interview Beginner
Question

In what order do you upgrade Redis so you still have rollback?

Answer:

Upgrade: upgrade replicas first, replicate, then failover the primary to the new version, then upgrade the old primary. Skipping replica-first is how you have no rollback. Read the RDB and AOF compatibility notes for that version jump.

Question 7
Interview Beginner
Question

How do you take a backup of RDB or AOF without tearing the file?

Answer:

Backup of RDB/AOF: copy from a replica after BGSAVE completes, ship to object storage, test redis-check-rdb. Copying dump.rdb while BGSAVE is rewriting it can capture a torn file. AOF needs a rewrite-complete copy or a checked file.

Question 8
Interview Intermediate
Question

Why are MONITOR and KEYS treated as production incidents?

Answer:

MONITOR streams every command to the caller and will stall production; never leave it on. KEYS * is O(N) and blocks. Use SCAN, redis-cli --bigkeys, and SLOWLOG. Interviewers treat MONITOR in prod as a fail.

Question 9
Interview Intermediate
Question

How does CLIENT LIST help during a connection leak?

Answer:

CLIENT LIST finds a runaway replica or a pubsub buffer hog. CLIENT KILL is a last resort. A connection leak in the app shows up here as thousands of idle clients.

Question 10
Interview Intermediate
Question

Which timeout and keepalive settings stop NAT from filling maxclients?

Answer:

hz, timeout, and tcp-keepalive: idle NAT drops and half-open clients. Set timeout or keepalive so dead clients do not fill maxclients. Cloud load balancers need this.

Question 11
Interview Intermediate
Question

How do you rolling-restart a Cluster without losing slot coverage?

Answer:

Rolling restart of Cluster: replica restart, failover, then the other side. Never restart a majority of masters together. cluster-node-timeout too low causes flapping during GC pauses.

Question 12
Interview Intermediate
Question

What fills the disk even when used_memory looks fine?

Answer:

Disk fill: AOF growth without rewrite, or RDB temp files during save. Monitor disk on the data dir separately from used_memory. A full disk breaks persistence and then replication.

Question 13
Interview Intermediate
Question

Which Redis metrics are worth paging on besides CPU?

Answer:

Alerting set: rejected_connections, instantaneous_ops, hit rate, replica offset, rdb_last_bgsave_status, aof_last_bgrewrite_status, evicted_keys. Page on failed BGSAVE. Do not page only on CPU.

Question 14
Interview Intermediate
Question

What happens the moment you CONFIG SET maxmemory lower in production?

Answer:

Changing maxmemory live: CONFIG SET maxmemory can start eviction immediately. Do it during a quiet window and watch evicted_keys. Lowering it too far is a self-inflicted stampede.

Question 15
Interview Advanced
Question

Why does replica placement across AZs belong in the Redis design review?

Answer:

Multi-AZ replica placement: a replica in the same AZ does not survive the AZ. Sentinel or Cluster replica placement is an ops design. Failover to a distant replica adds latency; document it.

Question 16
Interview Advanced
Question

How do you tell a bad Redis command from a noisy host?

Answer:

redis-cli --latency and --intrinsic-latency on the host separate machine issues from Redis issues. High intrinsic latency means noisy neighbor or THP, not a bad query. Fix the host first.

Question 17
Interview Advanced
Question

How should Redis modules be operated compared with CONFIG MODULE LOAD at 2 a.m.?

Answer:

Module ops: MODULE LOAD is dangerous; pin module versions through config and image, not ad-hoc loads. A module crash takes the process. Treat modules as part of the upgrade drill.

Question 18
Interview Advanced
Question

Why is CONFIG REWRITE part of preventing post-restart surprises?

Answer:

Config rewrite: CONFIG REWRITE persists CONFIG SET changes into redis.conf. Ephemeral CONFIG SET is lost on restart. Drift between running config and file is a common post-restart incident.

Question 19
Interview Advanced
Question

What does hitting replica output-buffer limits trigger next?

Answer:

Slow consumers of replicas: client-output-buffer-limit replica exceeded drops the replica and triggers full resync. That full resync is a primary CPU and disk event. Fix replica speed or buffers before the next drop.

Question 20
Interview Advanced
Question

What belongs in a Redis on-call runbook as the first command and the forbidden ones?

Answer:

Document runbooks: BGSAVE failure, failover, hot key, OOM noeviction, and AOF --fix. Ops interviews want the first command you run, INFO, and the commands you will not run, KEYS and MONITOR. Keep the runbook next to the dashboards.

Practice with AI mock interviews

Run Redis mock interviews with AI follow-ups, instant feedback, and analytics on AiLx.

Free to start · No credit card required