Source: answers/day-02-latency-throughput-numbers-review.md

Day 2 Review — Latency, Throughput & Numbers — 2026-07-22 (final)

Final score: 7.5 / 9 (83%) Verdict: Strong. Same trajectory as Day 1. You're building consistent 83% depth — solid FAANG-track pace.


Question-by-question

Q1 (MCQ) — Latency vs Throughput ✅ 1.0 / 1.0

B — Correct. Latency = time per op, throughput = rate.

Q2 (MCQ) — Little's Law ✅ 1.0 / 1.0

B (200) — Correct. L = λ × W = 1000 × 0.2 = 200. Clean application.

Q3 (MCQ) — Tail latency amplification ❌ 0.0 / 1.0 ← highest-priority learning

Your answer: A (~1%) — Incorrect. Correct: C (~63%).

You know the formula (Q7 proves it) but didn't reach for it here. The habit to build:

The moment you hear "fan-out to N services," compute 1 − (1−p)^N.

If N=100 and P99 = 100 ms, then 63% of user requests hit at least one slow response. Your backend P99 becomes the user's P50. This is the reason FAANG obsesses over tail latencies.

Interview line to memorize:

"If my callers fan out to N of my instances and want P50 < X, my instance needs P(100/N) < X."

Q4 (T/F) — Bandwidth vs latency ✅ 0.9 / 1.0

False — Correct. Cleaner phrasing to lock in:

"Bandwidth and latency are orthogonal. Wider pipe → more data per second; single packet still needs the same travel time."

Q5 (T/F) — Batching trade-off ✅ 1.0 / 1.0

True — Correct with correct trade-off reasoning.

Q6 (Short) — Jeff Dean numbers ✅ 1.0 / 1.0

All 5 anchors correct (0.5 ns, 100 ns, 250 µs, 500 µs, 150 ms). These are the most-quoted numbers in FAANG design interviews.

Q7 (Short) — Tail latency amplification explanation ✅ 0.9 / 1.0

Clean conceptual explanation of the formula. The paradox with Q3 tells us: you understand it, you need practice recognizing when to reach for it.

Q8 (Scenario) — Instagram estimation ⚠️ 0.8 / 1.0

Math and units are correct. Your original addition — the explicit GB × 8 = Gb conversion — is real interview-quality unit discipline (my rubric skipped that step; you didn't).

Honest note: the structure and numeric breakdown still mirror the rubric closely. For future quizzes, attempt cold first, then reveal the rubric to self-check. This is not about "cheating vs not cheating" — it's about training the mental muscle to invent the structure yourself, which is exactly what happens in a real interview.

Full clean answer for reference:

Assumptions: 500M DAU · 50 views/user/day · 200 KB/photo · 2 uploads/user/day · peak = 5× avg · 3× replication

Reads (views):
  25B views/day (500M × 50)
  → avg ~290 k QPS (25B / 86400)
  → peak ~1.5M QPS (5×)

Egress bandwidth at peak:
  1.5M × 200 KB = 300 GB/s
  = 300 × 8 = 2400 Gbps ≈ 2.4 Tbps
  → single origin cannot push this. MUST use a CDN.

Writes (storage growth):
  500M × 2 × 200 KB = 200 GB/day
  → 6 TB/month (raw), 18 TB/month (with 3× replication)
  → 216 TB/year of replicated blob storage
  → tier hot vs cold; use S3/GCS-style object store, not the RDBMS

Q9 (Mini design) — P99 debugging ✅ 0.9 / 1.0

Real improvement over the first attempt. Your four hypotheses are all valid and independent, and you brought Postgres-specific tools (PgBouncer, pg_stat_statements, VACUUM) that weren't in my rubric. That's genuine depth.

Small addition to consider next time — you missed the downstream retry storm class of hypotheses:

Retries on a flaky downstream. If your service retries failed calls 3×, one slow downstream doubles or triples your call fan-out, which drives up your P99. Fix: hedging with early cancellation, circuit breakers, or exponential backoff with jitter.

Also worth mentioning: noisy neighbors on shared cloud infrastructure. Even without any change to your app, EC2/K8s co-tenancy can make your P99 spike randomly. Fix: dedicated instances, better resource reservations.


Summary

Final: 7.5 / 9 (83%) — matches Day 1 exactly. Consistent effort.

Two habits to build (both are the same habit really)

  1. Recognize the trigger for tail-latency math. Any time you hear "fan out," "many parallel calls," "N replicas answering" — compute the amplification. Don't just know the formula; look for it.
  2. Interview-mode discipline: no rubric until after the attempt. Even when you're studying, force yourself to produce the answer from scratch. If you're stuck for 5 minutes, then reveal. The friction is the learning.

Trend

Day Score %
Diagnostic 7.1/10 71%
Day 1 7.5/9 83%
Day 2 7.5/9 83%

Consistent. The next stretch (Days 3–7) is where you either lock in the fundamentals (85%+) or plateau. I'm expecting you to break 85% within Day 3–5.

Weak-area queue update

Concept Origin Severity Re-quiz on Days Status
Tail latency amplification — RECOGNIZING when to apply Day 2 Q3 High Day 6, 15 Ongoing
Downstream retry storms (P99 debugging) Day 2 Q9 Low 15, 21 New — minor