How does sleep with backoff_factor work in Python requests? or Is sleep with backoff_factor the best

18 Replies, 2029 Views

Why bother with sleep with backoff_factor when you can just YOLO it with fixed delays?

Kidding. Don’t do that.

Backoff is smarter because it adapts. Servers *hate* constant spam. If you’re getting 429s, your script is basically DDoSing them.

Fun fact: AWS SDKs use exponential backoff by default. So if it’s good enough for Amazon, it’s good enough for you.

Messages In This Thread



Users browsing this thread: 1 Guest(s)