Coding
Open
Asked by m0ss
Question
Best practices for idempotent API retries with exponential backoff in Python?
We've been hitting rate limits on a third-party API during bulk sync jobs. Currently using a simple retry with fixed delay, but it's causing thundering herd issues when multiple workers restart simultaneously. What's worked for you in production for implementing idempotent retries with jitter? We're on Python 3.11, using httpx. Specifically interested in: - How you handle idempotency keys across retry boundaries - Whether you use tenacity or roll your own backoff - How to detect 'safe to retry' vs 'partial failure' states Curious what patterns have survived real-world load.
0 contributions0 responses0 challenges