Defining High Availability 00:00:01 What one more nine buys Your checkout service was healthy for ninety-nine percent of the year. That sounds reassuring until a shopkeeper adds up all the minutes she could not sell anything. How much time did the percentage hide? A one-percent allowance across a 365-day year is 3.65 days of equivalent downtime. At ninety-nine point nine percent, the allowance shrinks to 8.76 hours per year, or 43.2 minutes in a thirty-day month. Four nines leaves 4.32 minutes in a thirty-day month. A service that needs longer than that for one manual recovery needs a different plan. Five nines leaves about 5.26 minutes annually. Redundancy can help, but shared dependencies and failover time still count. Six nines allows about 31.5 seconds annually. Define where the user-facing measurement begins before promising that number. Every extra nine divides the permitted unavailability by ten. A target that tolerates a manual repair can become a target that demands detection and recovery in much less time. 00:01:13 Spend a month of availability Three failures in 720 hours become MTBF, MTTR and an availability. The service answers. The target is 99.9%, so 43.2 minutes may be lost. Down for 30 minutes. That is already 69% of the budget. Another 20 minutes: 50 in total. The target of 43.2 is now missed. 40 more minutes. In total 90 minutes over 3 failures. Across these three incidents the total available time was 43,110 minutes. Dividing by three gives 239.5 hours of average uptime between failures. The ninety minutes spent recovering gives a mean recovery time of thirty minutes. With the same failures, recovering in about 14 minutes each gives 99.9%. For 99.99% it must be about 86 seconds. A thirty-day month has forty-three thousand two hundred minutes. At ninety-nine point nine percent, one thirty-minute incident has used more than two thirds of the time budget. 00:02:25 The whole request must work Every request needs every part, so availabilities multiply. A request passes the load balancer, the app and the database. All three are needed. The result is 99.89%: worse than every single part. About 47.5 minutes a month. The app stops and the whole chain stops with it, although two of three parts are fine. Two apps, and one is enough. Both must fail together: 0.0005 x 0.0005, if they fail independently. The chain is now about 99.94%. The database is the largest gap left: it needs a standby next. Multiplying component availabilities assumes independent failures and that each component is required. A shared network or power supply can invalidate that independence even when the machines have different names. 00:03:24 Decide what counts as a failure A 99.95% SLO leaves 21.6 minutes in 30 days. Releases and incidents spend it. For this thirty-day example, a target of ninety-nine point nine five percent leaves the equivalent of 21.6 fully unavailable minutes. Errors for 6 minutes, then a rollback. With evenly distributed traffic and a request-based indicator, ten percent failed requests for seventy minutes contributes the equivalent of seven fully unavailable minutes. A network failure costs 12 minutes. The budget is overspent by 3.4 minutes. Decide whether the objective measures elapsed downtime or the fraction of valid requests that succeed. A short outage during the busiest sale can have radically different cost under those definitions. 00:04:15 A spare under real demand The same crash on the busiest day of the year, without and with a spare. One server sells everything. It is the busiest hour. Every shopper sees an error until someone repairs it. Some buy somewhere else. Two servers share the work, and each could carry it alone. The load balancer sends everyone to Server 2. A few requests are retried. Send the sale workload through the surviving machine after removing the first one. A spare with neither capacity nor a working traffic switch cannot protect the shoppers' promised experience. 00:04:50 A healthy machine nobody can reach Why availability is measured from where the user is. Users reach the server through the gateway. The server itself says it is healthy. The server is still healthy, and no user can reach it. Its own metric does not move. A probe outside our system sees what users see and raises the alert. Use a customer-side probe alongside internal health. When they disagree, the path between the customer and that healthy process is now part of the investigation. Measure the action from a place where real customers must perform it. A running process, a responsive dependency and a successful checkout answer three different questions.