← Technical Guides

Measure an order gateway under recorded and fixed-rate traffic

Prepare a private timed order plan, replay new, cancel and replace requests over independent FIX sessions, and interpret dispatch rates, timeouts and p99 response latency.

A gateway can acknowledge one order promptly and still fall behind when two connections become busy together. A timed replay preserves the gaps and overlaps between captured requests. A fixed-rate test distributes those same requests at a chosen aggregate rate. Use the same input and counterparty configuration when comparing two builds. Open Timed Order Replay

Prepare the capture

For PCAP or PCAPNG, select the FIX edition or exchange profile and enter the cleartext order-entry TCP service ports. The compiler reassembles client-to-service frames, removes identical TCP retransmissions, and uses the packet carrying each frame’s first byte as its capture timestamp. Conflicting bytes, packet truncation and unresolved stream gaps stop the plan. Encrypted payloads require a cleartext capture taken at the gateway. Packet capture input has an additional limit of 4,096 decoded frames, including replies. Synthetic FIX 4.4 capture on TCP port 9878

Use one complete FIX frame per text or JSONL record. A capture clock needs a full date, time and UTC offset in each record. If the logger omitted the arrival time, select SendingTime (52) explicitly. Timestamps on different machines must share a clock reference for a cross-session replay. Ordering is checked within each session before the tool merges the session timelines. Missing original orders, bad wire checksums and backwards timestamps stop compilation.

The local compiler extracts NewOrderSingle (D), OrderCancelRequest (F) and OrderCancelReplaceRequest (G). It skips retransmissions and session traffic. Sender and target IDs become numbered lanes. Original order IDs become generated references, including the link between a replacement and its original. Use a single trading period with unique client order IDs. FIXT inputs need an identified application edition from Logon, the application header or the selected profile.

Review the listed omitted tags before exporting. A plan retains scalar trading instructions such as symbol, side, quantity and limit price. Your instrument names, sizes, prices, and the timing pattern can still be sensitive. Accounts, source credentials, party identities and free text stay out of the export. Group-bearing orders require a different test fixture. Some exchange profiles require instructions that the portable format omits. A venue reject in that case is part of the observed result.

Exercise a synthetic counterparty

Download the standalone Node 24 runner. The built-in example creates two separate FIX/TCP connections to synthetic counterparties running on loopback. The command below uses five times the recorded speed and writes aggregate and per-session measurements.

node fixscope-replay.mjs --demo --speed 5 > result.json

Replace --demo with --plan plan.json to run a reviewed capture. By default the local counterparty uses the synthetic instrument NOVA and its configured price band. To exercise your own gateway, provide --targets sessions.json with one local port, sender and target per lane in the displayed order. Start a fresh UAT session at sequence 1 on each port. A locally running FIXScope Labs bridge can forward an authenticated lane to a hosted lab. The runner only connects to loopback.

node fixscope-replay.mjs --plan plan.json --targets sessions.json --rate 100 --repeat 3 --timeout-ms 3000 --p99-ms 50 > result.json

The fixed rate is shared across all lanes. The runner caps aggregate dispatch at 1,000 requests per second, allows up to 256 outstanding per lane and avoids catch-up bursts after a scheduler pause. A plan may contain up to 50,000 requests across 16 sessions and cover 24 hours. Repetitions get fresh order identifiers. A run may send up to 250,000 requests. These are execution limits, not guaranteed rates.

Read the evidence

To find where a latency budget first fails, use --rates 10,50,100 --p99-ms 50 in place of a single rate. Each stage drains in-flight orders and starts a fresh measurement window. FIX sequences continue across stages. Order identifiers remain unique and the counterparty retains its trading state. Record any changes to available liquidity when interpreting later stages. The sweep reports every tested rate and identifies the first one with a reject, timeout or missed latency budget.

Import the result JSON into the tool or inspect it in CI. Achieved rate measures intervals between actual dispatches. A fixed-rate stage fails when it reaches less than 90% of the requested rate or there are too few dispatches to measure it. The report distinguishes that result from a p99 breach and shows the achieved rate of the first observed breach. A large scheduling delay can indicate contention on the machine driving the test.

Latency starts when the runner writes an order to the local socket and ends at the first correlated acceptance or rejection. A Pending New, Pending Replace or Pending Cancel leaves the request outstanding. Timeouts have no latency sample. Percentiles use nearest rank and round upward to a microsecond. With two replies, p99 is the slower reply. Exit status 0 means all checks passed, 2 means an order, dispatch rate or latency check failed, and 1 means setup or transport prevented measurement. These figures cover the end-to-end software path, including any bridge.