Concept 1 of 61 min
Back-of-the-envelope sizing
Requests a second
| Users | 8,000,000 |
|---|---|
| Requests each | 30 a day |
| Seconds a day | 86,400 |
| Peak | 4 times average |
- A day = 8,000,000 × 30 = 240,000,000
- Average = 240,000,000 ÷ 86,400 ≈ 2,778
- Peak = 2,778 × 4 ≈ 11,111
Size for about 11,111 requests a second at peak, not the 2,778 average.
Storage over 3 years
| Documents a day | 1,000,000 |
|---|---|
| Size | 2 MB |
| Days a year | 365 |
| Years | 3 |
| Replicas | 2 |
- A day = 1,000,000 × 2 = 2,000,000 MB
- That is 2 TB a day
- Total = 2 × 365 × 3 × 2 = 4,380 TB
About 4.4 PB, so storage, not traffic, drives the design.
Video bandwidth
| Viewers | 200,000 |
|---|---|
| Stream | 8 Mbit/s |
- Total = 200,000 × 8 = 1,600,000 Mbit/s
1.6 Tbit/s at once, which only a content delivery network can serve.
Bandwidth counts in bits, 8 to a byte. Know the orders of magnitude: about 100 ns for a main-memory read, 100 µs for a random 4 KB SSD (solid-state drive) read, 80 ms for a transatlantic round trip.
Interviewers want the method and a sensible order of magnitude, not decimals. Sizing on the average leaves the system down every evening.
Forgetting replicas, or counting the original twice, is the usual storage slip. Video bitrates are quoted in bits per second while disks are in bytes, which is a factor of 8.
A random SSD read is about 1,000 times slower than memory and a transatlantic round trip nearly a million times, which is why caches, and data kept close to users, matter.
- Sizing for the average instead of the peak.
- Forgetting the replicas in storage.
- Confusing bits and bytes.
Design a service that stores every trade a bank books for 7 years. Where would you start?
A complete answer covers
- Estimate trades a day, size per trade and peak bursts.
- Work out storage over 7 years with replicas.
- Ask about read patterns: audits, regulators, daily reports.
- Then choose storage tiers: recent data fast, old data cheap but searchable.
Also in our technical interviews, on camera, with a score.
Concept 2 of 61 min
Caching: hit rates, expiry, stampedes and hashing
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 3 of 61 min
Replicas, consistency and availability
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 4 of 61 min
Retries, idempotency, queues and back-pressure
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 5 of 61 min
Queries, storage engines, IDs and service boundaries
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 6 of 61 min
AdvancedTail latency: why fan-out makes rare delays common
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inRecap
- Size for the peak: requests a day ÷ 86,400 × peak factor; storage × days × replicas; bandwidth in bits, not bytes.
- Average cache read = lookup + miss rate × database time; expire with a TTL (time to live) that matches the staleness you accept; let one request rebuild a hot key.
- Replicas lag: read your own writes from the primary; under a partition choose consistency or availability; series multiply availabilities, redundancy multiplies failures.
- Retries need idempotency keys, backoff with jitter and circuit breakers; queues absorb slow work but grow when consumers fall behind.
- Shard by a hash, page with keysets, fetch in batches, not N+1, and keep a small team on a monolith.
25 questions on System design
Timed, like the real one, drawn from a bank of 33. Every answer explained.