Problems / Design a product, hard

Build WhatsApp messaging

Design WhatsApp from an empty canvas: phones connect over WebSockets, messages are stored and then delivered in real time or by push, presence is tracked, and no accepted message is ever lost.

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: send (45%, write), sync (35%, read), presence (20%, write). Budget: $14,500 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.8%; p99 latency ≤ 200 ms (send); p99 latency ≤ 200 ms (sync)
The message broker crashesAt 6 s the queue or stream that carries messages to recipients crashes and takes 10 s to restart.No lost events; Success ≥ 99%
A server diesAt 4 s one server of the first app service on the request path dies for 10 s.Success ≥ 99%
DDoS attackAt 5 s 20,000 requests a second of flood traffic arrive for 10 s, alongside real users.Success ≥ 99%; Attack blocked ≥ 95%
Budget: $14,500/monthThe normal day's design must cost at most $14,500 a month.Cost ≤ $14,500/month

Must include

More design a product problems