Use when optimizing end-to-end latency, reducing response times, or improving performance for latency-sensitive applications. Covers latency budgets, geographic routing, protocol optimization, and latency measurement techniques.
View on GitHubmelodic-software/claude-code-plugins
systems-design
plugins/systems-design/skills/latency-optimization/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/systems-design/skills/latency-optimization/SKILL.md -a claude-code --skill latency-optimizationInstallation paths:
.claude/skills/latency-optimization/# Latency Optimization Comprehensive guide to reducing end-to-end latency in distributed systems - from network to application to database layers. ## When to Use This Skill - Optimizing response times for user-facing applications - Creating latency budgets for distributed systems - Implementing geographic routing strategies - Reducing database query latency - Optimizing API response times - Understanding and measuring latency components ## Latency Fundamentals ### Understanding Latency ```text Latency Components: Total Latency = Network + Processing + Queue + Serialization ┌─────────────────────────────────────────────────────────────┐ │ Request Journey │ │ │ │ Client ──► DNS ──► TCP ──► TLS ──► Server ──► DB ──► Back │ │ │ │ Components: │ │ ├── DNS Resolution: 0-100ms (cached: 0ms) │ │ ├── TCP Handshake: 1 RTT (~10-200ms) │ │ ├── TLS Handshake: 1-2 RTT (~20-400ms) │ │ ├── Request Transfer: depends on size │ │ ├── Server Processing: application-specific │ │ ├── Database Query: 1-1000ms typical │ │ └── Response Transfer: depends on size │ └─────────────────────────────────────────────────────────────┘ Key Metrics: - P50: Median latency (50th percentile) - P95: 95th percentile (tail latency starts) - P99: 99th percentile (important for SLOs) - P99.9: Three nines (critical systems) ``` ### Latency Numbers Every Developer Should Know ```text Latency Reference (2024 estimates): Operation Time ───────────────────────────────────────────────────── L1 cache reference 1 ns L2 cache reference 4 ns Branch mispredict 5