Catalog
affaan-m/latency-critical-systems

affaan-m

latency-critical-systems

Use for latency-sensitive systems such as realtime dashboards, market data, streaming agents, execution gateways, queues, caches, or HFT-like infrastructure where freshness and p95 latency matter.

global
0installs0uses~560
v1.0Saved May 25, 2026

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:

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.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

84/100

Grade

B

Good

Safety

88

Quality

85

Clarity

88

Completeness

75

Summary

A reference guide for diagnosing and optimizing latency-sensitive systems including realtime dashboards, market data feeds, streaming pipelines, and execution gateways. It provides a structured methodology for measuring performance across the full request path, prioritizes optimization strategies, and establishes guardrails to prevent optimization at the cost of correctness or security.

Detected Capabilities

file readlog analysisperformance measurementhttp timing analysiscache state inspectionqueue depth inspectionstream verification

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

latency optimizationrealtime performance tuninghot path diagnosismarket data freshnessp95 latency bottleneckstreaming infrastructureexecution gateway latencycache hit rate analysis

Risk Signals

INFO

Guidance to verify orderbook age and VWAP assumptions before live trading

Verification section
INFO

Guardrail prohibits live orders and customer-impacting deploys without explicit approval gate

Guardrails section
INFO

Requires verification of kill-switch behavior for execution-adjacent paths

Verification section

Use Cases

  • Diagnosing p95/p99 latency bottlenecks in realtime market data systems
  • Optimizing streaming freshness and delivery latency in event-driven architectures
  • Identifying and measuring hot paths in low-latency infrastructure (caches, queues, edge routes)
  • Validating execution gateway and order management system latency requirements
  • Establishing performance guardrails for HFT-adjacent systems to prevent premature optimization
  • Measuring and comparing cache hit rates, queue depth, and provider API response times

Quality Notes

  • Well-structured methodology with clear prioritized steps (Split Metrics → Map Hot Path → Optimization Order → Verification)
  • Provides specific measurable metrics (p50/p95/p99 latency, throughput, freshness age) rather than vague performance targets
  • Includes a concrete example hot path diagram showing full request flow through system layers
  • Strong guardrails section explicitly prohibits common pitfalls: dropping validation, hiding stale data, skipping measurements
  • Clear scope boundaries: engineering-focused optimization, not trading advice or live trading authorization
  • Excellent callout about keeping secrets out of logs and benchmark artifacts shows security awareness
  • Verification section is practical and comprehensive, covering HTTP timing, provider timestamps, queue state, browser verification, and deployment gates
Model: claude-haiku-4-5-20251001Analyzed: May 25, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add affaan-m/latency-critical-systems to your library

Command Palette

Search for a command to run...