Topic 5 of 6 · 5 min read
Failure modes and single points of failure
Goal: Identify the single point of failure and the missing timeout in a written design, and propose the cheapest mitigation.
For each box in a design, ask what happens when it is slow, down or wrong, and find the one box whose failure takes everything with it. Designs usually describe the working system. Reviewers describe the broken one.
Check yourself · 1 of 3
What is a single point of failure?
Why it matters
In a system made of several parts, something is always failing somewhere: a disk, a deploy, a slow third-party API. The question is whether the failure stays small. A call with no timeout can hold a thread forever. Many such threads exhaust the pool and a slow dependency becomes a full outage. Google's SRE book describes this pattern as a cascading failure.
How to review it
- Draw the dependency list. For each request, which services and stores must be up for it to succeed?
- Find single points of failure (SPOF). A component with one instance and no fallback: one database, one load balancer, one queue broker, one person with the deploy key.
- Check every remote call for a timeout. "No timeout stated" is a finding. The timeout should be shorter than the caller's own deadline.
- Check retries. A retry helps with a brief glitch and hurts during an overload. Look for limits, backoff, and a circuit breaker that stops calling a dependency that keeps failing.
- Check partial failure. If step two of three fails, is the system left in a half-done state? Payment taken, order not created.
- Check replication lag. A user saves a profile, the next page reads from a replica that has not caught up, and the old data appears. Read from the primary after a write, or accept and explain the lag.
- Choose the cheapest mitigation. Often it is a timeout, a second instance, a read-only fallback page, or a tested backup restore, not a rebuild.
Before and after
Weak:
The checkout service calls the tax API, then the payment API,
then writes the order.
Better:
Tax API: 2 s timeout, one retry, fallback to the cached rate
table. Payment API: 5 s timeout, idempotency key, no automatic
retry after a timeout without checking status. Order write:
same transaction as the payment record.
What goes wrong
- Missing timeouts. One slow service freezes all callers.
- Retry storms. Every client retries at once and the recovering service is flattened again.
- Untested backups. A backup that has never been restored is a hope, not a mitigation.
- Everything behind one database. No replica, no failover, no tested restore.
Examples
The slow dependency
A product page calls a recommendations service with no timeout. The service slows to 30 seconds per call. Threads pile up waiting, the page server runs out of workers and the whole site is down for a feature that is optional. A one second timeout and an empty recommendations box would have kept the page up.
Lag after save
A user edits their display name and is redirected to a profile page read from a replica. The replica is a few seconds behind, so the old name shows and the user saves again. Reading from the primary for a short time after a write fixes it cheaply.
Key points
- Ask for each component what happens when it is slow, down or wrong.
- A single point of failure is any component with one instance and no fallback.
- Every remote call needs a stated timeout that is shorter than the caller's own deadline.
- Retries need limits and backoff, and a circuit breaker protects a failing dependency.
- Pick the cheapest mitigation that removes the biggest risk, and test the restore.
Common mistakes
- Reviewing only the working path and never asking what a dependency's outage does.
- Accepting a design with remote calls and no timeouts.
- Counting retries as a fix without limits, backoff or a circuit breaker.
- Calling a system highly available when one database has no replica or tested restore.
Check yourself · 2 of 3
A service calls a third-party API with no timeout, and the API becomes very slow. What is the likely effect?
Check yourself · 3 of 3
Which is usually the cheapest first mitigation for a database that is a single point of failure?
Practice items, not counted towards your mastery.
Start here
- The System Design Primer (opens in a new tab)ToolFree
A free, long-lived study guide covering scaling, caching, queues and back-of-envelope estimates.
- Site Reliability Engineering (Google SRE book) (opens in a new tab)BookFree
Google's free book on running reliable services: monitoring, overload, failure and release practice.
- Cloud design patterns (Azure Architecture Center) (opens in a new tab)DocsFree
A catalogue of named patterns such as cache-aside, retry, circuit breaker and queue-based load leveling.
More for this topic
- Addressing Cascading Failures (Google SRE book) (opens in a new tab)BookFree
How overload, retries and missing timeouts spread one failure across a whole system.