System design interview questions
Design a payment system
"Design the payments for an online shop." You ask questions and learn: 4,000 req/s at the peak, and 4 in 100 are people paying, so 160 charges a second. The card provider allows 100 a second and tells you about each payment with a webhook. Finance must be able to trace every cent, nobody may pay twice, a buyer who closes the tab still gets their order, and some items sell out after people have paid.
Practise this roundPart of Bugpit Pro. A 35 minute timed round in your browser: draw the design, run it against the traffic, then see the interviewer's checklist.
The question
4,000 requests a second at the peak, 4% of them writes. You have 35 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)
Size the money path first. 160 charges a second against a limit of 100 means you can't charge while the buyer waits. Take the order, queue it, and let workers charge at the provider's pace.
Make every charge safe to repeat. A worker can crash after charging, so each charge carries an idempotency key. Save money as ledger entries that add up to zero, and run a nightly job that checks your ledger against the provider's report.
Send orders from the provider's webhook, not the buyer's return to your site. Webhooks come at least once and in any order, so save each event's ID and skip repeats, and answer at once before the slow work.
Hold the card at checkout and charge it when the order ships. If an item sells out, the hold is just released: no refund, no lost fee. An online card hold lasts about 7 days, so ship before then or ask again.
Then say what a diagram can't show: each payment moves through states that only go forward, from created to held to charged to refunded. An old event that arrives late can't move it back.
The point: A payment system is marked on correctness, not speed: every cent traced, nothing charged twice, nothing lost. For each piece, name the failure it prevents.
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 photo store (photo storage like Instagram)
- Design a rate limiter