Latency Critical Systems

by affaan-mef648e01899bMIT275K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 days ago

Optimize and verify latency-sensitive systems — realtime dashboards, market data feeds, streaming agents, execution gateways, queues, and caches — by tracking p50/p95/p99 latency, freshness age, and queue depth, mapping hot paths, and running live readbacks. Use when p95 latency, throughput, or data freshness matters.

AI-generated overview

Guides measuring and optimizing latency-sensitive systems using p50/p95/p99 metrics, hot-path mapping, and live verification.

What it does
This skill provides instructions for optimizing and verifying latency-sensitive systems such as realtime dashboards, market data feeds, streaming agents, execution gateways, queues, and caches. It directs the agent to track p50/p95/p99 latency, throughput, freshness age, queue depth, cache hit rate, provider response time, and browser render time, and to map the hot path from source event to user-visible state. It also prescribes an optimization order and live readback checks for deployed surfaces, along with guardrails against hiding stale data or dropping validation.
When to use it
Use it when p95 latency, throughput, or data freshness matters, or when the user cares about realtime behavior, hot paths, streaming freshness, or execution speed. It is engineering-focused and does not authorize live trading or financial advice.
Requirements
Instructions only; no scripts are shipped. It assumes an agent with file and shell tools (Read, Write, Edit, Bash, Grep, Glob) and, for live readbacks, access to the deployed surface such as HTTP endpoints, provider status, queue state, edge/cache state, and browser verification.

Latency Critical Systems

Use this skill when the user cares about realtime behavior, hot paths, streaming freshness, or execution speed. This includes HFT-like infrastructure, but the skill is engineering-focused. It does not authorize live trading or financial advice.

Split The Metrics

Do not collapse everything into "fast." Track:

  • p50, p95, and p99 latency;
  • throughput;
  • freshness age;
  • queue depth;
  • cache hit rate;
  • provider/API response time;
  • browser render time;
  • correctness under load;
  • failure and retry behavior.

Map The Hot Path

Write the path from user/event to final visible state:

text
source event -> provider API -> ingest worker -> queue -> cache -> edge route-> client stream -> browser render -> user-visible state

Then measure each segment separately.

Optimization Order

  1. Remove unnecessary round trips.
  2. Cache stable reads with freshness metadata.
  3. Batch small calls and writes.
  4. Move compute closer to the data or the user.
  5. Split hot and cold paths.
  6. Apply backpressure before queues grow unbounded.
  7. Use streaming only when it improves freshness or user experience.
  8. Add canaries for stale data, degraded providers, and bad cache state.

Verification

Use live readbacks when a deployed surface exists:

  • HTTP timing and response headers;
  • provider freshness timestamp;
  • queue or job state;
  • edge/cache state;
  • browser verification for actual UI freshness;
  • logs around retries and degraded mode.

For market-data or execution-adjacent paths, also verify orderbook age, VWAP assumptions, provider status, and kill-switch behavior before calling the path ready.

Guardrails

  • Do not optimize latency by dropping required validation.
  • Do not hide stale data behind fast cache hits.
  • Do not claim millisecond behavior from client labels without measurement.
  • Do not run live orders, destructive migrations, or customer-impacting deploys without an explicit approval gate.
  • Keep secrets and private payloads out of logs and benchmark artifacts.

Source and attribution

Source:affaan-m/eccinskills/latency-critical-systemsat commitef648e0

License: MIT

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal