Write a Retry Client With Jittered Backoff for App Store Connect

Last updated: November 29, 2026

Quick Overview

Write a client helper that calls a rate-limited HTTP API, retries throttling and transient server errors with capped exponential backoff and jitter, honors Retry-After, and gives up cleanly.

Apple
Software Engineering Fundamentals
Software Engineer
Apple
November 29, 2026
Software Engineer
Phone Screen
Software Engineering Fundamentals
Easy

0

0

0 solved


Write a client helper that calls a rate-limited HTTP API, retries throttling and transient server errors with capped exponential backoff and jitter, honors Retry-After, and gives up cleanly.

Internal tools and CI pipelines at Apple talk to rate-limited services such as App Store Connect and notarization. The interviewer checks that you know which failures are safe to retry, why jitter prevents synchronized retry storms, and how to keep the function testable.

What the Interviewer Expects
  • Retries only 429, 5xx, and connection errors; never retries other 4xx
  • Uses exponential backoff with a cap and full jitter
  • Honors the server's Retry-After header
  • Bounds attempts and raises a clear error at the end
  • Injects sleep and randomness so the logic is unit-testable
Key Topics to Cover
exponential backoff
jitter
HTTP status codes
idempotency
testability
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • Is it safe to retry a POST that creates a resource? How would idempotency keys help?
  • How would you add a total deadline across all attempts?
  • Why does full jitter beat equal jitter or no jitter under a fleet-wide outage?
  • How would a client-side circuit breaker change this?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • send() returns (status, headers, body) or raises a connection error.
  • Retry 429 and 500/502/503/504 and network errors; return immediately for 2xx and other 4xx.
  • Delay grows as base * 2^attem...
High-Level Design

A loop over attempts. Classify the outcome, return if final, otherwise compute a delay and sleep. sleep and rng are parameters so tests run instantly and deterministically. Full jitter (uniform be...


Submit Your Answer
Markdown supported