Problems / Design a product, hard

Build Instagram

Design Instagram from an empty canvas: post photos, resize them in the background, fan posts out into precomputed timelines, serve feeds and photos, and count likes, at 2,500 requests a second.

Unlock it once for 25 credits; everything inside it is free (runs, changes, Submit, results, hints). Sign in with Google to start; new accounts get free credits.

What it must do

Scale

Request types to route: feed (50%, read), media (30%, read), like (15%, write), post (5%, write). Budget: $11,000 a month.

Estimate first

The test cases

You start from an empty canvas. When you run the tests, each one simulates your design with its own traffic and failures:

TestWhat it doesPasses when
Normal dayThe normal day: the traffic in the brief, nothing broken.Success ≥ 99.9%; p99 latency ≤ 300 ms (feed); p99 latency ≤ 300 ms (media); Success ≥ 99.9% (post)
A celebrity postsAt 5 s a celebrity posts: traffic triples for 8 s as millions open the app and like it.Success ≥ 99%; p99 latency ≤ 500 ms (feed); Success ≥ 99% (like)
The timeline cache flushedAt 5 s the timeline cache is emptied, as after a restart or a bad deploy: every read misses until it warms up again.Success ≥ 99%; p99 latency ≤ 500 ms (feed)
A server diesAt 4 s one server of the first app service on the request path dies for 10 s.Success ≥ 99%
Budget: $11,000/monthThe normal day's design must cost at most $11,000 a month.Cost ≤ $11,000/month

Must include

More design a product problems