Next cohort starts January 9.Apply ›

Backoff

Python Backoff Interview Questions

Backoff is waiting longer after each failed call instead of retrying straight away. An API answering 429 is asking for fewer requests, and a tight retry loop answers by sending more, which turns a brief rate limit into a sustained one.

What backoff questions ask you to do

Across the questions here, these are the shapes that come up:

  • Double the wait after each failure, up to a ceiling
  • Give the delay before each attempt, with no wait before the first
  • Add jitter so that many clients do not retry in step
  • Stop retrying an error that will fail the same way next time
  • Give up after a number of attempts or a total time

Common mistakes with backoff

Capping the exponent rather than the delay, which changes the shape of the curve instead of flattening its top. The other is retrying everything: a 400 means the request itself is wrong and will be wrong again, so only rate limits and transient failures are worth a second attempt.

Questions to practice

Roles this comes up in

Companies these come from

Other topics