Latency Critical Systems

作者 affaan-mef648e01899bMIT275K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫3 天前更新

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 產生的概覽

指導使用 p50/p95/p99 指標、熱路徑對應與即時回讀來量測及最佳化延遲敏感系統。

功能
此技能提供最佳化與驗證延遲敏感系統的指示,例如即時儀表板、行情資料饋送、串流代理、執行閘道、佇列與快取。它引導代理追蹤 p50/p95/p99 延遲、輸送量、資料新鮮度、佇列深度、快取命中率、供應商回應時間與瀏覽器算繪時間,並描繪從來源事件到使用者可見狀態的熱路徑。它也規定最佳化順序與針對已部署介面的即時回讀檢查,並提出避免以快速快取命中掩蓋過期資料或省略驗證的防護規則。
適用情境
當 p95 延遲、輸送量或資料新鮮度很重要時,或當使用者在意即時行為、熱路徑、串流新鮮度或執行速度時使用。此技能以工程為重點,不授權實盤交易或提供財務建議。
執行需求
僅為指示文件,未附帶指令碼。需要具備檔案與命令列工具的代理(Read、Write、Edit、Bash、Grep、Glob),且進行即時回讀時需要存取已部署介面,例如 HTTP 端點、供應商狀態、佇列狀態、邊緣/快取狀態以及瀏覽器驗證。

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.

來源與署名

來源:affaan-m/ecc位於skills/latency-critical-systems提交ef648e0

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架