Reference

Cheatsheet

Everything you should be able to say from memory, on one printable page.

Numbers to remember

Approximate values: good enough for estimates, always say "I'd measure".

QuantityValueShortcut
Seconds per day86,400 ≈ 10⁵1M requests/day ≈ 12/s
Seconds per month≈ 2.6M100M/month ≈ 40/s
Seconds per year≈ 31.5M
2¹⁰ / 2²⁰ / 2³⁰ / 2⁴⁰≈ thousand / million / billion / trillionKB → MB → GB → TB
Main memory reference~100 ns
SSD random read~100 µs
Round trip inside a datacenter~0.5 ms
Redis GET over the network~0.5–1 ms
Indexed database read~1–10 ms
HDD seek~10 ms
Cross-continent round trip~100–150 ms
One Redis instance~100K simple ops/s
One Postgres primarythousands to tens of thousands of simple queries/sdepends on the query
Typical web API instancehundreds to a few thousand req/smeasure yours

Formulas

WhatFormula
Average QPSDAU × actions per user ÷ 86,400
Peak QPSaverage × 2–5 (10+ for launches and sales)
Storagewrites/day × bytes × days retained × replicas
BandwidthQPS × payload size
Cache memory (80/20)daily reads × 20% × item size
Serverspeak QPS ÷ (per-server QPS × target utilization ~0.6)
Average latency with a cacheh·c + (1−h)·(c+d)
Serial availabilitya₁ × a₂ × …
Parallel availability1 − (1−a₁)(1−a₂)…
Quorum overlapR + W > N
Little's lawitems in system = arrival rate × time in system

Availability

AvailabilityDowntime per yearPer month
99%3.65 days7.3 h
99.9%8.77 h43.8 min
99.99%52.6 min4.4 min
99.999%5.26 min26 s

Decision tables

If you need…Reach for
Transactions, constraints, ad-hoc queriesPostgreSQL / MySQL
Flexible documents read togetherMongoDB
Key lookups at huge scaleRedis, DynamoDB
Write-heavy, time-ordered dataCassandra / ScyllaDB
Files and mediaS3 + CDN
Full-text searchElasticsearch / OpenSearch
Analytics over eventsClickHouse
Fire-and-forget jobs with retriesA work queue (SQS, RabbitMQ, BullMQ)
Ordered, replayable event streamsKafka
Server → browser updatesSSE
Two-way real timeWebSockets
Provider → your server eventsWebhooks

The 45-minute interview checklist

  • Functional and non-functional requirements, scope cut aloud
  • Numbers: , peak, storage, bandwidth
  • API: endpoints, status codes, pagination,
  • Data model and the store for each part
  • Diagram with a numbered request flow
  • Two deep dives where the risk is highest
  • Failure modes: what breaks, what the user sees, how you recover
  • Trade-offs: what you chose, what you gave up, when you'd switch
  • One-minute summary