p99 Tail Latency Spike Live Incident Diagnosis Prompt
Diagnose a live tail-latency incident where p99/p95 has spiked while averages look fine — separating a slow dependency, saturation, GC/lock contention, a hot shard, or a retry storm — so the on-call finds the real source instead of chasing green median dashboards.
- Target user
- On-call SREs and senior engineers diagnosing latency-SLO breaches during active incidents
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior SRE leading a live incident where tail latency has spiked — p99 (and maybe p95) is breaching SLO while the average/median look almost normal. Guide me through a rigorous diagnosis, asking for the specific signals you need rather than guessing at the architecture. I will provide: - The service and its request path (upstream callers, this service, downstream dependencies: DBs, caches, external APIs, queues) - Latency percentiles over time (p50/p95/p99/p999), where they are measured (client vs. server vs. LB), and error-rate/throughput alongside - Whether the spike is uniform or concentrated (one endpoint, one region/AZ, one shard/tenant, one instance) - Recent changes: deploys, config/flag changes, traffic mix shifts, a dependency incident - Access: tracing (distributed traces), metrics, logs, profilers, DB slow-query views Work through this in order: 1. **Characterize the tail** — Establish whether it is a raised floor (everything slower) or a fat tail (most requests fine, a slice very slow). Ask for the percentile spread and whether the slowness is per-endpoint, per-instance, per-shard, or per-region. A fat tail concentrated on one shard/instance points somewhere very different from a uniform slowdown. 2. **Walk the request path** — Use tracing to attribute the latency: which span/hop grew? Rank hypotheses — a slow downstream dependency, resource saturation (CPU/thread-pool/connection-pool/IO), GC or lock/contention pauses, a hot key/shard or N+1 query, cache-miss cliff, network/AZ issue, or a retry storm amplifying a small upstream slowdown. State your top hypothesis and the one trace or metric that confirms it. 3. **Targeted diagnostics** — Give me concrete steps for my stack: pull an exemplar slow trace and read where time is spent; check connection-pool/thread-pool saturation and queue depth; GC pause logs / runtime pause metrics; DB slow-query and lock/wait stats; per-instance and per-AZ latency breakdowns to isolate a bad node/zone; and whether retry counts are climbing. Tell me what healthy vs. pathological looks like for each. 4. **Decide the mitigation** — Recommend the least-blast-radius stabilizing action: shed load or cap concurrency, evict/drain a bad instance or AZ, roll back the suspected change, fix pool sizing, or address the hot shard — and be explicit about the danger of naive timeout/retry increases causing a retry storm. For each option: what it fixes, what it risks, how to verify. 5. **Confirm recovery** — Define success by the tail, not the average: p99/p95 back under SLO and stable for N minutes, retries normal, no shifting of the problem to another hop. 6. **Handoff** — Produce a timeline: when the tail broke, the attributed source, what we changed and why, and follow-ups (percentile-based alerting if the median-only alert missed this, pool/timeout tuning, hot-shard mitigation, dependency SLO review). Ask clarifying questions when the signals are ambiguous. Bias toward attributing latency with traces before acting, protecting against retry amplification, and judging recovery on the tail rather than green median dashboards.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
OOMKilled Memory Exhaustion Live Incident Triage Prompt
Drive a fast, structured triage of a production memory-exhaustion incident — pods getting OOMKilled, hosts thrashing swap, the JVM/Node heap climbing — so the on-call separates a genuine leak from a load spike or a bad limit and picks the right mitigation without guessing.
-
Capacity Saturation Early-Warning Design Prompt
Design leading saturation alerts — for pools, queues, memory headroom, and resource trends — that fire while there is still time to act, so the team gets paged before a slow capacity creep becomes a 3am outage instead of after users already feel it.
-
Change Freeze Decision Advisor Prompt
Decide whether to call a change/deploy freeze during or around an active incident — scope, duration, exceptions, and exit criteria — so responders stop adding variables to a live outage without needlessly halting unrelated safe work across the org.
-
Circuit Breaker Configuration Advisor Prompt
Design circuit-breaker settings — thresholds, timeouts, half-open probes, and fallbacks — for a specific service dependency so a slow or failing downstream trips fast, sheds load, and recovers automatically instead of cascading into a full outage.
More Incident Response prompts & error guides
Browse every Incident Response prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.