PrepCity

Design a stock exchange

Open the lab

By the last page, this is the design you will have built. Drag it, or Show all, to see every part.

Lesson · 12 pages · about 10 min

Design a stock exchange

Matching orders fairly at the opening bell: an order book per stock that a lock limits to one line, a sequenced log with an in-memory matching engine per stock, and risk checks before the line.

Words you’ll learn

  • Capacity
  • Database
  • Commit
  • Millisecond
  • Gateway
  • Stream
  • Read replica (standby)
  • On call
  • Outage
  • Row

Page by page