Cases2 cases
1 to 2 of 2
IL-0241A database shard could not elect a new primary, and the Stripe API failed most requests in two periods on one dayStripe2019- Symptoms
On 10 July 2019 the Stripe API failed a substantial majority of requests twice, from 16:35 to 17:02 UTC and from 21:14 to 22:47 UTC. In the first period automated monitoring detected within a minute that a database cluster had failed to elect a new primary.
- Trigger
The primary node of a database cluster failed at 16:35 UTC while one shard had several stalled nodes. The second period was set off by rolling the election protocol back to the previous minor version at 20:42 UTC.
- Root cause
- Component
- Contributing factor
- Detection
Automated monitoring detected the failed election within a minute, and the team was alerted at 16:36 UTC. The second period was announced at 21:14 UTC by automated alerts that some shards in the cluster were unavailable.
- Remediation
- Restarted all nodes of the database cluster, which forced a successful primary election
- Updated the production configuration and restarted the database cluster's nodes
- Ramped traffic back up, putting services for user-initiated API requests first
- Action items
- Alert when nodes stop reporting their replication lag
- Alert when a shard enters a state that could trigger the election fault
- Work with the database maintainers on a fix for the underlying fault
- Add circuit breaking on failed operations to particular database clusters
- Use fault isolation to contain the impact of a single failed shard
- Limit the resources used by clients that keep retrying failed requests
- Add procedures and tooling that make rapid configuration changes during incident response safer
IL-0430Mackerel's Redis stopped answering during a replication setup, keepalived failed over by mistake, and Mackerel degradedHatena2018- Symptoms
On 26 September 2018 at 10:51 JST the whole Mackerel monitoring service stopped working properly and its alive monitoring stopped. The application servers could not connect to Redis, which stores Mackerel's monitoring data, and could not return correct responses.
- Trigger
Redis memory use had been growing, so operators set up replication in order to scale Redis up. Building the replication took a long time and Redis stopped answering for a while, and keepalived treated this as a node failure and started a failover nobody intended.
- Root cause
- Component
- Contributing factor
- Remediation
- Switched back to the correct Redis and briefly saw the application return
- Restarted the application servers one after another, which did not improve the symptoms
- Detected the organizations posting inappropriate metrics and blocked their requests
- Adjusted the timeout interval of the application servers
- Temporarily added capacity to Diamond, the TSDB
- Increased the number of Kinesis shards and Redis Cluster shards
- Scaled out the API application servers
- Put Mackerel in maintenance mode, checked it internally and let outside requests back gradually
- Action items
- Raise the number of keepalived health checks for Redis so a brief load increase does not trigger a failover
- Scale Redis up
- Add more application servers
- Change the application to store only the monitoring data it needs in Redis, reducing Redis memory use
- Build a way to detect inappropriate API requests quickly and show them on a dashboard
- Build a function to block organizations making inappropriate requests quickly
- Keep improving the accuracy of detecting inappropriate requests and consider adding features such as an API limit
- Strengthen monitoring of the application servers' internal processing so problems are handled before they become outages
- Lessons
Hatena did not find why recovery took so long, but expects that keeping failover from reacting to short load spikes and giving the application more performance headroom would prevent an outage this long. It also aims to keep problems contained to a small part of the service when a failure does happen.
These 2 cases involve Database failover manager and In-memory cache. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause2
Software defect1 case
- Component
- Contributing factor
- Organisation
Configuration change1 case
- Contributing factor
- Organisation