Part 4 looked at the systems our OTA update backend calls but does not run. This part turns the question inward: what happens when our own parts fail, a server, a disk, a database, a network link, a whole data centre, and how do we design so that the answer is “nothing a car notices”?
The starting point is a change of mindset that every engineer who moves from one box to many has to make. On a single ECU, a hardware fault is a rare event; you analyse it, you mitigate it, and most days it does not happen. In a fleet of thousands of machines, failure is not an event but a constant background rate. Something is always broken.
The numbers make this concrete. Backblaze, which publishes the failure statistics of its storage fleet every year, reported an annualised failure rate of 1.36 % across about 344,000 hard drives in 2025. For one drive, that is reassuring. For a fleet, it is a weekly appointment: with 1,000 drives, the chance that at least one fails in any given week is about 23 %; with 10,000 drives it is about 93 %, and roughly 136 drives fail over the year.

So the goal of this post is not to prevent failure. It is to make failure boring: expected, contained, detected quickly and recovered from automatically. As before, the system and its numbers are illustrative, and the topic comes from Gaurav Sen’s system design videos, with the classic sources listed at the end.

The System Design series
- The Building Blocks: load balancer, replication, cache, CDN, message queue.
- Where Systems Break: finding the bottleneck, latency numbers and queueing.
- Scalability Explained Simply: horizontal scaling, statelessness, sharding, consistent hashing, and why consistency is hard.
- Why Systems That Depend on External APIs Break: timeouts, retries with backoff and jitter, circuit breakers, bulkheads and idempotency.
- Designing for Failure (you are here): failure modes, availability arithmetic, failover, blast radius, backups and chaos engineering.
How things fail
Before designing for failure, it helps to name the kinds of failure, because each needs a different defence.
- Crash (fail-stop). The process dies, the machine powers off, the disk disappears. This is the friendliest failure: it is obvious, and everything else can notice it quickly and route around it.
- Slow. The server is up and answers health checks, but each request takes ten times longer than usual because of a failing disk, a full garbage collector or a noisy neighbour. Part 4 showed how a slow dependency fills thread pools; a slow member of your own cluster does the same.
- Wrong. The component answers quickly and confidently with the wrong result: a corrupted cache entry, a bit flip, a bug in one version of the code, a clock that is minutes out. Nothing crashes, and the error travels.
- Partial. One part of a component fails while the rest works: one disk in a server, one network path between two racks, one shard of the database. The system is neither up nor down.
The last three are often grouped as gray failures, a term from a 2017 paper by Ryan Huang and colleagues at Microsoft Research. Their key observation is differential observability: the system’s own health checks say everything is fine, while the applications using it are clearly suffering. A server whose /health endpoint answers in 2 ms while its real requests take 3 seconds is the classic case.
The practical lesson is to measure health the way users experience it. A load balancer that only asks “are you alive?” will keep sending traffic to a sick server. One that watches real latency and error rates per server, and removes outliers, catches gray failures that a ping never will.
Embedded engineers will recognise the list. ISO 26262 distinguishes permanent and transient faults, and a watchdog that is still being kicked by a task stuck in the wrong state is the ECU version of a gray failure: alive by every simple check, and wrong.
Availability arithmetic: nines, chains and spares
Availability is usually quoted in “nines”. It is worth translating them into downtime, because the difference between them is larger than it looks:
| Availability | Downtime per year | Downtime per month |
|---|---|---|
| 99 % | 3.65 days | 7.3 hours |
| 99.9 % | 8.8 hours | 44 minutes |
| 99.95 % | 4.4 hours | 22 minutes |
| 99.99 % | 53 minutes | 4.4 minutes |
| 99.999 % | 5.3 minutes | 26 seconds |
Two simple rules govern how components combine, assuming their failures are independent.
In series, availabilities multiply. If a check-in needs the load balancer, an app server, the cache and the database, all four must be up. Four components at 99.9 % each give 0.999⁴ ≈ 99.6 %, roughly 35 hours of downtime a year. Every component you add to the critical path makes the whole less available than its weakest part.
In parallel, unavailabilities multiply. If either of two replicas can serve a request, the system is down only when both are down. Two replicas at 99 % each give 1 − 0.01² = 99.99 %. That is how reliable systems are built from unreliable parts: two ordinary machines beat one excellent machine.
The chart shows both effects for a chain of components at 99.9 %, with and without a redundant pair at each step.

The word independent carries the whole argument. Two replicas in the same rack share a power supply; two servers running the same build share the same bug; two regions configured by the same script share the same typo. Correlated failures are why real systems rarely reach the availability their arithmetic promises, and why the rest of this post is as much about separating things as about duplicating them.
Google’s SRE book adds a practical point: 100 % is the wrong target. Users cannot tell 99.999 % from 100 % through their own unreliable phone networks, and every extra nine costs features and money. Choose a target, measure against it, and treat the remainder as an error budget you are allowed to spend on releases and experiments.
Redundancy and failover
Redundancy only helps if something notices the failure and moves the work. There are two basic arrangements.
- Active-active. Every copy serves traffic all the time, and the load balancer spreads requests across them. When one fails, the others simply take its share. This suits stateless parts such as our app servers. The one rule is to keep enough spare capacity: if three servers each run at 80 % and one dies, the other two need 120 %, and the failure of one becomes the failure of all. Planning for N+1 (one more than the load needs) or N+2 avoids that.
- Active-passive. One copy, the primary, does the work; a standby keeps a copy of its state and waits. When the primary fails, the standby is promoted. This suits stateful parts such as the primary database from Part 1, where two writers at once would corrupt the data.
Failover in an active-passive pair sounds simple and is where many outages begin. Three questions decide whether it works:
1. How do we know the primary is dead? Usually by heartbeats: no heartbeat for, say, 10 seconds means dead. Too short and a brief network hiccup causes a needless failover; too long and every failure costs that much downtime.
2. What if it is not dead, only unreachable? If the network between the primary and the standby breaks, the standby may promote itself while the old primary is still accepting writes. Now there are two primaries, a split brain, and the data diverges. The standard protections are a quorum (a majority of at least three nodes must agree before anyone is promoted) and fencing (the old primary is forcibly cut off, for example by revoking its access to the storage, before the new one starts).
3. Has the standby got all the data? With asynchronous replication, the last few writes before the crash may not have reached the standby. That trade-off, how much data you may lose, returns in the section on data below.
The diagram shows the database failover with a three-node quorum.

The automotive parallel is a redundant steering or braking ECU pair. The same three questions appear there in a different vocabulary: fault detection time, the risk of both channels acting at once, and the state the backup channel takes over from.
Limiting the blast radius
Redundancy protects against a part failing. It does not protect against the thing that most often takes systems down: a change. A bad configuration or a buggy release rolled out to every server at once will fail on every server at once, and no amount of redundancy helps, because all the copies are equally wrong.
The answer is to limit how much of the system any single failure, or any single change, can reach. Engineers call this the blast radius.
Cells. AWS describes a cell-based architecture as splitting a workload into complete, independent copies, each serving a subset of the customers, with a thin router in front that sends each request to its cell by a partition key. For our backend, a cell could hold one million cars, chosen by VIN, with its own app servers, cache, database and queue. If one cell fails, or a bad deployment breaks it, nine out of ten cars do not notice. It is sharding from Part 3, applied to the whole stack instead of only the database.
Staged rollouts. Changes go to one cell first, then a few, then all, with a pause and a health check at each step. The same principle applies to the product itself. An OTA campaign should never go to a million cars at once. A typical plan sends the update to an internal test fleet, then to 1 % of customer cars, then 10 %, then everyone, and at each gate the backend compares the install success rate, rollback rate and fault reports with the previous version. If a gate fails, the campaign stops automatically, and the damage is limited to the cars already updated.
The drawing shows such a staged campaign with its gates.

The staged campaign also connects back to Part 3. The campaign stop is the one piece of data that must be strongly consistent everywhere, precisely because it is the brake on the blast radius: when a gate fails, every region must stop offering the update immediately.
Graceful degradation and load shedding
Some failures are not a part breaking but the system being asked for more than it can give: a campaign that starts at the same time in every market, a region that fails and pushes its cars onto the others, an autoscaler that reacts minutes too late. An overloaded server that tries to serve everyone usually ends up serving no one, because every request slows down until all of them time out.
Google’s SRE book describes two answers to this, and they work best together.
- Load shedding. When a server nears its limit, it deliberately rejects part of the traffic, typically with HTTP 503 and a
Retry-Afterheader, so that the requests it does accept still finish quickly. A fast “try again later” is much better than a slow timeout, both for the car and for the server. Shed the cheapest work to lose first: a routine check-in from a car that checked in an hour ago can wait; an installation report from a car halfway through an update cannot. - Graceful degradation. Instead of rejecting requests, do less work for each one. Our backend could stop computing personalised download windows and give every car the default schedule, serve campaign lists from a cache that may be a minute old, or pause the analytics pipeline entirely while the check-ins catch up.
Two warnings from the same chapter are worth repeating. Degraded modes should be rare, so they must be monitored and alerted on when they activate. And they must be exercised regularly, because a code path that only runs during an emergency is the code path most likely to be broken when the emergency comes.
For an embedded engineer this is the familiar limp-home mode: when a sensor fails, the engine does not stop; it limits power, keeps the essential functions and tells the driver. The backend version keeps the safety-relevant functions, delivering updates correctly and honouring campaign stops, and lets everything else slow down.
Data that must survive: RPO, RTO and real backups
Servers can be replaced in minutes. Data cannot. Two numbers, defined in AWS’s disaster recovery guidance, frame every decision about it:
- RPO (recovery point objective): how much recent data you can afford to lose, measured in time. An RPO of five minutes means that after a disaster, at most the last five minutes of changes may be gone.
- RTO (recovery time objective): how long the service may be unavailable before it is restored.
Like consistency in Part 3, these are chosen per kind of data, not for the whole system:
| Data | Acceptable loss (RPO) | Acceptable outage (RTO) | Typical approach |
|---|---|---|---|
| Campaign definitions and stop orders | None | Minutes | Synchronous replication across zones; small, so cheap |
| Which software each car has | Seconds | Minutes | Replicas plus a write-ahead log; cars can also re-report |
| Signed update packages | None | Hours | Immutable objects stored in several regions |
| Diagnostics and telemetry | Hours | Days | Daily backups; the cars still hold recent data |
Note how the car itself appears as a backup in two rows. A well-designed fleet protocol lets cars report their state again after a backend failure, which turns the fleet into a large, distributed copy of its own most important data.
Replication is not a backup. A replica faithfully copies every change, including an accidental DELETE or a bad migration, within milliseconds. A backup is a copy from before the mistake, kept somewhere the mistake cannot reach.
The most instructive outage on this topic is GitLab’s in January 2017. While repairing a lagging replica, an engineer deleted the data directory of the primary database instead. GitLab’s own postmortem lists what followed: the daily backups had been failing silently, because of a version mismatch and failure e-mails that were rejected; disk snapshots had never been enabled for the database servers; and replication could not help, because it was the thing being repaired. About six hours of data were lost, and the restore took more than 18 hours. The postmortem also notes that nobody was responsible for testing the backup procedure. The lesson every team should adopt: a backup that has never been restored is not a backup. Restore it regularly, automatically, and alert when the restore fails.
Testing failure on purpose
Every mechanism in this post, failover, load shedding, degraded modes, backups, has the same weakness: it runs only when something goes wrong, so it is rarely tested by normal operation. The only way to know it works is to make things go wrong deliberately.
Netflix made this idea famous. In a 2011 post on its technology blog, it described Chaos Monkey, a tool that randomly shuts down production servers, so that engineers would build services that survive the loss of any single machine “without any customer impact”. The practice has since been written down as chaos engineering. Its published principles are short and sensible:
1. Define the steady state in terms users see: check-in success rate, latency, installs completed per hour.
2. Form a hypothesis: “if one database replica dies, the steady state does not change”.
3. Inject real-world events: kill a server, add network latency, fill a disk, fail a zone.
4. Run in production where possible, because test environments never behave quite like the real thing, but keep the blast radius small, for example one cell, during working hours, with an abort button.
5. Automate the experiments so they run continuously, not once.
A lighter starting point is a game day: a planned session where the team breaks something on purpose in a staging or production cell, follows the runbook, and writes down everything that did not go as expected. The first game day almost always finds an alarm that never fired, a runbook step that is out of date, or a failover that needs a manual step nobody remembered.
For an automotive engineer, none of this is new in spirit. An FMEA asks, for each component, how it can fail, what the effect is and how it is detected; fault-injection testing on a HIL rig then proves that the detection and the safe reaction really work. Chaos engineering is the same discipline applied to a distributed system, with two differences: the system changes every day, so the experiments must run continuously, and the test bench is, carefully, production itself.
What I take away
- At scale, failure is a rate, not an event. With thousands of parts, something is always broken; design for that as the normal state.
- Name the failure mode. Crashes are easy; slow, wrong and partial failures are what hurt. Check health the way users experience it.
- Do the availability arithmetic. Series parts multiply availabilities, parallel parts multiply unavailabilities, and both rules assume independence you have to build.
- Redundancy needs a plan for failover. Spare capacity for active-active, and quorum plus fencing for active-passive, or you get split brain instead of safety.
- Limit the blast radius. Cells and staged rollouts protect against the most common cause of outages: your own changes. An OTA campaign goes out in stages with automatic stop gates.
- Shed and degrade before you collapse. A fast “try later” beats a slow timeout; a limp-home mode beats a full stop.
- Choose RPO and RTO per kind of data, and restore your backups. A backup that has never been restored is a hope, not a backup.
- Test failure on purpose. Game days and chaos experiments are the FMEA and fault-injection tests of distributed systems.
With this part, the series has covered the building blocks, bottlenecks, scaling, external dependencies and failure. Together they give an embedded engineer most of the vocabulary needed to read a backend design critically, and to notice how many of its ideas, from watchdogs to limp-home modes to safe states, were already familiar.
Further watching and reading
- Gaurav Sen, How to avoid cascading failures in a distributed system: load shedding, queues and how one failure triggers the next.
- Betsy Beyer et al. (eds.), Site Reliability Engineering, Google, especially Embracing Risk and Addressing Cascading Failures; free to read online.
- AWS, Reducing the Scope of Impact with Cell-Based Architecture.
- Ryan Huang et al., Gray Failure: The Achilles’ Heel of Cloud-Scale Systems, HotOS 2017.
- Principles of Chaos Engineering.
- GitLab, Postmortem of database outage of January 31: an honest, detailed account worth reading in full.
Sources
- Backblaze, Drive Stats for 2025, 12 February 2026
- Huang et al., Gray Failure: The Achilles’ Heel of Cloud-Scale Systems, HotOS 2017
- Google SRE book, Chapter 3: Embracing Risk
- Google SRE book, Chapter 22: Addressing Cascading Failures
- AWS, What is a cell-based architecture?
- AWS, Disaster Recovery of Workloads on AWS: Business Continuity Plan (RTO and RPO)
- GitLab, Postmortem of database outage of January 31, 10 February 2017
- Netflix Technology Blog, The Netflix Simian Army, 19 July 2011
- Principles of Chaos Engineering
- System Design series: Part 1, Part 2, Part 3, Part 4
The OTA backend, its cells, rollout stages and recovery objectives are illustrative, not a description of any carmaker’s system. Downtime figures in the nines table are computed from the percentages.
Cover photo by Jametlene Reskp on Unsplash.
Pingback: System Design: 1 - The Building Blocks, Explained Through a Car Update Server - Taner Güngör