01 / 03

What causes Redis latency spikes, and how do you diagnose them?

Redis latency spikes can be traced to three main areas: infrastructure, the Redis server itself, and application/client behavior.

  1. 1

    SLOWLOG GET for slow commands

  2. 2

    LATENCY HISTORY / LATENCY LATEST for event-based latency

  3. 3

    DEBUG SLEEP and DEBUG JMAP for testing

Difficulty: 7/10
Topics: AOF/RDB persistence, network and OS bottlenecks, memory fragmentation

Scenario Questions

0-2 years experience
  1. 1

    Your app started timing out occasionally when writing to Redis — what three commands or tools would you run first to figure out why?

  2. 2

    If Redis suddenly starts taking 500ms for simple GETs, but the CPU is fine, what’s the most likely culprit and how would you check?

  3. 3

    A teammate says Redis is slow because it’s using too much memory — how would you verify that’s actually the problem?

2-5 years experience
  1. 1

    Our order service started seeing 2-second latency spikes every 10 minutes — the slowlog shows no slow commands, but disk I/O is spiking. What’s going on and how do you fix it?

  2. 2

    We migrated Redis to a new VM and latency doubled. The network ping is the same, memory is fine. What three things would you investigate and why?

  3. 3

    A feature that uses EVAL scripts started timing out under load — how do you determine if it’s the script, Redis itself, or the client?

5-8 years experience
  1. 1

    Our Redis cluster has 100+ instances and latency spikes correlate with memory fragmentation — how would you design a monitoring and mitigation strategy that doesn’t require restarts?

  2. 2

    We’re seeing periodic 100ms+ latency spikes during AOF rewrite, even with no client traffic. How would you redesign the persistence strategy to eliminate this without losing durability?

  3. 3

    A critical service uses Redis for session storage and sees 500ms spikes every time a large key is deleted. How do you architect around this without changing the data model?

8+ years experience
  1. 1

    We’re migrating from a single-node Redis to a clustered setup, but latency spikes during shard rebalancing are breaking SLAs — how do you design a zero-downtime migration with predictable performance?

  2. 2

    Our Redis instances are running on shared cloud VMs and latency spikes correlate with noisy neighbors — what architectural changes would you push for to guarantee consistent performance at scale?

  3. 3

    A legacy system relies on Redis for real-time leaderboards with 10M+ keys, and fragmentation causes daily restarts. How do you evolve this architecture to eliminate operational fragility without a full rewrite?

Follow-up Questions

  • What would you do if the latency spikes only happen during backups?
  • How would you tell if this is a Redis issue or a client-side problem?
  • Would you change your approach if this was a multi-tenant Redis cluster?