TL;DR: I helped build Mstock, a stock trading platform handling 100K+ concurrent users during market hours. This post walks through the full system design — from WebSocket connections for live prices, to order matching, to the caching and database layers — with architecture diagrams, sequence flows, and the hard lessons we learned in production. The Problem Designing a stock trading platform isn