Where are the 20 milliseconds going between an order leaving our platform and the execution report reaching the trader? Usually across several systems, not in one slow component. A useful answer needs timestamps at each hand-off, plus a clear distinction between broker processing time and the time spent travelling to or waiting at an external venue.
Define the clock before measuring it
Order routing latency is not one number. An order can pass through a client connection, API gateway, pre-trade risk service, routing logic, protocol adapter, network link and liquidity provider or exchange.
A report then travels back through some of the same components. The displayed time from click to fill includes both directions and may also include the venue's matching process.
Separate the order path into intervals. Record arrival at the broker edge, validation start and end, risk check start and end, route decision, outbound queue entry, socket write, venue response arrival, execution-report handling and delivery to the client.
Give each event the order ID, route attempt, destination and a timestamp from a monotonic clock. That makes it possible to tell whether time was spent processing, queued behind other work or in transit.
Do not subtract timestamps from unrelated machines unless their clocks are synchronised and their error is known. PTP can support tight synchronisation in controlled data centres; NTP is common across less latency-sensitive services but can leave a wider offset. For intervals measured within one process, use a monotonic high-resolution clock. Record clock offset and timestamp precision alongside the measurements.
Keep acknowledgement types separate. A broker acceptance confirms that the broker has accepted an order for processing. It does not prove that the venue accepted, matched or even received it. Track venue acknowledgement and fill reports independently, and preserve the original event times when publishing status to a client.
Locate the milliseconds in each hop
The ranges below are indicative typical market ranges, not service guarantees or results for a particular provider. They describe broad per-hop contributions. A venue response is especially variable, and the full path can be higher because of queueing, distance, bursts or retransmission. Do not add every upper bound and treat the result as a normal order journey.
| Stage | Typical latency range | Common source of delay |
|---|---|---|
| Client to broker edge, one way | 1-30 ms | Geography, access network and client route |
| API gateway and session handling | 0.1-2 ms | Parsing, authentication and thread contention |
| Cached pre-trade risk checks | 0.1-2 ms | Rule count, serial checks and lock contention |
| Synchronous database or remote risk lookup | 1-10 ms or more | Network round trip, storage wait and connection pools |
| Routing logic and protocol adapter | 0.1-3 ms | Mapping, serialisation, queue depth and logging |
| Broker to venue network, one way | 0.05-1 ms colocated; 1-20 ms regional | Physical distance, switching and path variation |
| External acknowledgement or execution report | 1-30 ms or more | Venue workload, matching rules and market conditions |
These figures are useful for choosing what to investigate, not for setting a blanket service-level target. A 0.5 ms risk check is irrelevant if the order waits 15 ms in a full queue.
Conversely, shaving a few microseconds from a gateway may matter to a strategy sending many orders over a colocated route. Measure the whole path and the distribution at each stage.
Instrument the path, not just the endpoint
Start with a baseline segmented by route, instrument, order type, session and outcome. Compare market orders, passive limits, cancels and replacements separately. A cancel that queues behind new orders can create a different operational risk from a slow new-order acknowledgement.
At minimum, collect:
- Per-stage timestamps, order identifiers and route-attempt identifiers.
- Queue depth, worker utilisation, CPU scheduling delay and connection-pool waits.
- Round-trip and one-way network measurements where clocks allow a sound comparison.
- P50, P95 and P99 latency, plus timeout, reject, duplicate and retry rates.
- Venue or liquidity-provider response times separated from broker-side processing.
Retain enough detail to reconstruct a disputed order, while keeping high-cardinality identifiers out of metric labels that can overwhelm monitoring systems. Use sampled traces for broad traffic and full event logs for required audit records. Review what is logged on the hot path: synchronous disk writes, remote log calls and verbose payload formatting can add delay precisely when traffic is busiest.
Averages hide tails. If P50 is 3 ms and P99 is 40 ms, investigate bursts, queue growth, garbage collection, lock contention and network loss before changing the median path.
Compare measurements during quiet periods and active market conditions. For broader infrastructure context, Trading Technology's platform coverage follows the systems and providers brokers build on.
Run the 30-day implementation plan
Keep the first month focused on measurement, one controlled change and production verification. The checklist below assumes an existing order path and a team that can deploy instrumentation without replacing core components.
- Days 1-3: map the route. Draw the order and response paths for the busiest products and destinations. Name the owning service for each hop, identify protocol boundaries and document which acknowledgement each component emits. Include failover routes and retry behaviour.
- Days 4-7: agree event definitions. Define timestamp names, clock source, precision and correlation IDs. Check clock offsets on gateways and adapters. Test that a single order can be followed through broker acceptance, venue acknowledgement and execution report without conflating them.
- Days 8-12: capture a baseline. Collect at least several representative trading sessions, including a busy period if available. Publish P50, P95 and P99 for each stage, alongside order volume, rejects, timeouts and queue depth. Keep route and order-type slices rather than relying on a single broker-wide number.
- Days 13-17: identify the dominant delay. Select the stage contributing most to the target percentile, not the easiest component to tune. Check whether the delay is processing, queueing, network transit or an external response. Confirm it with traces and host or network telemetry before changing code.
- Days 18-22: make one reversible change. Examples include removing a synchronous remote lookup from a path where safe cached data is available, reducing unnecessary serialisation, isolating a busy worker pool or correcting an avoidable regional route. Keep all mandatory risk checks. Record the expected effect and possible failure modes before deployment.
- Days 23-26: test under representative load. Replay realistic order mixes and bursts, including cancels, rejects and reconnects. Compare tail latency and error rates with the baseline. Test failover and back-pressure so that a faster normal path does not create uncontrolled queues during a downstream slowdown.
- Days 27-30: canary and operationalise. Release to a limited route or traffic slice, monitor the same percentiles and control metrics, then expand only if the change meets its acceptance criteria. Document rollback steps, alert thresholds and ownership for each measured stage.
Choose speed without weakening controls
Some changes lower latency by moving work rather than removing it. An asynchronous risk check can make an acknowledgement appear sooner while allowing an order to progress before a required control has completed.
That is not a safe optimisation unless the trading and compliance design explicitly permits it. Keep the order blocked until mandatory checks pass, and make the state visible to downstream systems.
Likewise, local caches reduce remote lookups but introduce freshness and consistency questions. Define the maximum age of each cached limit or instrument attribute, what happens on expiry, and whether the service fails closed or routes to a slower validation path.
Connection reuse can reduce setup cost, but pool saturation and reconnect storms need limits. Batching improves throughput in some systems but may add wait time for low-volume orders.
Set acceptance criteria across latency and correctness. A reasonable test might require a defined reduction in P95 broker-side processing while keeping P99 stable, with no increase in rejects, duplicates, timeouts or risk-control breaches.
Choose thresholds from the firm's own baseline and execution requirements. Typical market ranges can orient the investigation, but they cannot substitute for that baseline.
Verify the change in production
After release, compare like with like: the same route, instrument class, order type and market conditions. Track P50, P95 and P99 for broker processing separately from venue response. Watch queue depth and error rates during the same interval. A lower average with a worse P99, more retries or a rise in rejected orders is not a clean improvement.
Keep a rollback trigger that operations can apply without waiting for a code change. Alert on sustained queue growth, missing venue responses, clock drift and a rise in duplicate or late reports.
Preserve the before-and-after configuration and trace examples, so future incidents do not restart the investigation from memory. Use the measurements to decide whether the next constraint is software, deployment topology, network distance or an external venue.
This week, add stage-level timestamps to one production order route and publish its P50, P95 and P99 baseline.
Frequently Asked Questions
How do brokers measure order routing latency?
Timestamp each hand-off from broker edge through risk checks, routing, network send and venue response. Use monotonic clocks for intervals within a process, and account for clock offset before comparing timestamps across hosts.
What is a typical order routing latency?
It varies with client location, broker architecture, network distance and venue behaviour. A colocated network hop may be below 1 ms, while a regional path can take several milliseconds or more; measure each route rather than applying one target to all orders.
Why is P99 latency higher than average latency?
P99 captures the slowest 1% of measured orders and exposes queueing, contention, retries and network variation that averages conceal. Segment it by route and order type to find where the tail forms.
Do faster risk checks always improve execution?
They can reduce broker-side delay, but mandatory controls must still complete before an order proceeds. Caches and asynchronous processing need explicit freshness, failure and state-handling rules.
Should a broker optimise the gateway or the network first?
Use timestamped stage measurements to identify the largest contribution to the target percentile. Optimise that stage first, then verify the change under representative load without worsening rejects, timeouts or tail latency.
Platforms · Software · Providers · Markets