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.
What do you look at first in INFO during an incident?
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.
How do you measure replica lag in a way that is safer than "the replica is up"?
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.
What does a real failover drill need to prove besides the process restarting?
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.
What does a high mem_fragmentation_ratio usually mean?
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.
How do you recognize an eviction storm?
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.
In what order do you upgrade Redis so you still have rollback?
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.
How do you take a backup of RDB or AOF without tearing the file?
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.
Why are MONITOR and KEYS treated as production incidents?
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.
How does CLIENT LIST help during a connection leak?
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.
Which timeout and keepalive settings stop NAT from filling maxclients?
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.
How do you rolling-restart a Cluster without losing slot coverage?
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.
What fills the disk even when used_memory looks fine?
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.
Which Redis metrics are worth paging on besides CPU?
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.
What happens the moment you CONFIG SET maxmemory lower in production?
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.
Why does replica placement across AZs belong in the Redis design review?
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.
How do you tell a bad Redis command from a noisy host?
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.
How should Redis modules be operated compared with CONFIG MODULE LOAD at 2 a.m.?
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.
Why is CONFIG REWRITE part of preventing post-restart surprises?
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.
What does hitting replica output-buffer limits trigger next?
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.
What belongs in a Redis on-call runbook as the first command and the forbidden ones?
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