Incident Library

IL-0388 Discord · 2017-10-13databasegcp

A Google Cloud live migration took a Discord Redis primary offline, and the failover broke API instances and then guilds

A Google Cloud Platform automatic migration made the primary node of a highly available Redis cluster used by Discord's API services drop offline. The cluster failed over to its secondary, but the failover triggered a bug, already known and scheduled to be fixed within weeks, in how the API instances handle Redis failover. Engineers escalated a P1 ticket with GCP support at 14:02 PDT and ran a rolling restart of all API instances at 14:11. Latency stayed high, and engineers found a misconfigured edge caching rule for an expensive API route that made clients call it aggressively. The requests overloaded a non-critical Cassandra cluster. Engineers corrected the rule, disabled the endpoint on the edge network, recovered Cassandra and restarted the API instances again, and the API was back to normal at 14:57.

At 15:41 new anomalies appeared: a node of the "guilds" cluster made part of the guilds appear offline, and nodes of the "sessions" cluster misbehaved. Engineers removed the guilds node from the service hashring, restarted it, and at 16:07 decided on a full restart of the service to reset the invalid state, forcing all users to reconnect. During the reboot the "push" component failed, and engineers found that, through human error, an API setting that lets users reconnect quickly and safely was set wrong. After it was corrected, service recovered slowly from 16:33 and was fully restored at 16:52, with millions of clients reconnected over about 20 minutes.

Discord could not say exactly why the partial API outage spread into a full system failure. The first failure made nodes of other services behave incorrectly until they ran out of memory and failed. In a later update, after alerts added for this postmortem caught similar behaviour on a node, Discord found possible flaws in a library that service uses and began rolling out an update.

Severity
–
Scope
API latency and errors, then guilds appearing offline and connection failures, ending in a full restart of Discord that reconnected all clients
Users affected
Discord users; millions of clients reconnected over about 20 minutes
Region
–
Time to detect
0m
Time to resolve
2h 51m

Symptoms

At about 14:01 PDT on 13 October 2017, Discord engineers were alerted to anomalies by real-time metrics and monitoring. A Redis instance that was the primary of a highly available cluster used by the API services had dropped offline after Google Cloud Platform migrated it automatically, and some API instances did not handle the failover to the secondary node correctly.

The Redis cluster itself had failed over properly to the secondary node, and the old primary was completely unavailable. After a rolling restart of all API instances, the API endpoints still showed abnormal latency. A misconfigured edge caching rule for an expensive API route made clients call that route aggressively, and the volume of requests made a non-critical Cassandra cluster fall over under load.

At 15:41 PDT, after the API had returned to normal at 14:57, monitoring showed another anomaly, and user reports said some servers appeared offline. A node of the "guilds" cluster was misbehaving, so part of Discord's guilds appeared offline, and then nodes of the "sessions" cluster misbehaved too. During the full restart that followed, a component called "push" also failed. Nodes of other services had run out of memory and failed, which spread the failure through the real-time system.

Symptom Failover failureHigh latencyService outage

Root cause

Trigger
Google Cloud Platform automatically migrated the Redis instance that was the primary of a highly available cluster used by the API services, and the node incorrectly dropped offline.

Detection

Real-time metrics and monitoring alerted engineers at 14:01 PDT. The second phase was seen at 15:41 as another anomaly in monitoring, and end user reports of servers appearing offline were escalated at 15:42.

Remediation

Action items

Lessons

–

Sources

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, In-memory cache, Database, CDN and edge network among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.