August 21, 2025 · 3 min read
Low-Latency Systems and Market Microstructure
Abstract. A short note on event-driven systems, order books, latency budgets, streaming data, and why market systems make architecture concrete.
Market systems are useful to study because they make latency visible.
In many backend systems, latency is experienced indirectly: a page feels slow, a queue grows, a user waits. In market infrastructure, latency is part of the domain. It changes what information is available, what decisions are possible, and whether a strategy exists at all.
Event-driven systems
Market data is naturally event-driven.
Trades, order book updates, funding changes, liquidations, and external venue signals arrive as streams. The system has to decide which events matter, how to order them, and how to handle gaps or late data.
This forces discipline:
- timestamps matter;
- ordering assumptions matter;
- replay matters;
- idempotency matters;
- backpressure matters.
Those same concerns apply to many non-financial systems. Market data just makes them harder to ignore.
Order books
An order book is not just a data structure. It is a live representation of market intent at a point in time.
Small implementation details matter:
- how updates are applied;
- how snapshots are reconciled;
- how stale levels are removed;
- how crossed books are detected;
- how local state is validated against exchange state.
If the local book is wrong, every downstream decision is built on bad state.
Latency budgets
Low-latency systems need explicit budgets.
The budget includes:
- network receive time;
- decoding;
- normalization;
- state update;
- signal calculation;
- decision logic;
- order submission;
- acknowledgement handling.
Every stage competes for time. Optimizing one stage without understanding the full path can move the problem rather than solve it.
Streaming data and storage
Streaming systems also need historical analysis. That creates a split between hot path and research path.
The hot path should do as little as possible. It should maintain state, make decisions, and avoid unnecessary allocation or blocking work.
The research path can be heavier. It needs replayable data, queryable history, and enough metadata to understand what the system saw at the time. Columnar stores such as ClickHouse are useful here because they make large event histories practical to inspect.
Why this matters outside trading
Low-latency work is a good training ground for backend engineering because it punishes vague thinking.
You have to know:
- where time is spent;
- where state lives;
- what ordering guarantees exist;
- what happens when data is late;
- what can be replayed;
- what cannot be reconstructed.
Those questions are useful in any serious distributed system.