The whole course ▾
System Design · Mock interview 17 of 20
Design a stock exchange
Design a stock exchange.
Before you read the interview, answer the question yourself. Give yourself 10 minutes: say your design out loud, or sketch it on paper. What would you ask? Which numbers matter? Which boxes, and what's the hard part? Then read on, and score yourself with the feedback at the end.
New System Design videos go up at 6 pm. Subscribe on YouTube so you don't miss it.
Got a doubt? Ask in the comments under the video.Subscribe
Requirements
Estimation
API and data
High-level design
Deep dive: matching fairly
Deep dive: crashes and the market feed
Wrap-up
Strong: a sequencer and journal, a single-threaded, deterministic engine, a replaying standby, fair multicast. Next time: how the journal stays fast. Verdict: strong hire.
Score yourself
Interviewers score these seven things. Give your own attempt a tick for each one you did.
- Asks before drawing. Agrees what the system does, and how well: scale, speed, consistency.
- Turns users into requests a second and bytes a day, and says what the numbers decide.
- A small, clear contract, and a data model that fits how the data is read.
- A working path end to end before any detail. Every box has a reason.
- Picks the hard parts, compares two options, and chooses one with a trade-off said out loud.
- What breaks, what happens then, and how users notice. Retries, duplicates, limits.
- Thinks out loud, checks in with the interviewer, and takes a hint without losing the thread.
0 of 7
Lessons on weekdays, the week's revision on Saturday, a mock interview on Sunday.