How to Design a Highly Available System: The Design Sequence

By Arkaitz

Why How to Design a Highly Available System Is a Sequence, Not a Checklist

High availability is not bought by piling on redundancy. You buy it by removing shared fate and making the failures you already have survivable — the extra copies come last.

Search how to design a highly available system and page one is a definitional layer: redundancy, monitoring, failover, load balancing. Almost none of it contains a company, a date, and a number.

This is not an interview answer or a design Netflix post. You own a production system, and someone has asked you to make it highly available. What follows is the sequence I run: set the target, map the request path, price the shared failure domains, make failure survivable, add redundancy. The system design practical guide owns the method and the availability math this post leans on.

The thesis is one sentence: high availability is bought by removing shared fate, not by adding copies; redundancy is a force multiplier on an uncorrelated design and the last step, not the first. AWS's own Builders' Library states the condition plainly: copies only compound availability when their failures are independent, and both known and hidden factors can introduce risks of correlated failures, which eat away at the benefits of redundancy. The analog is a bad batch of cabinet brackets — identical parts, one unseen shared cause, every copy fails at once, and redundancy becomes a paper guarantee. I have watched teams skip that and buy replicas first, until the first shared cause takes every copy.

Set the target first — and start from critical flows, not uptime

Pick the target from what users need, express it per critical flow, and write it down before you pick a topology. A target you choose after the architecture is a target chosen to justify it.

The vocabulary, tightly. Your SLI is a measure — the fraction of well-formed requests that succeed. Your SLO is the target for it. Your SLA is the contract with consequences: as Google's SRE book puts it, if there is no explicit consequence, then you are almost certainly looking at an SLO. Availability is MTTF / (MTTF + MTTR), so detection and recovery time matter more than replica count. N+1 and N+2 are capacity, not copies. Your RTO is the maximum restore time; your RPO is the maximum data loss, measured in time.

The hub already turns the target into minutes — 99.9% is 8.76 hours a year, 99.99% is 52.6 minutes — so use its table. Azure's reliability principles say to define outcomes per critical flow, not for the site, and Google warns against setting the target from current performance, which may lock you into supporting a system that requires heroic efforts. The honest anchor: 99.99% for most products, 99.999% only for some global services, because users cannot tell 100% from excellent. I have set mine from the product, not the dashboard.

How do you find the single point of failure you didn't know you had?

You cannot eliminate a single point of failure you have not drawn. Overlay every critical flow on the architecture, then name each point where one failure stops the flow.

Azure's failure-mode analysis gives the loop: decompose the workload, overlay your critical flows, identify internal and external dependencies, then walk each flow for single points of failure and a mitigation. Failures happen no matter how many layers of resiliency you apply. Sort the findings into strong dependencies and weak ones, minimize the strong, then test the map against the catalogue: regional and AZ outages, service outages, DDoS, misconfiguration, operator error, maintenance, and overload.

Take the anonymized multi-tenant commerce engine I designed and shipped. I mapped the buyer's checkout by hand: edge → load balancer → a stateless storefront service → a shared cache → the tenant-keyed shard holding that tenant's orders → a shared control database read in-process. The first pass I drew looked fine; walking it hurt. The stateless service is fine, while the shared cache, the control database, and the single region are not — the cache is the same object for every tenant, and none show on an org chart. The receipts are dated: Roblox's 2021 outage ran 73 hours because, in its own postmortem, the system failed because Consul was a single point of failure; GitLab's 2017 outage ran 18 hours because its primary database was a single point of failure, its failover target wiped by the recovery procedure.

Your availability ceiling is a dependency you do not control

Your target is capped by your worst critical dependency. Either raise that dependency's effective availability or lower what you promise.

The Calculus of Service Availability states the law: a service cannot be more available than the intersection of all its critical dependencies. Your internal version is the rule of the extra 9 — a 99.99% service needs 99.999% dependencies. It has 53 minutes of budget a year; five independent critical dependencies at 99.999% each spend 26 before your own bugs. Count unique dependencies only — each contributes 1/N regardless of its depth in the dependency hierarchy, so one database behind three layers is one. So: if a dependency offers two nines, you are designing a two-nines system no matter how many replicas you draw. I have watched a team promise four nines on a two-nines dependency; the promise, not the replica count, was the design.

Two moves: lower the promise and advertise less than you can do, or raise the dependency's effective availability with mitigation — a capacity cache, failing open, graceful degradation. The second bridges below.

The cache is where teams get caught; Google's distinction is the rule: a latency cache can run empty and cost only latency, while a capacity cache cannot, because the backing store was never sized to survive it — so cache outages or even degradation can easily cause a total outage. Dan Luu and Yao Yue's ledger of Twitter cache incidents (six SEV-0s and six SEV-1s, 2012–2022) is the receipt for the team that added a cache for speed and found a new single point of failure.

Redundancy per layer — and why a highly available system needs spare capacity, not spare copies

Replicate the critical layers, but size each surviving copy to absorb the failed one's traffic. A copy with no spare capacity is not redundancy.

Your redundancy is multiple identical instances of a workload component, and Azure warns one layer is not enough — build it across compute, data, and networking, critical components at least. DNS is the layer you will forget: redundant resolvers across regions exist, in Azure's words, to eliminate a single point of failure. And two nodes at 60% each is performance, not reliability — if one node fails, your remaining node ... can't operate at 120%. I have watched that pair called highly available; it is performance wearing a reliability label. If a one-box site is still the honest design, simple web architecture for early-stage websites inherits this rule.

Split control plane from data plane — a redundancy decision too: a system's control plane tends to have more moving parts than its data plane, so it's statistically more likely to become impaired. The EC2 data plane keeps serving when its control plane is impaired because it was built statically stable. The redundancy math, 1 − (1 − A)^N, is the hub's; here you need only that correlation, not count, sets your ceiling.

Active-active or active-passive — what do you actually pay for failover?

Active-active removes the detection window and forces the consistency problem onto you; active-passive is cheaper and buys a known outage window. Pick by which cost you can pay, and make the recovery path statically stable either way.

Route 53's definitions are clean. Active-active means all records are active unless [the health check] considers them unhealthy, so traffic can go to any healthy record. Active-passive means the secondary is standby and takes over only if all the primary resources are unhealthy. The standby tiers: backup-and-restore (hours), pilot light (tens of minutes), warm standby (minutes), multi-site active/active (near real time) — at rising cost. More important is static stability: your system keeps working even when a dependency becomes impaired because it had already provisioned the capacity they'd need ... well in advance, so no control-plane call sits in the recovery path.

The data cost is unavoidable: synchronous replication buys zero data loss at write-latency cost, asynchronous buys latency at a bounded RPO window. The consistency model underneath belongs to the CAP and consistency posts. One trap: with active-passive weighted records, every nonzero-weight record must be unhealthy before Route 53 uses a zero-weight one, which can make your web application or website unreliable if the last healthy resource ... can't handle all the traffic.

Do health checks ever hurt a highly available system? Yes.

Health checks fail safe only when they react to a local fault and keep the fleet serving through a shared one. The deep probe that removes every instance is the outage, not the prevention.

AWS states the failure mode without hedging: systems that overreact to health check failures can turn small problems into complete outages. The mechanism is counter-intuitive: a server failing fast looks faster than a healthy one, so a least-loaded balancer directed a disproportionate amount of traffic to the unhealthy servers. The fix is to slow failed responses to average success latency — and to let the automation stop directing traffic to a single bad server but keep allowing traffic if the entire fleet appears to be having trouble.

Do it in layers. Liveness checks confirm connectivity and process presence. Local checks test resources not shared with peers — disk, supporting processes, clock skew, crypto material. Deep checks test shared dependencies, and those fail fleet-wide, so Microsoft's readiness-probe cascade warns: a deep probe on an unreliable dependency can report the instance as unhealthy even though the application itself is functioning, producing a cascading failure where the monitoring mechanism reduces availability. When every instance is unhealthy, the platform must not remove them all — that is application-level degradation. Use a lame-duck drain so a task finishes in-flight requests instead of serving errors.

Remember what your machinery is made of. Adding capacity took Amazon Kinesis down in 2020. A relatively small addition of capacity pushed the fleet over an operating-system thread limit, and the service stayed degraded from 5:15 AM to 10:23 PM PST. Capacity is a change, and changes fail. The on-call load is real too — the long version is slow productivity in software engineering.

Graceful degradation and load shedding — decide what you stop before you must

Under overload the only correct response is to shed low-criticality work first and keep interactive traffic moving. Choose your threshold and criticality class before the spike, not during it.

Overload is the most common cause of cascading failure, so decide ahead of time what you stop: per-task throttling on CPU, memory, and queue length; an HTTP 503 when in-flight requests exceed a threshold; a queue that drops dying requests first by switching FIFO to LIFO or CoDel. Graceful degradation reduces work instead of dropping it — a subset of data, a cheaper ranking algorithm. Azure's degraded mode adds a user-facing notification: if the database is down, the application might switch to a read-only mode using cached data; if the payment gateway is down, let users save the cart and complete later. Most teams miss shed by criticality: Google propagates CRITICAL_PLUS, CRITICAL, SHEDDABLE_PLUS, SHEDDABLE through the RPC layer, so an overloaded dependency drops batch work before interactive traffic.

Two facts. First, it's a common mistake to assume that an overloaded backend should turn down and stop accepting all traffic — reject fast and keep serving what it can. Second, the code path you never use is the code path that (often) doesn't work, so run a small subset near overload to exercise your degraded path. In the drills I have run, the team that skipped that step discovered the path during the incident. When shedding is imperfect, how we triage a production incident picks up the pieces.

The numbers make it computable. Google's cascading-failures chapter shows that holding N+2 against a 19,000 QPS peak at a 5,000 QPS breaking point takes about six clusters. Retries are the load you feed it: three retrying layers — backend, frontend, and JavaScript — with three retries each (four attempts), turn one user action into 64 database attempts (4³), and per AWS's retry guidance a five-deep stack pushes database load up 243× — so fix it with fewer retry layers and jitter, not another fallback.

Statelessness and idempotency at the edge — what makes failover safe

Stateless compute makes a lost node cost capacity, not state; idempotency makes the retry after a lost node safe. Both are prerequisites for failover that does not double-apply.

Keep the compute layer clean of any state, in Azure's phrasing, because nodes might be deleted, faulted, or replaced at any time. If any node can take any request, a lost node costs you throughput; if it cannot, it costs you a recovery procedure.

An operation that can be called any number of times while guaranteeing that side effects only occur once lets a client retry after any failure, including the ambiguous one where the call succeeded and the connection broke — the window that double-charges customers. Its mechanics are the hub's to teach; your rule here is that every failover path must assume it will be retried. Inside your data plane, most queues are at-least-once, so design consumer logic to be idempotent. Delivery semantics are Queues vs Streams' job; you only need the consumer rule.

Data replication — make the design call, not the model zoo

Choose sync or async per data set by whether you can afford the RPO window or the write latency. Never re-litigate CAP inside a topology decision.

Leader-follower versus quorum is then a failover shape: active-standby is the normal form for a relational primary, with managed platforms handling failover and repointing the DNS name. Prefer managed failover; your job is the design around it. Partitioning carries the availability payoff directly: If one shard goes down, the other shards are still reachable. A failure in one shard only disrupts a subset of the total transactions.

Be honest about the cost most posts skip: developers spend a significant fraction of their time building extremely complex and error-prone mechanisms to cope with eventual consistency. The lesson: minimize coordination, which is also how you get availability. CAP, consistency models, quorum internals, and CRDTs are the CAP and consistency siblings' territory — this post stops at the sync-versus-async call.

Blast radius: static stability, cells, and shuffle sharding

Shrink the blast radius so one failure — one tenant, one cell, one AZ — costs a fraction of traffic, and pre-provision the capacity the surviving side needs so recovery needs no control-plane call. This is the second half of the thesis.

Static stability pre-provisions for the impairment you anticipate. AWS runs three Availability Zones with services overprovision by 50 percent ... each Availability Zone is operating at only 66 percent of the level for which we have load-tested it, so an AZ impairment requires no action. Cells go further: Each cell is independent, does not share state with other cells, and handles a subset of the overall workload requests. The ratio is the sell — If a workload uses 10 cells to service 100 requests, when a failure occurs in one cell, 90% of the overall requests would be unaffected.

Shuffle sharding gives each tenant a near-unique combination of shards: a four-card hand from a 52-card deck yields more than 300,000 hands, and with four instances per shard, impact can fall to 1/1680 of our total customer base. That is how Route 53 makes a multi-tenant DNS service feel single-tenant, at the cost of more slack and client-side retries. Full sharding divides your blast radius by the number of shards; shuffle sharding does exponentially better again and charges you for it. Add jitter so no two servers in the fleet see the same exact workload.

For the commerce engine I built, cells answer how do we stop one tenant from taking everyone down, and they are the fault isolation you would otherwise split a monolith to find — the seam with monolith vs microservices: the trade-offs. It is the one redundancy decision from that system I would make again. Azure spells the same idea as the bulkhead and deployment-stamp patterns.

Multi-AZ or multi-region — how much availability are you actually buying?

Start multi-AZ; go multi-region only for a named driver that multi-AZ cannot answer. Check first that the second region is not the same shared-fate design in a new place.

AWS's own line is the default: For most workloads, a well-architected multi-AZ deployment within a single Region provides sufficient resilience, and multi-region is a deliberate decision driven by specific drivers, not as a default starting point. The drivers: full regional disruption in your disaster definition, a sovereignty mandate, an RTO under 30 minutes, multi-continent latency. The bill adds infrastructure management, data synchronization, and application design, along with higher costs from cross-Region data transfer and duplicate infrastructure.

DNS is the trap at the end: plan for post-failover records and connection strings. A project to add availability can subtract it. Cloudflare's June 2022 outage came from a change part of a long-running project to increase resilience in our busiest locations, and even though these locations are only 4% of our total network, the outage impacted 50% of total requests. It is the same shared-fate shape as Cloudflare's 2019 regex-driven CPU exhaustion and its 2020 one-line BGP policy change that sent all traffic to Atlanta. Control planes concentrate that risk: S3 in 2017 (a tool drove the index subsystem into a full restart), us-east-1 in December 2021 (EC2, ELB, and Route 53 APIs impaired — RDS affected transitively — while the main network ran), and Facebook in 2021 (a maintenance command plus an audit-tool bug removed the backbone). DR runbooks, backup retention, and failback belong to the reliability pillar; name and stop.

How do you know the failover works? You test it, on purpose

An untested failover is a plan, not a capability. Run the drill in stages and fix what it finds before you trust it.

AWS's design principles: Test recovery procedures ... you can test how your workload fails, and you can validate your recovery procedures. Failover is the most dangerous moment, not the safest. Two of Twitter's most severe incidents — one SEV-0 and one SEV-1 — happened during planned test data-centre failovers. Its April 2018 test produced cache hot-key saturation (the SEV-0); its June 2018 test degraded success to roughly 50% before it was aborted (the SEV-1). The fix came only after the company analyzed three years of failover tests, 2018–2020, and turned the failures into operational changes.

Backups are not failover: GitLab's own count was five backup/replication techniques, and all five failed at once — silent backup failures, snapshots not enabled for the database servers, and a wiped replication target. GitLab's lesson: An ideal environment is one in which you can make mistakes but easily and quickly recover. The discipline is staged: tabletop, dry run, then production, because production drills can introduce unexpected, potentially severe failures. Controlled fault injection and game days are the reliability pillar's; verifying the failover you built is this post's.

What does availability cost, and when do you stop?

Pick the target, buy only the redundancy that buys that target, and refuse the rest — including some of the redundancy you already have.

The vendors state the bill: More workload redundancy equates to more costs ... balance it with a well-defined scaling strategy to minimize cost inefficiencies. Simplicity is a reliability strategy: It's often what you remove rather than what you add that leads to the most reliable solutions, because every critical component is a significant point of failure.

The rule of the extra 9 makes your ceiling explicit; 53 minutes a year for 99.99% ends the argument. Buy only the redundancy that buys that. Don't over-achieve, either: Google synthesizes controlled Chubby outages because its reliability created false dependencies, and warns that insisting on 100% SLOs can reduce the rate of innovation and deployment, require expensive, overly conservative solutions, or both. Run that rule over the commerce engine and you reach my answer: cells and tenant-keyed shards earn their cost by capping the blast radius; a second region probably does not, not before the request path is mapped and the failover is drilled. Reliability work is headcount, which is why ecommerce architecture at 100 users is the right counterweight at the small end.

What to take away — the sequence, and what you are not getting here

Take the order; the components are downstream of it. One page: target → request path → dependency ceiling → survivable failure → redundancy → verify. Set the target per critical flow, name every single point of failure, accept your worst dependency caps you, make failures survivable, shrink the blast radius, and add the copies only after you drill them.

What you are not getting is deliberate. How to design a distributed system owns the distributed-systems method; the CAP Theorem Explained With Real Examples post owns consistency-model choice; Queues vs Streams owns delivery semantics; and the reliability pillar will own chaos engineering, DR runbooks, and observability. Each was named once and deferred, so this post stays one question: how to lay out your system so it survives its own failures.

The sequence posts keep coming. Get an email when the next one publishes. No spam, just the design.

More of my writing at arkaitzmolinuevo.com.

Related Reading