git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/4] http: add exponential backoff without Retry-After

From
RMRavi Mistry <rmistry@google.com>
Date
Nov 5, 2026, 00:10 UTC
Message-ID
<CAF+mdifcp+qkESZzd=8SmrL6eckxAQXR-4nxxSuL=xCV48OhVQ@mail.gmail.com>
In-Reply-To
<auusPUaYRmUBDsdI@fruit.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 6 quoted lines
> We should not immediately retry on a 429 response, even if that's the
> behaviour we have now.  The server told us we were being too aggressive,
> so the exact thing we should not do is to continue making requests.  As
> a server operator, I definitely don't want this behaviour; instead, we
> should pick something sensible if no Retry-After is given, such as 30
> seconds.

Makes sense. Junio noted on v1 as well that defaulting http.retryAfter to 0 does not mesh well with exponential backoff.

What do you think about defaulting http.retryAfter to 1 second, matching curl's --retry behavior (1s, 2s, 4s, ...)? Because the delay doubles on each attempt (and Patch 3/4 also reuses http.retryAfter for opt-in transient 5xx retries), starting at 30s would turn 3 retries into 30s, 60s, and 120s. Starting at 1s avoids hammering the server immediately while ramping up on repeated failures.

If 1s sounds reasonable, I can send a v3 with that change.
Thanks!
Previous: brian m. carlsonNext: Ravi Mistry via GitGitGadget
Message 17 of 20 in “http: exponential backoff, configurable status codes, and post_rpc() retries”
  1. 0/4 http: exponential backoff, configurable status codes, and post_rpc() retriesRavi Mistry via GitGitGadget, Oct 31, 2026
  2. 1/4 http: fix retry count and Retry-After timingRavi Mistry via GitGitGadget, Oct 31, 2026
  3. Junio C HamanoNov 3, 2026
  4. Ravi MistryNov 3, 2026
  5. 2/4 http: add exponential backoff without Retry-AfterRavi Mistry via GitGitGadget, Oct 31, 2026
  6. Junio C HamanoNov 3, 2026
  7. Ravi MistryNov 3, 2026
  8. 3/4 http: add http.retryStatusCodes config optionRavi Mistry via GitGitGadget, Oct 31, 2026
  9. Junio C HamanoNov 3, 2026
  10. Ravi MistryNov 3, 2026
  11. 4/4 remote-curl: retry transient HTTP errors in post_rpc()Ravi Mistry via GitGitGadget, Oct 31, 2026
  12. Junio C HamanoNov 3, 2026
  13. 0/4 http: exponential backoff, configurable status codes, and post_rpc() retriesRavi Mistry via GitGitGadget, Nov 3, 2026
  14. 1/4 http: fix retry count and Retry-After timingRavi Mistry via GitGitGadget, Nov 3, 2026
  15. 2/4 http: add exponential backoff without Retry-AfterRavi Mistry via GitGitGadget, Nov 3, 2026
  16. brian m. carlsonNov 4, 2026
  17. Ravi MistryNov 5, 2026
  18. 3/4 http: add http.retryStatusCodes config optionRavi Mistry via GitGitGadget, Nov 3, 2026
  19. Junio C HamanoNov 3, 2026
  20. 4/4 remote-curl: retry transient HTTP errors in post_rpc()Ravi Mistry via GitGitGadget, Nov 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.