The Primary’s Disk Is Dying
Easy · system design problem
SMART errors say the primary’s disk will fail within a minute. A restart is 30 s of total outage; a failover is 6 s — still too long on its own.
shortlinks-api serves 18,000 reads/s and 2,000 writes/s from a PostgreSQL primary with two streaming replicas. Monitoring reports SMART errors: the primary’s disk will fail at about T+60s. When it does, a restart takes ~30 s; promoting a replica (Failover) takes ~6 s, during which the database answers nothing. Availability must stay at 99% over the two minutes after the failure.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.