Bugpit

System design interview questions

Design an app for users worldwide

"Our users are in America, Europe and Asia." You ask questions and learn: 6,000 req/s, 1 in 10 are writes and 2 in 10 are images. Pages must feel fast everywhere, and the app must survive losing a whole region.

Practise this round

Part of Bugpit Pro. A 30 minute timed round in your browser: draw the design, run it against the traffic, then see the interviewer's checklist.

The question

6,000 requests a second at the peak, 10% of them writes and 20% static files. You have 30 minutes and every part on offer: servers, load balancers, caches, databases, queues and more.

How the round works

Like a real interview, the canvas starts empty and the checklist stays hidden until you submit. Bugpit then sends the traffic at your design, crashes a machine, and marks what held up, what fell over and what it would cost each month.

What a strong answer covers

Show it (try the round first)

Distance is the delay. A request from Mumbai to Virginia and back takes longer than all the work your servers do, so faster servers won't help.

Put images on a CDN, and run your servers in every region so most requests stay close to the person asking.

Reads can be answered by a replica nearby. Writes still go to one primary, so move slow writes behind a queue.

To survive losing the home region, a replica elsewhere must be ready to become the primary. Check that the regions left can carry all the traffic.

The point: Going worldwide is about distance and about losing a region. Both are answered by copies of your system close to people.

Try it against the clock

More system design interview questions