Urgent.News

What's breaking now, across thousands of outlets.

Tech

Back-of-the-envelope estimation for system design interviews: size a 200M-user photo app in five minutes

The interview question: "Design a photo-sharing app for 200 million daily users." Before you draw a single box, the interviewer expects you to put numbers on it. Back-of-the-envelope estimation is not about being right to three decimal places. It is about getting the order of magnitude right, fast and out loud, so you know which problems are real: one database or a hundred, one network link or a…

Designing a photo-sharing app for 200 million daily users is a common interview question. To estimate the system requirements, follow a back-of-the-envelope approach. First, understand why rough numbers matter - they decide the design. Assume each user makes 20 requests per day, 5% of which are uploads of 500 KB, and they keep photos for 5 years. This results in 4 billion requests per day, averaging 46,000 requests per second, with a peak of 139,000 requests per second.

Next, consider what is fast and what is slow. Operations like L1 cache reference take 1 ns, while reading from main memory takes 100 ns, SSD random read takes 100 µs, and a hard disk seek takes 10 ms. Network latency is also crucial; a round trip between California and Netherlands takes 150 ms. Memory is faster than disk, hence caches are used. Distance across oceans cannot be optimized away; use CDNs to move data closer.

Five key facts cover most interview scenarios: a day has about 10^5 seconds (86,400), 1 million requests per day translates to 12 requests per second, and 1 billion daily requests is about 12,000 requests per second. Size units step by 1,000 (KB, MB, GB, TB, PB), and Little's law states that requests in flight equal arrival rate multiplied by time each request takes.

To size the photo app, calculate requests per day (4 billion), average requests per second (46,000), and peak requests per second (139,000). New data per day is 100 TB, which over 5 years with 3 replicas results in 548 PB. Store photos in an object store, not a database, as the metadata lives in a small database.

Finally, consider additional factors. Add a 30% buffer for headroom, aiming for around 40 servers at 70% utilization. Bandwidth is critical; with 95% reads serving 200 KB each, peak egress is around 26 GB/s, or 210 Gbps. Uploads add an additional 3.5 GB/s of ingress. Use Little's law to estimate concurrent requests, which in this case is about 14,000. Practicing with the Designbench estimator helps you quickly calculate these numbers for different scenarios.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Part 30: Identity and governance for agents across five vendors

Part 30 · One Agent, Five Platforms Five platforms means five policy models, unless you design one. Each vendor has its own idea of who an agent is, where its permissions live, what gets logged and…

  • Each vendor has distinct agent identity and permission management methods.
  • Least privilege enforced at gateway level and process API across platforms.

How I Built a Zero-Browser B2B Company Enrichment Pipeline in n8n (Replacing 5 Chained APIs)sda

If you build outbound pipelines in n8n , Clay , or Make , you probably know the pain of enriching a list of company domains: Call one tool for emails & socials Call another for tech stack detection…

  • Zero-browser HTTP-based enrichment pipeline built in n8n
  • Parallel fetching of homepage HTML, DNS records, and TLS certificates
  • Automatic discovery of internal pages for tech stack analysis

Stop Exporting One Square Image for Every Platform in 2026

The fastest workflow in social media design is one master file. Export a single 1080×1080 square, upload it everywhere, let each platform do the rest.

  • Exporting one 1080x1080 square image for all platforms in 2026 simplifies workflow.
  • Single image maintains control over cropping, avoiding distortion.
  • Tailored exact sizes for each platform prevent cropping or padding issues.

Serialization and Deserialization in Database Engines: How Data Becomes Bytes

When building a database engine from scratch, one of the most important concepts you need to understand is serialization and deserialization .

  • Serialization converts data structures into byte sequences for storage or transmission
  • Deserialization reconstructs original data structures from serialized bytes
  • Database engines rely on serialization/deserialization for persistent data storage

More from Thursday 19 November →