These differ from standard system design interviews. Nobody is asking you to design a social network.
The canonical exercise: an order book
Design a limit order book supporting add, cancel and match.
The expected structure: price levels in a sorted structure (a tree, or an array indexed by price for a bounded tick range), each level holding a FIFO queue of orders to respect price-time priority, plus a hash map from order ID to its position for O(1) cancellation.
Cancellation being O(1) matters because cancels vastly outnumber trades in real markets - a good candidate raises that unprompted.
The array-of-price-levels choice is a genuinely good discussion: it wastes memory but gives constant-time access and excellent cache behaviour, which is usually the right trade for a liquid instrument.
Market data
Handling a high-rate feed: sequence numbers, gap detection, recovery via a snapshot channel, and normalising multiple venue formats into one internal representation.
Discuss backpressure: what happens when you cannot keep up. In trading the answer is usually not to buffer indefinitely but to drop to a snapshot and resynchronise, because stale data is worse than no data.
Latency and determinism
- Where are the queues, and what is the tail latency, not the average?
- Is the hot path allocation-free? See C++ for low latency.
- Is the system deterministic and replayable? Being able to replay a day exactly is essential for debugging and for regulatory reconstruction.
Risk checks
Pre-trade risk must be on the critical path - checking position limits, order size and price sanity before the order leaves. It adds latency and it is not optional; a fat-finger order that reaches the market has ended firms.
Being clear that you would not move risk checks off the hot path to save microseconds is the right answer, and it is sometimes probed.
Failure handling
What happens on disconnect? Orders resting at the exchange are still live even when your system is not. Cancel-on-disconnect, reconciliation on restart, and knowing your true position after a crash are the real concerns.
Practise in programming and DSA.