Search DistillSys

Find a concept

Type at least two characters to search lessons, designs, papers, and interview prep.

Reliability incident · Senior

Checkout is melting under a retry storm

A slow payment dependency turns ordinary retries into a cascading failure across checkout.

01
Establish the operating contract

Incident brief

Business impact

Checkout handles 18k requests per second during a flash sale. Abandoned carts are rising by 4,000 per minute.

Current architecture

API gateway → checkout service → inventory reservation and payment authorization. Each layer retries twice with exponential backoff, but deadlines are not propagated.

Protected invariant

A customer must never be charged twice, and confirmed inventory must not be silently lost.

Constraints
  • The payment provider cannot be changed during the incident.
  • The business will accept degraded conversion before duplicate charges.
  • Inventory reservations expire after 12 minutes.
02
Build a causal model

Evidence timeline

  1. Payment p99 rises from 380 ms to 4.8 s; error rate remains below 2%.

  2. Checkout concurrency triples and outbound payment traffic reaches 2.7× incoming traffic.

  3. Thread pools saturate; healthy inventory calls now time out behind payment work.

  4. Payment recovers, but checkout remains overloaded and queues continue growing.

03
Reason before revealing

Your response

1Diagnose

What evidence distinguishes dependency slowness from insufficient checkout capacity?

Need a nudge?

Compare arrival rate, useful completions, retry amplification, queue time, and saturation.

2Stabilize

Which controls do you apply first, and in what order?

Need a nudge?

Protect the invariant and stop amplification before adding capacity.

3Recover

How do you resolve timed-out payments and inventory reservations safely?

Need a nudge?

A timeout is an unknown outcome, not a failed operation.

4Prevent

What service contract and telemetry would keep this failure bounded next time?

Need a nudge?

Think deadlines, budgets, admission control, operation identity, and recovery probes.

04
Compare reasoning, not wording

Model response

Reveal structured response
Diagnosis

This is retry amplification plus queue collapse. A slow dependency increases in-flight work; layered retries multiply it; expired callers leave useless work consuming capacity. The fact that checkout stays unhealthy after payment recovers points to backlog and synchronized retries, not a permanent capacity shortage.

Stabilize now
  1. Freeze nonessential changes and declare duplicate charge prevention the protected invariant.
  2. Disable or sharply budget retries at one controlled layer; propagate remaining request deadlines.
  3. Cap payment concurrency and shed low-priority or already-expired checkout work.
  4. Open a circuit for new payment attempts while allowing sparse, jittered recovery probes.
Recover safely
  1. Reconcile every ambiguous authorization by stable payment-attempt ID before retrying.
  2. Return recorded outcomes for duplicate idempotency keys instead of reapplying side effects.
  3. Drain or discard expired queue entries, then ramp admission gradually while watching useful throughput.
  4. Reconcile inventory holds against durable payment outcomes before releasing or confirming them.
Prevent recurrence
  1. One end-to-end retry budget, not independent retries at every hop.
  2. Persist idempotency key and payment outcome atomically with checkout state.
  3. Alert on retry amplification, queue age, deadline-exceeded work, and useful completion rate.
  4. Test slow dependencies and recovery waves with load, not only hard failures.
05
Use evidence-based self-assessment

10-point rubric

Your score0 / 10

Check only the signals your answer demonstrated.

Common traps
  • Blindly increasing retry count
  • Treating every timeout as a failed payment
  • Autoscaling checkout without limiting downstream concurrency
  • Closing the incident as soon as payment latency recovers
06
Strengthen the underlying concepts

Related refreshers