System Design: Stock Exchange

System Design: Stock Exchange

How would you design a Stock Exchange meant to operate at scale?

Estimated Usage

  • 500 million order per day
  • Uniform usage throughout the day
  • 200 listed companies on the market
  • 1:1 Buy to Sell orders

Functional Requirements

  • Users should be able to put in orders to buy or sell
  • Users should be able to cancel orders
  • Buy orders should be matched to sell orders with the same price if they exist
  • User accounts have a balance where they have to preload funds in order to place a buy order
  • User should be able to check the current price

Nonfunctional Requirements

  • 99.999% reliability
  • Price checks need to be updated within 3000 milliseconds

Try to submit your solution on LeetDesign, share the link in the comments and I'll give you feedback on how you did!

Xnapper-2022-10-05-11.57.26.png