The interview problem

Practice prompt

A checkout read traverses three services. During a dependency outage each layer retries independently. Design a retry protocol that recovers transient failures without multiplying overload.

Original practice, not a reported company interview. All scenarios and worked numbers are illustrative. Interview date: not applicable. Sources retrieved September 30, 2026.

1. Scope and assumptions

Assume idempotent reads, a 900 ms end-to-end deadline and no guarantee that a timed-out attempt stopped executing. This guide addresses attempt ownership and amplification, rather than routing around unhealthy hosts.

2. Worked approach

deadline + request ID
  → retry owner
  → token/deadline check
  → dependency
  → classified outcome

Choose one retry owner for each downstream operation. Carry an absolute deadline and logical request ID through the call chain. Before an attempt, reserve time for returning its response and refuse work whose remaining budget is inadequate. Retry only classified transient failures and apply randomized backoff.

Maintain a bounded retry-token pool per destination and tenant, replenished in proportion to original accepted traffic. Every extra attempt consumes a token; creating a new process must not create unlimited retry capacity. The server also enforces admission limits because clients can be outdated. Propagate cancellation, but account for work continuing after cancellation.

3. Calculate the example

If each of three layers allows three total attempts, one logical call can induce 3³ = 27 deepest-service attempts. At 2,000 logical requests/s that is up to 54,000 attempts/s for this single-call-per-layer topology. A shared policy allowing at most 100 extra attempts per 1,000 originals instead caps admitted attempts at 2,200/s, provided every retry path obeys it. It does not guarantee completion. With 250 ms per attempt and two 100 ms pauses, three attempts consume 950 ms and cannot fit the 900 ms deadline.

4. Failure cases and trade-offs

A gateway that discards request identity on timeout can bypass deduplication. A retryable overload error can keep a failing dependency saturated. Log original and extra attempts separately and reject recursive retries even when a lower layer hides its policy.

One retry owner is easier to reason about but may lack transport-local knowledge. Allow a tightly bounded transport retry only if charged to the same budget. Hedged requests also count as extra attempts; they are not free latency improvements.

5. Validate the result

Inject timeouts after server admission and verify the total attempt bound, deadline enforcement and continued-work accounting. Measure useful completions per CPU second, not only successful retry percentage.

6. Interview follow-ups and self-review

What changes for a payment mutation? Where is the idempotency result retained? How does the budget survive client restarts?

Reward a concrete attempt bound, one accountable retry owner, deadline arithmetic and a distinction between cancellation and stopped work.

Sources and related practice

Technical reference: sre.google — Retry amplification and bounded retry policies; the protocol and figures here are original.

Exact publication/update date not established in this review. Retrieved September 30, 2026. This reference supports the named technical concept; the proposed workflow and examples are original, not a documented vendor implementation or interview report.

Continue with Route around failing service dependencies; Design a distributed rate limiter.

Continue your preparation

Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.