How to Achieve High Availability 00:00:01 Find every indispensable owner The shop has made a spare copy of its checkout server. Now unplug the database. Customers still cannot buy anything. Redundancy only helps when it covers the path a transaction actually needs. One app and one database. Either of them can stop everything. There is no other app, so every user sees an error. A load balancer in front of two apps in different zones. The apps hold no data, so any of them can answer. Both apps still need one database. It is now the largest single point of failure. Every change is copied to a standby in zone B. It can be promoted. API 2 and the promoted standby, both in zone B, carry on. Keep tracing the chain after adding the first spare. Routing, state and the decision about which copy is active can each become the next place a checkout stops. 00:00:57 Standby becomes active One server works, one waits with the data. Detection, fencing, promotion, switch. A serves 100%. B receives every change and waits. The first check is missed. It may be a blip, so nothing happens yet. 15 seconds later it is official: A is down. A loses its lease, its address or its disk, so it cannot write even if it wakes up. B becomes active and clients reconnect. A failover has a detection interval, an election or promotion interval, and a period while clients reconnect. State how much accepted data may be missing when the standby takes over. 00:01:39 Two copies work now Both servers work. The question is whether one can carry everything. Each handles half. Both are tested by real traffic all day. The balancer sends everything to B, which needs 80%. It holds. Traffic has grown to 70% on each. B would need 140%. It slows down, fails its checks, and takes the rest with it. Active-active can spread reads and work before a failure happens. It still needs sufficient surviving capacity and a rule for concurrent writes when the sites disagree. 00:02:15 When does a check become evidence? Three failures remove a server, two successes return it. The probe answers 200 within 2 seconds. Perhaps a lost packet. Keep watching. Suspicious. Record it and warn. Unhealthy. It leaves the pool and gets no more requests. It answers again, but one answer is not enough. Back in the pool, with little traffic first. Requiring several consecutive failures limits removals caused by a single slow response. Waiting for more samples also delays removal of a genuinely broken target. 00:02:49 Two leaders, one resource Two copies, a broken link, and why a third vote helps. A is the primary, B copies every change. B hears nothing. From its side A looks dead, but A is fine. B promotes itself. Both accept writes and the data drifts apart. B can reach the witness: 2 of 3 votes. A reaches nobody: 1 of 3, so it must step down. A partition can leave the old leader alive while a new one is elected. Enforce ownership at the place that accepts a write, otherwise two healthy processes may produce conflicting histories. 00:03:27 A shared dependency fails every probe A deep health check turns a slow database into a full outage. Each app reports unhealthy if its database call is slow. All three apps fail the check in the same second and are removed. Pages that need no database are gone too. The balancer asks only whether this app works. Users get cached pages and some errors instead of nothing. Take an instance out of traffic for a fault specific to that instance. A common dependency being slow across the entire fleet may require controlled degradation and a separate alarm. Prove the recovery from a caller's side under a realistic workload. The number of boxes drawn in duplicate is a poor substitute for successfully serving the next buyer.