Debugging
AuraScore 81/100

FIX Protocol Gateway Latency Drop and Packet Jitter Diagnostic

Automate FIX protocol log parsing and network packet analysis to isolate microsecond-level latency spikes and dropped order routing sessions.

Use this template when high-frequency trading gateways or electronic brokerages experience execution delays, session sequence gaps, or intermittent order drops. It delivers a comprehensive Python diagnostic script that analyzes wire captures alongside application-level FIX logs.

Template

Role: Principal Low-Latency Systems Architect specializing in electronic trading venue connectivity.

Context

  • Trading Desk: {{trading_desk_name}}
  • FIX Gateway Application Logs: {{fix_gateway_log_path}}
  • Network Capture File: {{pcap_capture_file}}
  • Execution Latency Threshold: {{latency_threshold_microseconds}} microseconds
  • Target Counterparty Identifier: {{target_counterparty_id}}
  • Network Interface Card: {{hardware_nic_interface}}

Task

Develop a production-grade Python debugging script that correlates FIX protocol application logs with raw PCAP network captures to isolate kernel bypass drops, sequence number gaps, and microsecond-level execution jitter impacting order flow.

Method

  1. Parse wire timestamps from {{pcap_capture_file}} across {{hardware_nic_interface}} and correlate them with engine ingress timestamps in {{fix_gateway_log_path}}.
  2. Extract and index FIX sequence numbers, Logon (MsgType A), Heartbeat (MsgType 0), and ResendRequest (MsgType 2) packets for {{target_counterparty_id}}.
  3. Identify sequence gaps and out-of-order execution reports affecting {{trading_desk_name}} transactions.
  4. Calculate the delta between network wire arrival and application memory ingestion against {{latency_threshold_microseconds}} microseconds to locate internal queue stalls.
  5. Inspect TCP window exhaustion, kernel ring buffer overruns, and socket drop counters on {{hardware_nic_interface}}.
  6. Trace thread scheduling stalls or garbage collection pauses on the core execution gateway workers.
  7. Generate synthetic reproduction scenarios based on the extracted burst traffic patterns.
  8. Produce an automated remediation report with kernel sysctl and NIC ring buffer configuration adjustments.

Constraints

  • The script MUST execute standalone using standard Python 3.10+ libraries and lightweight packet parsing tools.
  • MUST NOT log unmasked account identifiers, API secrets, or raw trader identifiers in standard output.
  • Network processing algorithms MUST handle multi-gigabyte PCAP files using stream iterators to prevent memory exhaustion.
  • Code MUST include explicit exception handling for truncated packets and non-standard FIX dictionary extensions.

Output format

  • Section 1: Shell Execution Command and Environment Dependencies (max 10 lines).
  • Section 2: Complete Python Diagnostic Script with inline comments and type annotations (single executable block, 90-150 lines).
  • Section 3: Diagnostic Output Matrix detailing Metric, Threshold, Observed Value, and Root Cause Category.
  • Section 4: Gateway Infrastructure Tuning Directives (sysctl, CPU pinning, and NIC ring parameters).

Self-review

  • Verify that {{trading_desk_name}}, {{fix_gateway_log_path}}, {{pcap_capture_file}}, {{latency_threshold_microseconds}}, {{target_counterparty_id}}, and {{hardware_nic_interface}} are fully integrated.
  • Confirm that no placeholder methods or incomplete code blocks exist in the script.
  • Validate that time calculations maintain microsecond precision throughout the script logic.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-debugging
financial-services
fix-protocol
latency-debugging
fintech