Practice — System Design Interview Framework & Capacity Estimation (5 questions)
Capacity Estimation for a Photo-Sharing App Permalink →
You are asked to design a photo-sharing service. After clarifying requirements you have agreed these assumptions with the interviewer:
- 200 M monthly active users, 50% active on any given day
- Each active user uploads 0.5 photos/day and views 50 photos/day
- A stored photo (with two thumbnails) averages 600 KB; metadata is ~300 B
- Retention: 5 years
- Compute average and peak (assume 3× average) upload QPS and view QPS.
- Estimate storage growth per day and the total after 5 years, split into media and metadata.
- Using the 80/20 rule, size a cache for the day's popular photos, and say which number in your estimate points to the hardest part of the design.
Share this question
Turning a Vague Prompt into Requirements Permalink →
The interviewer says: "Design a system like Google Docs." Nothing more.
- Write the 4–6 clarifying questions you would ask in the first five minutes, and for each say which design decision the answer changes.
- Propose a functional scope (in-scope and explicitly out-of-scope) for a 45-minute interview.
- State the non-functional requirements you would assume if the interviewer says "you decide", with a one-line justification each.
Share this question
Building a Latency Budget from the Reference Numbers Permalink →
A product page must render in under 200 ms at p99 (server side). The request path is: load balancer → API service → (a) product cache lookup, on miss a database read, → (b) a call to a pricing service in the same datacenter, → (c) a call to a recommendations service hosted in another region.
- Using the standard latency reference numbers, estimate the cost of each hop and decide whether the 200 ms budget is achievable.
- Propose two changes, justified with numbers, that would make the budget comfortable.
- If the pricing service is 99.9% available and the API service is 99.95% available, what availability can the product page promise if it fails whenever either fails?
Share this question
Stating and Re-deciding a Trade-off Permalink →
During a news feed design you said: "I'll precompute each user's feed on write (fan-out on write)."
- Restate that decision using the four-part trade-off template (choice, alternative, deciding requirement, accepted cost/mitigation), referencing numbers from a Twitter-like estimate (150 M DAU, 300 M posts/day, ~100:1 read:write, average 200 followers).
- The interviewer changes a requirement: "Assume this is a professional network where posts are rare (0.05/user/day) and most reads come from a handful of hugely followed publishers." Re-decide, using the same template.
- Name two failure modes of your original design and how you would detect and handle each.
Share this question
From QPS to Server Counts and an SLA Permalink →
Your estimate for an API says 40,000 requests/s average and 3× at peak. A single application server comfortably serves ~2,000 requests/s; the relational primary can absorb ~5,000 writes/s; 10% of requests are writes.
- How many application servers do you deploy, and why more than the raw division suggests?
- Is a single database primary enough for the writes? What would you say about reads?
- The product team wants a 99.99% availability SLA. Translate that into downtime per year and name three concrete design consequences.
Share this question