Saga Compensation Cascade
SEV-2, Significant ImpactLinear propagation · consistency · Affects 0 scenario(s)
Severity Classification
Classified as CRITICAL based on failure mode severity.
Propagation Chain
Origin component
Saga Compensation Cascade begins at the source component. Trigger: Compensating service is unavailable when compensation is triggered (same failure that caused the original step to time out).
Immediate (T+0) · Signal: Alert
Downstream dependents
Failure propagates to directly dependent components via synchronous calls or shared resources. Latency increases and error rates rise on affected dependencies.
5–30 minutes via saga state monitoring (alert on sagas in "compensating" state for >5 minutes). Without explicit saga state monitoring, detection occurs when customers escalate stuck orders, typically 30–120 minutes after the incident. · Signal: Latency spike, connection timeout, or error rate increase on dependents
Blast Radius
Each stuck saga locks business resources (inventory, payment authorization, reservation slots) for the duration of the stuck state. At scale, this produces ghost reservations that are never released, causing false inventory unavailability and customer-visible order failures. The financial impact includes charged-but-not-fulfilled payments, voided-but-already-fulfilled payments, or both, depending on which step timed out and whether compensation partially succeeded.
Contributing Factors
This operational trigger enables Saga Compensation Cascade: Compensating service is unavailable when compensation is triggered (same failure that caused the original step to time out)
This operational trigger enables Saga Compensation Cascade: Saga step timeout threshold too short for external payment or logistics provider latency variance
This operational trigger enables Saga Compensation Cascade: Compensation transaction is not idempotent, causing retry logic to abort after first attempt fails
Mitigation Gaps
Identify and document at least one architectural change that prevents Saga Compensation Cascade from occurring (not just recovering from it).
Remediation Plan
Query the saga state store for all sagas in "compensating" state with age > 10 minutes
Effort: Minutes to hours (on-call response)
For each stuck saga, determine which compensation steps have succeeded and which are pending
Effort: Minutes to hours (on-call response)
Manually execute compensation steps that cannot be retried automatically, using the idempotency key to check if already applied
Effort: Minutes to hours (on-call response)
Every compensating transaction must accept an idempotency key (saga_id + step_id) and deduplicate on it at the target service. The target service checks if the compensation was already applied (SELECT 1 FROM compensation_log WHERE idempotency_key = $1) before executing, and returns success if it was. This makes compensation retries safe and allows the saga coordinator to retry stuck compensations indefinitely without risk of double-application.
Effort: 1 day to 1 week
Set saga step timeouts to 3x the p99 latency of the target service SLA (e.g., if payment provider p99 is 2 seconds, set step timeout to 6 seconds). Monitor external provider latency separately from saga timeout configuration. Reduces the frequency of timeout-triggered compensation without increasing end-user wait time beyond acceptable bounds for most requests.
Effort: 1 day to 1 week
Configure alerts for: alert, log errors, error rate spike. Set thresholds to fire at 70% of critical level to allow response before full failure.
Effort: 1–3 days
Store all saga state transitions in a persistent store (outbox table in PostgreSQL, or a dedicated saga log). Use the outbox pattern to enqueue compensation messages: compensation steps are written to an outbox table atomically with the saga state update, then polled and delivered by a reliable outbox consumer. If the saga coordinator crashes, the outbox consumer restarts and re-delivers unacknowledged compensation messages. This makes compensation delivery at-least-once and durable across coordinator failures.
Effort: 1–4 sprints
This post-mortem framework is derived from structured architecture knowledge. It provides an evidence-grounded starting point, not a substitute for a live incident review conducted by the team closest to the system. Adjust remediation priorities based on actual runtime observations.