- How many servers?
- How much storage?
- What bottlenecks should you plan for?
- Registered users: 100 million
- Daily active users (DAU): 20% → 20 million DAU
- App type: photo-sharing (reads dominate)
- Opens per active user per day: 20
- Posts per active user per day: 0.1 (one post every 10 days)
- Feed reads per day = 20,000,000 × 20 = 400,000,000 reads/day
- Uploads per day = 20,000,000 × 0.1 = 2,000,000 uploads/day

Traffic is not uniform. Peak traffic (time-of-day effects, promotions, viral events) is typically 3–5× the daily average. Always design for peak, not average.
Using the rounded average of ~4,000 r/s:
- Peak (3–5×) ≈ 12,000–20,000 r/s
- For conservatism, use peak ≈ 15,000 r/s
- Average uploads/sec ≈ 23 u/s
- Peak uploads/sec (3–5×) ≈ 60–120 u/s

- Daily object data ingested = 2,000,000 × 5 MB = 10,000,000 MB = 10,000 GB = 10 TB/day
- Annual growth ≈ 10 TB/day × 365 ≈ 3,650 TB ≈ 3.65 PB/year
- Store image binaries in a cheap, scalable object store (S3, GCS, Azure Blob), not in the primary relational database.
- Keep only metadata (caption, owner, timestamps, storage location, indexes) in the DB — a few KB per photo.


- One app server can handle ~500 feed reads/sec (when reads hit cache or are efficiently served).
- Peak reads to serve = 15,000 r/s
- App servers = 15,000 / 500 = 30
- Add headroom and redundancy → plan for ≈ 40 app servers

- Start from user counts and activity assumptions (DAU, opens/day, posts/day).
- Separate reads from writes and compute daily totals.
- Convert daily totals to per-second averages and then estimate peak (typically 3–5×).
- Size compute by dividing peak RPS by throughput per server and add redundancy.
- Size storage by item size × items/day × retention window.
- Use caches, CDNs, read replicas, and object storage where appropriate — these are often required to meet performance and cost goals.
- State assumptions and round aggressively in interview settings. Discuss trade-offs and system bottlenecks.
Round numbers and state your assumptions clearly. Interviewers are evaluating your approach and trade-offs more than any single exact number.