Outage28 Oct 2021

Roblox's 73-Hour Outage

Two hidden performance bugs in Consul, the system every Roblox service used to find each other, kept Roblox down for three days.

Severity
Front-page news
Difficulty
advanced
Companies
Roblox, HashiCorp
Tech
Consul, Raft, BoltDB, Nomad, Vault, Service discovery
Root cause
latent bug, dependency cascade

The story

Quick (1 min)

From 28 to 31 October 2021, Roblox, a game platform with 50 million daily players, was down for 73 hours.

Every Roblox service used a system called Consul to find other services, a bit like a phone book. Consul slowed to a crawl, so services couldn't talk to each other and everything stopped.

Finding out why took days. Engineers tried replacing hardware, upgrading to bigger machines, resetting Consul and cutting traffic, and none of it worked. Eventually they found two separate bugs: a new Consul feature called "streaming" choked under Roblox's heavy load, and the database inside Consul (BoltDB) had a performance problem that made some writes extremely slow.

The lesson: when one system is a single point of failure for everything, including your monitoring, a subtle bug in it can take days to find.

Keep reading to the end to earn XP.Read. XP earned.

Engineer (2 min)

The stack. Roblox runs its own data centres, with over 18,000 servers and 170,000 containers, using the HashiStack: Nomad schedules containers, Vault holds secrets, and Consul provides service discovery, health checks, locking and a key-value store. Nomad and Vault depend on Consul too. The Consul cluster had 5 voters and 5 non-voters, and used Raft for leader election.

The change. Roblox had upgraded to Consul 1.10 for a new streaming feature that cuts CPU and bandwidth, enabling it gradually. On 27 October at 14:00, it was enabled on the traffic routing service, whose node count had also just been increased by 50% ahead of end-of-year traffic.

Symptoms (28 Oct, 13:37). Vault degraded, and one Consul server had high CPU. Median KV write latency went from under 300 ms to 2 seconds. At 16:35, online players dropped to 50%, and then everything went down, because "Consul was a single point of failure, and Consul was not healthy."

Four wrong theories. (1) Slow hardware: a node was replaced. (2) Too much traffic: all nodes moved to 128-core machines, which made things worse. (3) Reconnect storm: Consul was reset from a snapshot behind an iptables block, then usage was cut hard. (4) Moving back to 64 cores didn't help either.

Root cause 1: streaming contention. Perf reports and flame graphs showed time spent in the streaming code paths. Under very high read and write load, streaming funnels contention onto a single Go channel, which blocks writes. The dual-socket, NUMA-memory 128-core machines made it worse. Disabling streaming everywhere (15:51 on 30 Oct) brought writes back to 300 ms.

Root cause 2: BoltDB freelist. Some leaders were still slow. BoltDB stores Raft logs and never shrinks its file; it tracks free pages in a "freelist." Roblox's workload left a 4.2 GB file holding only 489 MB of data, with nearly a million free pages, so freelist maintenance made each write very expensive. During the incident the team worked around it by keeping those slow leaders from staying elected.

Interview takeaway: don't make one cluster a dependency of everything, including your observability, and roll out new features to critical infrastructure with load-specific canaries.

Keep reading to the end to earn XP.Read. XP earned.

Deep dive (3 min)

Timeline (Pacific time, from Roblox's postmortem)

  • 27 Oct 14:00: Consul streaming enabled on the traffic routing service, plus 50% more routing nodes.
  • 28 Oct 13:37: Vault degraded; one Consul server at high CPU. Players not yet affected. HashiCorp staff join.
  • 28 Oct 16:35: concurrent players drop to 50% of normal, then a complete outage.
  • ~19:00: most of the cluster moved to 128-core machines with NVMe SSDs; still unhealthy.
  • 29 Oct 02:00–04:00, attempt #1: Consul is shut down and restored from a snapshot, with iptables blocking access. It degrades again once internal service load returns.
  • 29 Oct 04:00 – 30 Oct 02:00, attempt #2: all non-essential Consul usage is disabled, services scaled to single digits, and health checks slowed from 60 s to 10 min. Restart at 16:00 on 29 Oct. Unhealthy again by 02:00.
  • 30 Oct 02:00–12:00: deep dive into Consul internals finds KV writes blocked for long periods (contention). Moving back to 64-core machines doesn't help.
  • 30 Oct 15:51: streaming disabled for all Consul systems; KV write median falls to 300 ms. Slow leaders are kept from staying elected.
  • 30 Oct 20:00 – 31 Oct 05:00: the caching tier (normally about 1 billion requests per second) is redeployed. Stale scheduling data, a bad node the scheduler saw as empty, and tooling built for incremental changes rather than cold starts all slow it down.
  • 31 Oct 10:00–16:45: players are let back in using DNS steering in roughly 10% steps, checking database and cache health at each step. At 16:45, 100% of players have access.

Why it took so long

  • The two root causes were "primarily unrelated issues buried deep in the Consul implementation."
  • "Critical monitoring systems that would have provided better visibility into the cause of the outage relied on affected systems, such as Consul."
  • A single Consul cluster served many workloads, magnifying the impact.
  • Bringing everything up carefully from fully down took time of its own.

HashiCorp's findings

Streaming had been benchmarked at similar scale, but the problem only appeared with "a combination of both a large number of streams and a high churn rate." HashiCorp said it would build new lab benchmarks and improve streaming's design under extreme load.

Roblox's commitments

  • Improve monitoring and remove circular dependencies in the observability stack.
  • Speed up bootstrapping from a fully down state.
  • Move to multiple availability zones and data centres.
  • Remediate the Consul issues behind the outage.

Roblox stated there was no user data loss and no unauthorised access during the incident.

Keep reading to the end to earn XP.Read. XP earned.

Failure replay

Step by step, what broke and what it hit next.

  1. Oct 27, 14:00
    Consul streaminghealthy

    The new streaming feature is enabled on the traffic routing service, which also grows 50%.

    Affects: Consul cluster

  2. Oct 28, 13:37
    Consul clusterdegraded

    Write latency climbs from under 300 ms to 2 seconds. Vault slows down.

    Affects: Nomad and Vault, Roblox services

  3. Oct 28, 16:35
    Roblox servicesdown

    Services can't find each other, Nomad can't schedule, Vault can't hand out secrets. Players drop to 50%, then zero.

    Affects: Players

  4. Oct 28, 16:35
    Nomad and Vaultdown

    Scheduling and secrets also depend on Consul, so the whole platform stalls.

  5. Oct 28–30
    Consul clusterfailing

    Bigger hardware, a snapshot reset and cutting load all fail. Monitoring depends on Consul too.

  6. Oct 30, 15:51
    Consul streamingrecovering

    Flame graphs point to contention on streaming code paths. Streaming is disabled everywhere and writes drop to 300 ms.

    Affects: Consul cluster

  7. Oct 30
    Consul clusterrecovering

    Some leaders are still slow because of a BoltDB freelist problem. They're kept from staying leader.

    Affects: Cache tier

  8. Oct 30–31
    Cache tierrecovering

    The billion-requests-per-second cache is rebuilt from scratch, with tools built for small changes, not cold starts.

    Affects: Players

  9. Oct 31, 16:45
    Playershealthy

    DNS steering lets players in about 10% at a time. After 73 hours, everyone is back.

Impact

Who was affected
All Roblox players (around 50 million daily users).
How long
73 hours (28 October 13:37 to 31 October 16:45, Pacific time).
Cost
not disclosed (no user data loss, per Roblox).

Lessons

  • Avoid single points of failure that everything depends on, including your monitoring.
  • Roll out new features in core infrastructure with canaries that reproduce real peak load patterns.
  • Bigger hardware isn't always faster; NUMA and contention can make things worse.
  • Practise cold-starting your whole platform; tools built for small changes struggle with a full rebuild.
  • Bring traffic back gradually (DNS steering, percentage rollouts) to avoid re-collapsing.

Quiz

  1. What role did Consul play at Roblox?

    Check answer

    Service discovery, health checks, locking and key-value storage used by nearly every service. Services, Nomad and Vault all depended on Consul, which made it a single point of failure.

  2. What happened when Roblox moved Consul to 128-core machines?

    Check answer

    It didn't help and likely made contention worse because of the dual-socket NUMA architecture. The streaming contention got worse on dual-socket NUMA machines with more shared-resource contention.

  3. What finally brought Consul write latency back to normal?

    Check answer

    Disabling the new streaming feature across all Consul systems. After streaming was disabled at 15:51 on 30 October, median KV writes dropped back to 300 ms.

  4. How did Roblox avoid overwhelming the system when bringing players back?

    Check answer

    Used DNS steering to admit randomly selected players in roughly 10% increments. Each step was checked against database load, cache performance and stability before increasing.

Interview prep

Try answering out loud before you open the model answer.

  1. system design

    Service discovery is a dependency of almost every service in a microservices platform. How would you design it so a failure doesn't take down everything, as at Roblox?

    Show model answer

    Reduce blast radius and make clients tolerate discovery failures. Split into multiple clusters by workload or zone instead of one shared cluster. Have clients cache the last known endpoints and keep using them if discovery is slow or down (fail static). Keep critical bootstrapping paths, such as secrets and scheduling, from hard-depending on the same cluster. Monitor discovery from an independent stack. Roll out new discovery features gradually, with load tests matching production churn.

    A strong answer hits:

    • Partition discovery clusters by workload or zone
    • Client-side caching and fail-static behaviour
    • Break circular dependencies (secrets, scheduling, observability)
    • Gradual rollout of new features
  2. debugging

    A critical cluster has high write latency. You've replaced hardware and cut load, and it's still slow. What do you do next?

    Show model answer

    Stop treating it as a capacity problem and look inside the system: profile it with perf and flame graphs, check lock and channel contention, and look at storage engine statistics. Roblox found streaming code paths dominating CPU in kernel spin locks, then a BoltDB freelist issue. Compare recent changes, even ones rolled out gradually and "proven" for a day. Be careful with bigger hardware: more cores on NUMA machines can increase contention.

    A strong answer hits:

    • Profile internals (flame graphs, lock contention)
    • Revisit recent feature enablement
    • Storage engine internals (fragmentation, freelists)
    • Bigger hardware can worsen contention
  3. behavioural

    You've been working on an outage for 24 hours and your first three theories were wrong. How do you keep the team effective?

    Show model answer

    Keep a written list of hypotheses and what ruled each out, so the team doesn't repeat work. Rotate people to avoid fatigue errors, bring in outside experts (Roblox brought in HashiCorp), and set clear checkpoints for changing approach. Communicate honestly with users about what you know. When stuck, shift perspective: Roblox moved from "too much load" to profiling Consul internals, which found the cause.

    A strong answer hits:

    • Written hypothesis log
    • Fatigue management and rotation
    • Bring in vendor or domain experts
    • Change perspective when stuck

Go deeper