Design an electronic venue that matches buy and sell orders with deterministic rules, fans out market data, and enforces risk before orders enter the matching engine.
Functional requirements
- Central limit order book per symbol with price-time priority
- Market, limit, and cancel/replace with partial fills
- Low-latency market data for trades, BBO, and depth
- Pre-trade credit, position, and throttle checks at gateways
- Durable, ordered journal for replay, audit, and settlement handoff
Non-functional requirements
- Deterministic sequencing and replay from persisted log
- Fair, low-latency access across co-located and remote sessions
- Hot standby or state-machine replication for the matching path
- High write throughput for market data fan-out and archival