Jonix
← Back to Blog

How We Approach Real-Time Risk Without Sacrificing Throughput

2026-01-10

Every order a trading firm sends to an exchange must pass through a gauntlet of risk checks: position limits, notional exposure caps, margin requirements, fat-finger guards, and regulatory constraints. These checks are essential—skip them and you risk catastrophic losses—but they sit squarely on the latency-critical path between strategy signal and order submission.

The traditional approach is to run risk checks in a separate service that the execution engine calls synchronously. This works, but it adds network hops, serialization overhead, and contention under load. At Jonix, we took a different path: we co-locate the risk evaluation logic inside the execution engine’s event loop. Risk state—positions, exposure, margin—is maintained in lock-free, cache-friendly data structures that are updated incrementally on every fill and market data tick.

The result is that a full suite of pre-trade risk checks adds less than one microsecond of latency to the order path. Because the risk state is updated continuously rather than queried on demand, there is no cold-start penalty and no risk of stale data. This architecture also makes it straightforward to add new risk rules: each rule is a small, stateless function that reads from shared state and returns a pass/fail verdict. We have open-sourced a simplified version of this framework, and we encourage the community to explore it on our GitHub.