System design interview questions
Design a photo store (photo storage like Instagram)
"Design a service that stores and serves people's photos." You ask questions and learn: 36,000 req/s, and 8 in 10 are photos being viewed. A photo must never be lost when a server dies, and the machine budget is tight.
Practise this roundPart of Bugpit Pro. A 25 minute timed round in your browser: draw the design, run it against the traffic, then see the interviewer's checklist.
The question
36,000 requests a second at the peak, 2% of them writes and 80% static files. You have 25 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)
A file kept on one server's disk dies with that server, and the other servers can't see it. Files belong in object storage, where every server sees the same copy.
Let the CDN fetch from storage directly. If a photo still passes through your app servers on the way, they still do the work and you still pay for them.
Most views are of a small share of photos, so a high CDN hit rate carries most of the load. Check what the misses do to storage.
Keep the small data, such as who owns which photo, in a database. Only the big, unchanging files go to storage.
The point: Big files that never change go to storage and the edge. Your servers handle the small questions. It's the same split Netflix uses for video.
More system design interview questions
- Design a link shortener (URL shortener like Bitly)
- Design a chat app (chat app like WhatsApp)
- Design checkout for a flash sale
- Design an app for users worldwide
- Design a news feed (news feed like Twitter or Instagram)
- Design search for a shop
- Design a notification system
- Design a rate limiter
- Design a payment system