A single-instrument limit order book and TCP matching engine designed around deterministic matching and a hand-rolled, non-blocking epoll event loop.
- Implemented price-time priority matching with partial fills, cancellation, ownership checks, self-trade handling, and multiple-price-level sweeps.
- Served clients through a custom non-blocking epoll-based event loop rather than a thread-per-connection or networking framework.
- Sustained 64,500 concurrent TCP connections for a 2-minute load test with zero failures, at roughly 164K requests/sec aggregate throughput.
- Kept steady-state median latency around 42–45 µs while scaling the order book from 100 to 10,000,000 orders.
- Passed 105 tests under ASan/UBSan and TSan, plus dedicated TCP chaos tests covering drip feeds, fragmentation, and malformed oversized payloads.
Benchmarks were measured locally on an i5-11300H running Fedora Linux; detailed conditions and raw results are documented in the repository.