Contents
Start
Course · 01
How do you size a system before you build it?
This page teaches the base words and the quick maths every system design interview uses: how systems grow, how fast they answer, how often they break, and how to guess their size on a whiteboard.
System design is about trade-offs, and you need a few numbers and words to talk about them.
- Grow by adding more machines (horizontal), which only works if the servers keep no memory of users (stateless).
- Judge speed by percentiles like p99, not averages. If each server is slow 1% of the time, fanning out to 100 of them makes 63% of requests slow.
- Each extra "nine" of availability cuts allowed downtime by 10x: 99.99% is 52.6 minutes a year.
- Estimate with round numbers: a day is about 100,000 seconds, so QPS ≈ requests per day ÷ 100,000.
—Words you need
Scale
01What a system design interview tests
You get a vague task like "design Instagram". There is no single right answer. The interviewer watches how you think.
For an SDE-2 (a mid-level engineer), they look for four things. Can you ask good questions first? Can you draw a working design? Can you size it with numbers? Can you explain why you picked each part, and what it costs?
| Signal | What a strong answer shows | What a weak answer shows |
|---|---|---|
| Requirements | Asks about users, features, scale, speed goals before drawing | Starts drawing boxes in minute one |
| Estimation | Turns users into QPS, storage and bandwidth with round numbers | Says "it needs to scale" with no numbers |
| High-level design | Simple boxes that work end to end first | Kafka, Redis and microservices with no reason |
| Deep dive | Goes deep on the hardest part (hot keys, consistency, fan-out) | Stays shallow everywhere |
| Trade-offs | "I pick X because Y; it costs Z" | "X is the best" |
Every later page gives you parts. This page gives you the words and numbers to argue about them.
Source: common interview practice (no official spec). See page 15 of this course.
02Vertical vs horizontal scaling
Vertical scaling (scale up) means a bigger machine: more CPU, more memory. It is simple. But one machine has a size limit, and it is still one machine that can die.
Horizontal scaling (scale out) means more machines of the same size. A load balancer (a traffic cop) spreads requests across them.
| Question | Vertical (scale up) | Horizontal (scale out) |
|---|---|---|
| How you grow | Bigger CPU, more RAM, faster disk | More machines behind a load balancer |
| Code changes | No, usually none | Yes: servers must be stateless |
| Upper limit | The biggest machine you can buy | Very high, until a shared part (often the database) is the bottleneck |
| Failure | One machine = one point of failure | One dies, the others carry on |
| Cost curve | Big machines cost more per unit of power | Many small, cheap machines |
| Good first step for | Databases, early-stage apps | Web and API servers |
In an interview, scale web servers out, and say clearly what you do about the database, because that is where scale-out stops.
Source: learn.microsoft.com · Design to scale out (checked 2026-10-25)
03Stateless vs stateful services
State is data a server remembers between requests, like "who is logged in" or "what is in the cart".
A stateful server keeps it in its own memory. Then the user must always come back to that same server. This is called a sticky session.
A stateless server keeps nothing. It reads state from a shared store, like Redis (a fast in-memory database). Any server can answer any request.
| Part of the system | Usually | Why |
|---|---|---|
| Web / API servers | Stateless | Easy to add, remove and restart |
| Databases, caches, queues | Stateful | Their whole job is to keep data; scale them with replication and sharding (page 07) |
| WebSocket / game servers | Stateful (live connection) | A live connection is tied to one machine; route by user ID |
Push state down into a few special stores. Keep everything above them stateless, so it can scale out freely.
Sources: 12factor.net · VI. Processes; Azure Architecture Center · Design to scale out
Speed
04Latency vs throughput
Latency is time for one request, in milliseconds (ms). Throughput is work done per second, like requests per second (RPS) or MB per second.
They are linked but not the same. You can raise throughput by doing many requests in parallel, while each one is still slow.
| You want | Typical tools | Cost |
|---|---|---|
| Lower latency | Cache, CDN close to users, fewer network hops, indexes | More memory, stale data risk |
| Higher throughput | More servers, batching, async queues, parallel work | Batching and queues often add latency |
Always say which one you are optimising. "Fast" is not a requirement; "p99 under 200 ms at 10,000 RPS" is.
Source: Little's law; see section 06.
05Percentiles and tail latency
Sort all request times from fast to slow. p50 (the median) is the middle one. p95 is the one where 95% are faster. p99: 99% are faster.
The tail is the slow end, above p99. An average hides the shape. It can say 30 ms when 1 user in 100 waited 2 seconds.
The tail gets worse with fan-out: one user request that calls many servers at once. The user waits for the slowest one.
Chance a user request is slow, by fan-out size
Each server is slow (1 s) on 1% of calls. Chance = 1 − 0.99ⁿ. Hover a row for the exact number.
Show the full table
| Servers called in parallel (n) | Chance at least one is slow |
|---|---|
| 1 | 1.0% |
| 10 | 9.6% |
| 100 | 63.4% |
1 − 0.99^100 = 0.634 (I computed it; it assumes servers are slow independently). Fixes from the paper include "hedged requests" (send a backup copy after a short wait and use whichever answers first). The Google SRE book adds: "a high-order percentile, such as the 99th or 99.9th, shows you a plausible worst-case value", while averaging "obscures" a long tail. Sources: The Tail at Scale, SRE book ch. 4.Set goals on p99, not the average. In fan-out systems, the p99 of one server becomes the normal case for users.
Sources: Dean & Barroso, The Tail at Scale, CACM 2013 (63% figure confirmed via the morning paper summary); sre.google · Service Level Objectives
06Little's Law
Little's Law is one line: L = λ × W.
- L: average number of requests inside the system right now (in flight).
- λ (lambda): average arrival rate, like requests per second.
- W: average time each request spends inside (latency).
Interview use: "We get 1,000 RPS and each call takes 200 ms. How many threads or connections do we need?" About 200 busy at once, plus headroom.
If latency doubles at the same traffic, the number of busy connections doubles too. That is how a slow database empties a connection pool.
Source: en.wikipedia.org · Little's law, citing Little (1961), Operations Research 9(3)
Reliability
07Availability and the "nines"
Availability is the share of time a service works. People say it in "nines": 99.9% is "three nines".
The maths is simple. Allowed downtime = (1 − availability) × the time window.
Allowed downtime per year, in minutes
Formula: (1 − A) × 365 × 24 × 60. Each step down is ten times smaller. Hover for the exact number.
Show the full table
| Availability | Per year | Per 30-day month | Per day |
|---|---|---|---|
| 99% | 3.65 days | 7.2 hours | 14.4 min |
| 99.9% | 8.76 hours | 43.2 min | 1.44 min |
| 99.95% | 4.38 hours | 21.6 min | 43.2 s |
| 99.99% | 52.6 min | 4.32 min | 8.64 s |
| 99.999% | 5.26 min | 25.9 s | 0.87 s |
Parts in a chain multiply. Two parts at 99.9% in series (both must work) give 0.999 × 0.999 = 99.8%. Two copies in parallel (either one is enough) give 1 − 0.001² = 99.9999%, but only if they fail independently.
# series: every part must be up
A_total = A1 × A2 × A3 ...
# parallel: at least one copy must be up (independent failures)
A_total = 1 − (1 − A)^n
Every dependency in the request path lowers your availability. Redundancy raises it, but only across failure domains that are truly separate.
Sources: sre.google · Availability Table; sre.google · Embracing Risk; my own arithmetic (checked with Python)
08SLI, SLO and SLA
| Term | Google SRE book definition | Example |
|---|---|---|
| SLI (indicator) | "a carefully defined quantitative measure of some aspect of the level of service" | Share of requests that return non-5xx in under 300 ms |
| SLO (objective) | "a target value or range of values for a service level that is measured by an SLI" | That SLI ≥ 99.9% over 28 days |
| SLA (agreement) | "an explicit or implicit contract with your users that includes consequences of meeting (or missing) the SLOs they contain" | Below 99.5% in a month → service credit refund |
The error budget is 100% minus the SLO. At 99.9%, you may "spend" 0.1% of requests on failures, for example on risky releases.
In an interview, turn "it should be fast and reliable" into one SLI with one SLO, such as "p99 read latency under 200 ms, 99.9% of the time".
09Single point of failure and redundancy
A single point of failure (SPOF) is any part with no backup. If it stops, the whole system stops.
The fix is redundancy: run two or more copies, and switch to a healthy one when one dies. That switch is called failover.
| Layer | Common SPOF | Usual redundancy |
|---|---|---|
| Entry | One load balancer, one DNS provider | Load balancer pair or managed LB; multiple DNS name servers |
| App | One server | N stateless copies across zones |
| Data | One database | Primary + replicas with automatic failover (page 07) |
| Location | One data center or zone | Spread across availability zones or regions |
| People / config | One bad deploy to every server at once | Staged (canary) rollouts |
After you draw a design, point at each box and ask "what if this dies?" Interviewers expect you to do this unprompted.
Source: learn.microsoft.com · Design to scale out ("Consider scaling for redundancy")
Estimation
10Numbers to know: powers of two and latency
Powers of two and data sizes
| Power | Exact | About | Name |
|---|---|---|---|
| 2¹⁰ | 1,024 | 1 thousand | KB (kilobyte) |
| 2²⁰ | 1,048,576 | 1 million | MB |
| 2³⁰ | 1,073,741,824 | 1 billion | GB |
| 2⁴⁰ | ≈1.1 × 10¹² | 1 trillion | TB |
| 2⁵⁰ | ≈1.13 × 10¹⁵ | 1 quadrillion | PB |
| Thing | Size | Note |
|---|---|---|
| ASCII character | 1 byte | UTF-8 non-English text is 2–4 bytes per character |
| 32-bit int | 4 bytes | max about 2.1 billion (signed) |
| 64-bit int / timestamp | 8 bytes | use for IDs at scale |
| UUID | 16 bytes | 128 bits (RFC 9562); 36 characters as text |
Time
| Window | Seconds | Round to |
|---|---|---|
| 1 day | 86,400 | 10⁵ |
| 30-day month | 2,592,000 | 2.5 × 10⁶ |
| 365-day year | 31,536,000 | 3 × 10⁷ |
| 1 million requests per day | ≈11.6 per second | about 12 QPS |
Latency numbers (approximate)
How long common operations take
Bar length is on a log scale (each step is 10x), from Peter Norvig's table. Hover for the exact time.
Show the full table
| Operation | Time (ns) | Human scale |
|---|---|---|
| Fetch from L1 cache | 0.5 | half a nanosecond |
| Branch misprediction | 5 | |
| Fetch from L2 cache | 7 | |
| Mutex lock/unlock | 25 | |
| Fetch from main memory | 100 | 0.1 µs |
| Send 2 KB over 1 Gbps network | 20,000 | 20 µs |
| Read 1 MB sequentially from memory | 250,000 | 0.25 ms |
| Disk seek (new location) | 8,000,000 | 8 ms |
| Read 1 MB sequentially from disk | 20,000,000 | 20 ms |
| Send packet US → Europe → US | 150,000,000 | 150 ms |
Memory is about 80x faster than disk for a 1 MB read in this table. That ratio is why caches exist (page 04).
Sources: Peter Norvig · Teach Yourself Programming in Ten Years; RFC 9562 (UUIDs, 128 bits); powers of two and time are arithmetic
11Worked estimate: a photo-sharing app
Write your assumptions first, out loud. The interviewer can then correct them. All numbers below are my assumptions, not real data from any app.
Step 1: assumptions
| Assumption | Value | Why this guess |
|---|---|---|
| Daily active users (DAU) | 10 million | Mid-size app |
| Photos uploaded per user per day | 2 | Most users only view |
| Average stored photo size | 2 MB | Compressed phone photo |
| Photos viewed per user per day | 50 | Scrolling a feed |
| Size sent per view | 200 KB | Feed-sized copy, not the original |
| Copies kept of each photo | 3 | Replication for durability |
| Peak ÷ average traffic | 3 | Evening rush; a common rule of thumb |
Step 2: the maths
# Write QPS (uploads)
10M users × 2 uploads = 20M uploads/day
20M ÷ 86,400 s ≈ 231 QPS average (shortcut: 20M ÷ 10^5 = 200)
231 × 3 ≈ 700 QPS at peak
# Read QPS (views)
10M users × 50 views = 500M views/day
500M ÷ 86,400 s ≈ 5,800 QPS average
5,800 × 3 ≈ 17,400 QPS at peak
# Storage
20M photos × 2 MB = 40 TB per day
40 TB × 365 = 14.6 PB per year
14.6 PB × 3 copies ≈ 44 PB per year of raw disk
# Bandwidth
In: 40 TB/day ÷ 86,400 ≈ 463 MB/s ≈ 3.7 Gbps
Out: 500M × 200 KB = 100 TB/day ÷ 86,400 ≈ 1.16 GB/s ≈ 9.3 Gbps
Step 3: what the numbers tell you
Average reads vs writes per second
From the maths above. Reads are 25 times writes.
Show the full table
| Result | Average | Peak (×3) | Design impact |
|---|---|---|---|
| Read QPS | 5,787 | 17,361 | Read-heavy: CDN + cache in front of storage |
| Write QPS | 231 | 694 | Small; one metadata DB primary can take it |
| New storage per year | 43.8 PB | — | Object storage (like S3), not a database |
| Egress | 9.3 Gbps | 28 Gbps | Serve images from a CDN |
The estimate is only useful if you then say what it changes: "reads are 25x writes, so I put a CDN and cache in front".
Source: arithmetic on stated assumptions; 86,400 s/day is exact.
12Read-heavy vs write-heavy systems
Most apps read far more than they write. A news feed is read many times per post. Some systems are the other way: logging, metrics, chat messages, IoT sensors.
| Shape | Examples | Tools that help | Trade-off |
|---|---|---|---|
| Read-heavy | Social feed, product catalog, URL shortener | Cache (page 04), CDN, read replicas (page 07), denormalised data | Stale reads; cache invalidation is hard |
| Write-heavy | Logs, metrics, clicks, chat, sensor data | Append-only storage (LSM trees, page 06), queues to absorb bursts (page 09), batching, sharding | Reads get slower or need extra work |
| Both heavy | Ride-hailing locations, stock trading | Shard by key, keep hot data in memory | Highest cost and complexity |
Say the ratio out loud ("about 25:1 reads to writes") and let it drive your first design choice.
Source: summary of this course's pages 04, 06, 07 and 09.
Practice
—When to use what
| Situation | Pick | Why |
|---|---|---|
| Early product, one server is at 80% CPU | Scale up first | No code change; buys time cheaply |
| Web/API tier must survive a server crash | Scale out, 2+ stateless copies across zones | Removes the SPOF and adds capacity |
| Servers keep login sessions in memory | Move sessions to Redis or signed tokens | Lets any server answer; no sticky sessions |
| Writing a speed goal | p99 (and p50) latency SLO | Averages hide the tail users feel |
| Request calls many backends in parallel | Hedged requests, timeouts, fewer fan-out calls | Tail latency multiplies with fan-out |
| Sizing a thread or DB connection pool | Little's Law: λ × W, plus headroom | Gives the in-flight count directly |
| Choosing an availability target | The lowest nines users truly need | Each nine costs about 10x less downtime budget and more money |
| Reads ≫ writes | Cache, CDN, read replicas | Serve repeats without touching the primary |
| Writes ≫ reads | Queue + batch + shard, append-only storage | Spread and cheapen each write |
—Common mistakes
—Interview questions
Show answer
Vertical scaling makes one machine bigger (more CPU, RAM). Horizontal scaling adds more machines behind a load balancer.
Vertical is simple and needs no code change, but it has a hard ceiling and the machine is still a single point of failure. Horizontal has a much higher ceiling and survives a machine dying, but the app must be stateless and you now need load balancing, health checks and deployment across many nodes.
I usually scale the stateless web tier out from day one (2+ instances for redundancy) and scale the database up first, because databases are harder to split. Follow-up: "What do you do when the database maxes out?" → read replicas, caching, then sharding.
Show answer
A stateless service keeps no per-user data in its own memory or disk between requests. Session data, carts and uploads live in a shared store (Redis, a database, S3) or in a signed token the client sends.
Why: any instance can serve any request. So the load balancer can use simple round robin, you can add or remove instances freely (autoscaling), and a crash loses nothing. Twelve-Factor calls sticky sessions "a violation".
Trade-off: every request now reads state over the network (a network round trip, instead of a ~100 ns local memory read), and the shared store must itself be made highly available.
Show answer
Latency is the time for one request; throughput is how many requests complete per second.
Batching is the classic trade: if a service waits to collect 100 writes and flushes them together, throughput rises (one disk sync for 100 writes) but each write waits for the batch, so latency rises. Kafka producers do exactly this with a small linger time.
The other direction: running a server at 95% CPU maximises throughput per machine but queueing makes latency spike. That is why we leave headroom, often targeting around 60–70% utilisation (a rule of thumb, not a law).
Show answer
Because the average hides the slow requests that users actually complain about. If 99 requests take 10 ms and one takes 2 s, the average is about 30 ms, which looks great, but 1 in 100 users waits two seconds.
p99 says "99% of requests were this fast or faster". The Google SRE book recommends high percentiles because they show "a plausible worst-case value".
Also, heavy users make many requests per page, so they hit the tail often. I would set SLOs on p50 and p99, and alert on p99.
Show answer
99.9% allows about 43 minutes per 30-day month (0.001 × 30 × 24 × 60 = 43.2). 99.99% allows about 52.6 minutes per year (0.0001 × 525,600).
The quick rule: each extra nine cuts the budget by 10x. Three nines ≈ 8.8 hours a year; four ≈ 53 minutes; five ≈ 5 minutes.
Why it matters: at five nines, a human cannot even get paged and log in before the budget is gone, so recovery must be automatic. These numbers match the Google SRE book's availability table.
Show answer
SLI is the measurement: for example, the fraction of HTTP requests that succeed in under 300 ms. SLO is the internal target on that SLI: 99.9% over a rolling 28 days. SLA is the external contract with consequences: below 99.5% in a month, customers get a 10% credit.
The SLO is stricter than the SLA so the team reacts before money is owed. 100% minus the SLO is the error budget; when it is spent, teams slow down risky launches.
Follow-up: "Why not target 100%?" → it is impossible to reach and the cost explodes; users cannot tell 99.999% from 100% when their own Wi-Fi is less reliable.
Show answer
A SPOF is any component with no redundant copy, so its failure stops the whole system.
Here: the single load balancer and the single MySQL instance. The three app servers are fine if they are stateless and spread over zones. Less obvious ones: one DNS provider, one availability zone, one config or deploy pipeline that pushes a bad change everywhere.
Fixes: managed or paired load balancers, MySQL primary + replica with automatic failover (accepting a few seconds of failover time and possible replication lag), multi-AZ placement, and staged rollouts.
Show answer
L = λ × W: average items in the system equals arrival rate times average time in the system. It holds for long-run averages in a stable system.
Example: the service sends 2,000 queries per second to the database and each holds a connection for 5 ms. L = 2,000 × 0.005 = 10 connections busy on average. I would give the pool maybe 2–3x that for bursts, so 20–30.
The scary part: if a slow query makes W jump to 500 ms, L jumps to 1,000. The pool runs out and requests queue. That is why we set query timeouts and watch pool wait time.
Show answer
The user waits for the slowest of 100. The chance all 100 are fast is 0.99^100 ≈ 37%, so about 63% of user requests take over a second. This is the "Tail at Scale" example from Dean and Barroso.
Fixes: hedged requests (send a second copy after, say, the p95 time and take whichever finishes first; costs a few percent extra load), tied requests, timeouts with partial results ("good enough" search results), reducing fan-out with better partitioning, and fixing the causes of slow outliers (GC pauses, noisy neighbours, background jobs).
Follow-up: "What does hedging cost?" → extra load, roughly the share of requests that hit the hedge threshold.
Show answer
In series both must work: 0.999 × 0.999 ≈ 99.8%. So 10 dependencies at 99.9% each give only about 99.0%.
Two independent copies of one service in parallel: 1 − 0.001² = 99.9999%. Then the chain of two such pairs is about 99.9998%.
The catch is "independent". Copies in the same zone, on the same version, sharing the same database, fail together. Real gains come from spreading across zones, staged deploys and removing shared dependencies. This is why microservice chains often have worse availability than a monolith unless calls are made optional or async.
Show answer
Writes: 100M ÷ (30 × 86,400 ≈ 2.6M s) ≈ 40 writes/s; peak ×3 ≈ 120. Assume reads are 100:1 → about 4,000 reads/s average, 12,000 peak.
Storage: each record (short code 7 B, long URL ~100 B, timestamps, user ID) ≈ 500 B with overhead. 100M × 500 B = 50 GB a month, about 600 GB a year, 3 TB over five years.
So what: writes are tiny, reads are cache-friendly (hot links), and the data fits on one machine for years. I would use a cache in front of a key-value store and not shard on day one. All inputs are assumptions I would confirm with the interviewer.
Show answer
Requests per day = 20M. Average QPS = 20M ÷ 86,400 ≈ 230; peak at 3x ≈ 700.
Servers depend on cost per request, which I would ask about or measure. If one instance handles about 500 RPS for this workload at safe CPU (an assumption to load-test), then 700 ÷ 500 → 2 servers, and I would run 3 for redundancy across zones (N+1).
The point is to show the chain: users → requests/day → average → peak → per-server capacity → count + redundancy. The per-server capacity must come from a load test, not a guess.
Show answer
Users get logged out or lose carts at random, because request 2 lands on a server that does not have the session from request 1. In-memory caches also diverge between servers.
Quick fix: sticky sessions (LB pins a user to one server by cookie). It works, but load becomes uneven, a server crash still loses those sessions, and draining servers for deploys is slow.
Proper fix: move session state to Redis/Memcached with a TTL, or use signed tokens (like JWT) so the server needs no session store. Then any server can answer and autoscaling just works.
Show answer
1,000,000 × 2 Mbps = 2,000,000 Mbps = 2 Tbps (terabits per second). In bytes that is 250 GB/s.
No single data center link or server fleet serves that cheaply. So the design must use a CDN with edge caches close to viewers, and pre-encoded segments at several bitrates so clients can step down on bad networks.
Common slip: mixing bits and bytes. Network speeds are quoted in bits; storage in bytes. Divide bits by 8.
Show answer
Because requests start waiting in a queue. Near full use, any small burst arrives faster than the server can drain it, and the queue grows. In simple queueing models, waiting time grows roughly like 1 ÷ (1 − utilisation): at 50% it is modest; at 90% it is about 5x worse than at 50%; at 99% it explodes.
By Little's Law, more time waiting means more requests in flight, which uses up threads and connections, which causes timeouts and retries, which adds load: a feedback loop.
So we keep headroom, autoscale on queue length or latency (not only CPU), and shed load (return 429 or 503) instead of letting queues grow without limit.
Show answer
The monthly budget at 99.9% is about 43 minutes of full downtime (or 0.1% of requests). Using 80% by day 10 means we are burning about 2.4x faster than sustainable.
Actions, per the SRE error-budget idea: freeze or slow risky launches, put engineers on reliability work, find the top causes of bad events, and add burn-rate alerts (alert when the budget would run out in hours or days, not when it is already gone).
Also check that the SLI is right: if users are happy, maybe the SLO is too strict. The budget is a tool to balance speed and reliability, not a punishment.
Show answer
Messages: 50M × 40 = 2B a day ≈ 23,000 writes/s average, about 70,000 peak. That is write-heavy and too much for one SQL primary, so I would shard by conversation ID and use a store good at appends (for example Cassandra-style wide rows).
Storage: about 100 B of text + 100 B metadata ≈ 200 B per message → 400 GB a day → 146 TB a year, ×3 replicas ≈ 440 TB a year. Media goes to object storage instead.
Connections: 50M daily users, maybe 10M online at once, each holding a WebSocket. At an assumed 50,000–100,000 connections per gateway server, that is 100–200 gateway servers. All inputs are assumptions to confirm.
Show answer
1) Measure first: find the actual bottleneck (CPU, DB queries, network). 2) Separate the database onto its own machine and scale it up. 3) Make the app stateless (sessions to Redis) and run several copies behind a load balancer across zones. 4) Add a cache for hot reads and a CDN for static files; this often removes most DB reads. 5) Add read replicas. 6) Move slow work (email, image resize) to a queue and workers. 7) Only then shard the database, because sharding is costly to undo.
Each step removes the current bottleneck and a SPOF. I would set p99 and availability SLOs first so I know when a step is "done".
—Cheat sheet
| Fact | Value | Source |
|---|---|---|
| Seconds per day | 86,400 ≈ 10⁵ | arithmetic |
| 1M requests/day | ≈ 12 QPS | arithmetic |
| 2¹⁰, 2²⁰, 2³⁰, 2⁴⁰ | ≈ thousand, million, billion, trillion (KB, MB, GB, TB) | arithmetic |
| 99.9% downtime | 8.76 h/year, 43.2 min/month | SRE book |
| 99.99% downtime | 52.6 min/year, 4.32 min/month | SRE book |
| 99.999% downtime | 5.26 min/year | SRE book |
| Series availability | multiply: A1 × A2 | probability |
| Parallel availability | 1 − (1 − A)ⁿ, if independent | probability |
| Little's Law | L = λ × W | Little 1961 |
| Fan-out tail | 1 − 0.99¹⁰⁰ ≈ 63% | Tail at Scale |
| Main memory fetch | ≈ 100 ns | Norvig |
| 1 MB from memory vs disk | 250 µs vs 20 ms | Norvig |
| US ↔ Europe round trip | ≈ 150 ms | Norvig |
| Bits vs bytes | 1 GB/s = 8 Gbps | arithmetic |
—Sources
| What | Where |
|---|---|
| Availability table (nines) | sre.google/sre-book/availability-table |
| Time-based vs request-based availability | sre.google/sre-book/embracing-risk |
| SLI / SLO / SLA definitions, percentiles | sre.google/sre-book/service-level-objectives |
| Tail latency and fan-out (63%) | Dean & Barroso, The Tail at Scale, CACM 2013; summary at blog.acolyer.org |
| Little's Law | Wikipedia, citing Little (1961) Operations Research 9(3):383–387 |
| Scale out, stickiness, bottlenecks, zones | Azure Architecture Center · Design to scale out |
| Stateless processes, sticky sessions | 12factor.net/processes |
| Latency numbers (approximate) | Peter Norvig · Teach Yourself Programming in Ten Years |
| UUID size | RFC 9562 |
| Photo-app and other estimates | My arithmetic on stated assumptions (not data from any real app) |