Core Concepts
Availability
Translate an availability target into a failure budget and check whether the service can keep up after losing a machine or zone.
An availability target can set how much of the time a service must be usable or what share of eligible requests must succeed. Fault tolerance keeps required operations available when a component fails. Check that the machines that stay healthy can handle the traffic they take over.
Three related words
| Term | Meaning | What to ask |
|---|---|---|
| Availability | The fraction of time a service is usable, or the fraction of eligible requests that succeed | How often can a player submit a move successfully? |
| Reliability | How likely a system or component is to keep working without interruption over an interval | How long does it typically run between failures? |
| Fault tolerance | The system keeps serving when part of it fails | Can another server take over this game? |
A service that fails occasionally can still be available for nearly all of the month when it recovers quickly. Mean time to restore (MTTR) is the average time to restore service after an interruption. This includes detecting the fault and getting requests onto a working path. In a simple pattern of alternating working and failed intervals, time-based availability is average working time divided by average working time plus average recovery time.
What the nines cost
A service-level objective (SLO) is a target over a specified window. Start by saying how you measure it.
| Time-based target | Downtime allowed in an average month |
|---|---|
| 99% | About 7.3 hours |
| 99.9% | About 43.8 minutes |
| 99.99% | About 4.4 minutes |
The table uses one twelfth of a 365-day year. At 99.9%, a single 20-minute interruption spends almost half that month's budget.
For a request-based target of 99.9%, one million eligible requests allow up to 1,000 failures. A partial outage at peak can spend that budget quickly, even if the service answers many other requests. Define which requests count and what a successful result means. Google SRE on time-based and aggregate availability
Watch two incidents spend the time-based budget and see what shorter recovery changes.
Failure domains
A failure domain is a group of components that can fail together. A broken machine can take down every process on it. A cloud provider's availability zone (AZ) is a separate operating location within a region, designed to isolate infrastructure failures. A fault affecting one zone can take down every copy placed there.
Place a copy in another zone when the service must survive the loss of a full zone. Region loss calls for a broader recovery plan. The recovery time objective (RTO) is how long service can be down. The recovery point objective (RPO) is how much recent data the service can afford to lose, expressed as a time window.
Redundancy that actually absorbs load
Failover moves the work to a healthy component. For an application server, that can mean routing new requests to another instance. For a database, it can mean selecting a replacement writer. The system also needs to stop the old writer from accepting new writes after it loses authority. That safeguard is called fencing. Data Replication follows the database case.
Suppose three zones each handle 60 requests/s and each can handle 100 requests/s. When one zone fails, the two survivors each take 90 requests/s. Each now carries half of the regional traffic and uses 90% of its capacity.
That spare capacity is N-1 headroom. The system can meet the stated demand after losing one domain. In this three-zone example, each survivor handles 1.5 times its previous load. Check the resource that limits the remaining path, such as the database writer, as well as the application fleet.
Interview habit
- Define the target and say how you would measure it.
- Name the failure the service needs to survive.
- Trace how you detect it, move requests, and prevent two writers if the path changes authority.
- Check that survivors can take the load and say how long the switch might take.
- State how much recent data the recovery can lose.
Common mix-ups
- Counting a spare replica as recovery without testing the switch.
- Sizing each zone for its normal share of traffic with no room for a larger share.
- Measuring uptime alone when many requests can fail during a partial outage.
- Treating recovery time and data loss as one number.
See also
-
Scalability - separate normal capacity from the capacity you need after a fault.
-
Latency vs Throughput - whether the remaining path still has usable latency.
-
Data Replication - how a standby receives updates and becomes the replacement writer.
-
Write-Ahead Log - local recovery of committed writes after a crash.
-
CAP Theorem - which operations can return a valid result when live nodes cannot reach one another.
-
Estimations - sizing the spare capacity for a failover.
-
Load Balancing - choosing which healthy instance receives each request.
-
Disaster Recovery - setting recovery objectives and testing restore.
-
Resilience Patterns - budget retries and isolate damage when a dependency slows down.
Used in
- Online Chess - a restarted game server must preserve active games through a change of owner.
- Group Chat with Threads - the send path has a 99.95% availability target and depends on the writer for each channel.
- Coding Interview Platform - a participant can reconnect and resume a session after losing a gateway.
- Prompt Playground - one model provider can fail while results from other providers remain available.
Done reading? Mark it so it sticks in your dashboard.