HomeChallengesRepsProblemsLeaderboardTake a challenge

Retry, breaker, timeout — in that order

All the right resilience policies, stacked in the wrong order. The timeout caps all five retries together, the breaker is rebuilt on every request so it never opens, and a 404 gets retried five times.

Intermediate25 min on the clock7 graded checks · 100 pointsServices That Fail Politely

AssumesA deadline and a request to stopA per-call deadline linked to the caller’s token, written by hand. The timeout policy here does the same job, so it is worth knowing what it is doing for you.

Graded by reading your code against the checklist below.

What you build

  • Add the policies in the order retry, then breaker, then timeout
  • Share one circuit breaker across all requests
  • Retry transient failures only, not every non-success status
  • Treat a per-attempt timeout as transient, so it is retried
  • Back off exponentially, with jitter
  • Get the logger from the container the handler is given
  • Read the Catalogue URL from configuration

Done means

Retry outside breaker outside timeout, one shared breaker, transient errors only, exponential backoff with jitter, nothing hard-coded.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Retry, then breaker, then timeout+25Retrying what might work next time
  2. One circuit breaker, shared by every request+20Retrying what might work next time
  3. Only transient failures are retried+15Retrying what might work next time
  4. A timed-out attempt is retried+10Rate limiting and cancellation
  5. Exponential backoff with jitter+10Retrying what might work next time
  6. The logger comes from the real container+10Giving resources back
  7. The Catalogue URL comes from configuration+10Settings, not string literals

What it teaches

The rest of Services That Fail Politely