Root Cause Analysis in Cloud Systems: The Complete Guide
At 03:12 the checkout alert fires: payments are returning 502s, 7 percent and climbing. The errors started fourteen minutes earlier, and a deploy went out at 02:47 that nobody remembers, because it was "just a config change."
Root cause analysis in a system like that isn't the exercise your quality textbook described. There's no single broken part to hold up in a meeting. RCA here means reconstructing what changed, tracing how the failure propagated through your dependencies, and finding the smallest set of contributing causes that, fixed, stop it happening again. This guide gives you the process, one incident worked end to end, and the three techniques (timeline reconstruction, dependency tracing and change correlation) with the commands that do the work. It's also the method Resolve runs.
What root cause analysis means in distributed cloud systems
The classic RCA toolkit (5 Whys, fishbone diagrams, fault trees) was built for manufacturing, where causality is mostly linear. Cloud systems break every assumption behind that model.
01Causes
Conjunctions
A deploy, a traffic shift and a degraded cache together. Remove one and nothing breaks.
02Alerts
Correlated
One shared dependency degrades and thirty services page separately.
03Propagation
Cascades
The loudest service is often three hops downstream of the real problem.
04State
Partial failure
Reachable but slow, stale reads, 5% of requests failing while p50 looks perfect.
There's rarely a single root cause. A production incident is usually a conjunction: a deploy changed a timeout, traffic shifted after a marketing email, a cache node was already degraded, and retry logic amplified the load. Remove any one and nothing breaks. The Google SRE book's postmortem culture chapter talks about contributing causes and trigger conditions for exactly this reason. Asking "why" five times in a distributed system usually gets you five plausible answers, all partly true.
Failures are correlated. When a shared dependency degrades (a DNS resolver, a message broker, an availability zone), dozens of services fail at once and each one pages. Telling "thirty services broke" apart from "one thing broke that thirty services depend on" is the first real task of any cloud RCA.
Cascades hide their origin. Service A slows down, B's queue backs up, B's health checks fail, the load balancer pulls B's instances, and C, which was fine, loses capacity and starts erroring. The service paging loudest is often three hops downstream of the problem.
Partial failure is the default. A node can be reachable but slow. Five percent of requests can fail while p50 looks perfect. Distributed RCA is about characterizing which requests fail, where in the system, and since when.
The output isn't a single culprit. It's a causal narrative you can act on.
The RCA process: root cause analysis steps from page to postmortem
The Google SRE book's effective troubleshooting chapter describes the loop in the abstract (triage, examine, diagnose, test, cure). Here it is made concrete for cloud infrastructure.
| Step | Key question | Output |
|---|---|---|
| Detection | Is something wrong, and since when | A symptom with a start time |
| Triage | Who is hurt, how badly, how fast is it worsening | Severity, escalation, first mitigation |
| Timeline | What happened, in what order, across all systems | One ordered event sequence |
| Hypothesis | What mechanism explains this timeline | A falsifiable claim with predictions |
| Verification | Does the evidence confirm or refute it | A confirmed mechanism, or a better timeline |
| Remediation | What's the safest action at this confidence level | Restored service, evidence preserved |
| Postmortem | What do we change so the next one is shorter | Contributing causes, owned action items |
1. Detection. An alert fires, a customer complains, or a metric drifts from its baseline. Good detection is symptom-based (errors, latency, saturation) because you can't enumerate causes in advance. If your team drowns in low-value pages before the real one arrives, fix that first: alert fatigue and triage is its own discipline.
2. Triage. Answer three questions before diagnosing anything: what's the user impact, how fast is it worsening, and does it need more people. Severity is a decision, not a measurement. Mitigation before diagnosis (roll back, fail over, shed load) is legitimate and often correct.
3. Timeline reconstruction. This is the load-bearing step and the one most teams do worst. You need one ordered sequence across every system involved: the first symptom, the deploys and config changes before it, each downstream alert, and what autoscaling and failover did on their own. Most wrong hypotheses come from anchoring on when the alert fired instead of when the problem started.
4. Hypothesis formation. "The database is slow" isn't a hypothesis. "The 02:47 deploy cut the payment-gateway timeout from 10 seconds to 1, and gateway calls slower than that are producing the 502s" is one, because it predicts things you can check. Rank candidates by what changed most recently and what sits upstream of the most symptoms.
5. Verification. Test the hypothesis before acting on it, and look for disconfirming evidence on purpose. If the timeout change caused it, no error should predate 02:47, and every failing call should die at exactly one second. Teams that skip this ship "fixes" that do nothing, then restart the investigation with less trust and more panic. Debugging production incidents is the hands-on version of this step.
6. Remediation. Match the fix to your confidence. High confidence and reversible: roll back. Medium: mitigate structurally (scale out, raise a limit, disable a flag) while you keep investigating. If your procedures live in people's heads, write them down as runbooks.
7. Postmortem. A blameless postmortem turns the investigation into knowledge: the timeline, the contributing causes, what made detection or diagnosis slow, and owned follow-ups. The test is simple. Does the next similar incident get diagnosed faster because this one happened?
In practice, steps 3 to 5 loop. A hypothesis that fails verification sends you back to the timeline for the detail you missed.
01Order
Timeline
One ordered sequence of events across every system, anchored on when degradation began.
02Explain
Hypothesis
A falsifiable mechanism that predicts what the data should show.
03Test
Verify
Look for disconfirming evidence before acting. A miss sends you back to the timeline.
04Act
Remediate
The safest action for your confidence level, with evidence preserved.
One incident, end to end
Here's the process applied to the checkout example. The numbers are illustrative.
Detection and triage. At 03:12 the checkout error-rate alert fires: 502s at 7 percent and climbing. Payments are failing, so it's a sev-1. Nothing obvious to roll back yet.
Timeline. The error graph shows the inflection at 02:58, not 03:12. The alert evaluates over a 10-minute window, which explains the gap. Kubernetes events show no restarts or evictions in payments. Rollout history shows revision 7 of checkout went live at 02:47.
Hypotheses. Three readings fit, and each predicts something different:
- The deploy broke the payment call. Errors start with the first payment after 02:47 and hit every payment.
- The payment gateway is failing. Every service that calls the gateway sees errors, not only checkout.
- The deploy tightened a limit the gateway later crossed. Errors start only when gateway latency rises past the new limit, some minutes after the deploy.
Verification. Payments succeeded for eleven minutes after the deploy, which weakens the first reading. Errors began at 02:58, when the gateway's nightly settlement batch pushed its p99 from 400 ms to 1.4 s. The refunds service calls the same gateway with its own 10-second timeout and shows slower responses but no errors, which rules out the second reading. The revision diff shows PAYMENT_TIMEOUT_MS cut from 10000 to 1000, and every failing call in the checkout logs times out at exactly one second. The third reading holds.
Remediation. High confidence, reversible: kubectl rollout undo deployment/checkout -n payments. Errors drop within two minutes. The timeline, the diff and the gateway latency graph go into the incident doc before anyone forgets them.
Postmortem. Contributing causes: a config value changed in a review nobody flagged as risky, no alert on gateway latency against the client timeout, and a 10-minute alert window. Follow-ups: alert when gateway latency nears the timeout, add deploy markers to dashboards, and require a second reviewer for timeout and limit changes.
Why RCA is slow today
Ask an on-call engineer where incident time goes and the answer is rarely "thinking hard." It goes to assembling context. Four structural problems account for most of it.
01Data
Scattered
Metrics, logs, traces and changes in separate tools, each with its own time picker.
02Topology
In heads
The map of who calls whom lives with two or three senior engineers.
03Changes
Disconnected
Deploys, applies and flag flips never annotate the graphs where symptoms show.
04History
Write-only
Past incidents hold the best diagnostic data and nobody can find them.
The data is scattered. Metrics in Prometheus or CloudWatch, dashboards in Grafana or Datadog, logs in another index, traces in a third system, alerts in PagerDuty, deploys in CI, config in git, flags with another vendor. Each has its own query language, time picker and login, and every switch drops context. Nobody designed this. It accreted, one reasonable purchase at a time.
The topology lives in people's heads. Which services call which, which share a database, what depends on that Redis cluster: in most teams that map lives with two or three senior engineers. Service dependency mapping covers making it explicit.
Change history is disconnected from alerting. "What changed?" has no single place to be answered. Deploys are in CI, Terraform applies in a state backend, flag flips in a vendor dashboard, and none of them annotate the graphs where the symptoms show. The real culprit, a config push that bypassed CI, appears in none of those places.
Tribal knowledge doesn't transfer. The engineer who fixed this exact failure eight months ago left in March. Past incidents are your richest diagnostic dataset, and in most organizations they're effectively write-only.
Together, these are why an incident whose fix takes five minutes can take hours end to end. Why RCA takes hours breaks one such incident down minute by minute, and how to reduce MTTR covers measuring your own split.
RCA techniques in depth
Three techniques do most of the diagnostic work in cloud incidents. Each is manual today. Each is also mechanical enough to automate.
Timeline reconstruction
Build one ordered list of events across all systems, centered on when symptoms began. Work from the outside in: start with the symptom, then pull events from each layer for a window that starts well before the first alert.
In Kubernetes, cluster events are the fastest first pass. They capture restarts, failed probes, image pulls, evictions and scheduling failures across every namespace:
kubectl get events --all-namespaces --sort-by='.lastTimestamp'
Filter to warnings when the stream is too noisy:
kubectl get events --all-namespaces \
--field-selector type=Warning \
--sort-by='.lastTimestamp'
Events are kept for one hour by default (--event-ttl on the API server), so capture them early. The Kubernetes debugging documentation covers the wider toolkit.
On individual hosts, journalctl gives precise time-windowed logs across all units:
journalctl --since "2026-07-12 03:10:00" --until "2026-07-12 03:25:00" \
-o short-precise --no-pager
Scope it to one service with -u nginx.service, or one boot with -b. The journalctl manual documents the time-window syntax.
Two rules make timelines trustworthy. Normalize timezones immediately: a UTC log source next to a local-time dashboard has derailed more investigations than any technical subtlety. And record when things started degrading, not when alerts fired. Anchor your window on the metric inflection, not the page.
Dependency tracing
When several services fail at once, find where the failure started. The heuristic: the origin is upstream of everything that's failing and downstream of nothing that's failing.
Metrics broken down by service and status show propagation fastest. In Prometheus, the error ratio per service:
sum by (service) (rate(http_requests_total{status=~"5.."}[5m]))
/
sum by (service) (rate(http_requests_total[5m]))
Graph it across services and look at onset order. The service whose error ratio moved first is your prime suspect. Services that moved 30 to 90 seconds later are likely victims. The same pattern works for latency with histogram_quantile over request-duration histograms, as the Prometheus querying documentation shows.
Distributed traces answer the per-request version: for one failing request, which span actually errored or stalled, and which parents only inherited the failure. With OpenTelemetry, exemplars link a metric spike straight to sample traces from the spike window.
Change correlation
Treat every recent change as a suspect until it has an alibi: deploys, config pushes, flags, scaling events, certificate rotations, dependency bumps, cloud-provider maintenance.
For code, ask git what landed before symptom onset:
git log --all --since "2026-07-12 02:00" --until "2026-07-12 03:15" \
--oneline --no-merges
For Kubernetes workloads, check which revision is live and when it changed, then inspect the suspect revision:
kubectl rollout history deployment/checkout -n payments
kubectl rollout history deployment/checkout -n payments --revision=7
Rolling back is then one command (kubectl rollout undo deployment/checkout -n payments), which is why verified change correlation so often leads straight to mitigation.
In AWS, CloudTrail records who changed which resource, when and from where. Query the symptom window for write events:
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=ReadOnly,AttributeValue=false \
--start-time 2026-07-12T02:00:00Z \
--end-time 2026-07-12T03:15:00Z \
--max-results 50
This catches changes that never went through CI, like the console tweak or the manual security-group edit, which skip review and so show up often among incident triggers. The AWS Well-Architected reliability pillar treats change management as a reliability function for the same reason.
One caution: correlation in time is evidence, not proof. A deploy three minutes before the outage is the leading suspect, but verify the mechanism before you roll back something load-bearing. Sometimes the deploy and the incident share a cause, like a traffic spike that triggered both a scale-out and the failure, and rolling back only destroys evidence.
Manual RCA vs RCA with Resolve
Everything above is mechanical work over data your tools already hold. That's what makes it automatable without changing the method.
| Manual RCA | RCA with Resolve | |
|---|---|---|
| Grouping | One page per alert | Noise dropped, related alerts grouped into one incident |
| Timeline | Built by hand across many tabs | Assembled from connected tools as the investigation starts |
| Change correlation | Scrolling Slack and CI history | Rollouts, applies and cloud API writes checked against the window |
| Hypotheses | The first plausible story wins | Competing readings, each checked against the data it predicts |
| Trust in the cause | The engineer's confidence | An evidence label: Verified, Inferred or Cause unproven |
| Remediation | Whoever is awake runs commands | Proposed with evidence, through Auto Mode |
| Learning | A postmortem doc, if someone writes it | A recollection the next investigation reads first |
The deeper difference is when the method runs. The techniques in this guide are the right ones. They're just slow when a person has to run each query by hand at 3 a.m. Resolve runs them as soon as the incident opens.
In practice: Pulse drops duplicate, rate-limited, snoozed and known-noise alerts and groups the rest, so one outage becomes one incident. CloudThinker then reads the incident memory and the evidence through your connections, names the explanations that fit, and checks each one. The investigation only reads, and it can start subagents to check several services at once. The verdict carries an evidence label and a causal graph from the first failure to the visible impact, with every reading it ruled out on the timeline. Any fix, from a rollback to a scaling change, goes through Auto Mode, so you decide what runs on its own and what waits for approval. Inside an Investigation walks through one in detail, and Frontier Investigation Agents explains why we put the investigation, not the fix, at the center.
Where this series goes deeper
- Why RCA takes hours: one investigation, minute by minute
- Alert fatigue and triage: fixing detection and severity first
- Debugging production incidents: the verification craft, tool by tool
- Service dependency mapping: building and maintaining the map
- How to reduce MTTR: measuring and attacking each phase
- Building an incident response workflow with runbooks: writing the procedures down
- Runbook automation: from documented steps to executed ones
- Automated RCA with an AI SRE agent: delegating the correlation work
Getting started
Start with read-only credentials, on one service you know well:
"Checkout started returning 502s around 03:00. Build me a timeline of deploys, config changes and Kubernetes events in the hour before, and tell me which hypothesis the data supports. Propose only, change nothing."
"Which services started erroring first, and which look like victims of propagation? Show the onset times."
Connect a source and ask your first question in Resolve.



