From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Ravi Mistry <rmistry@google.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org,
Vaidas Pilkauskas <vaidas.pilkauskas@shopify.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2 2/4] http: add exponential backoff without Retry-After
Date: Thu, 5 Nov 2026 22:32:52 +0000 [thread overview]
Message-ID: <au0EE96afsApvfZM@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <CAF+mdifcp+qkESZzd=8SmrL6eckxAQXR-4nxxSuL=xCV48OhVQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
On 2026-11-05 at 00:10:10, Ravi Mistry wrote:
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > 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.
I can't imagine a situation where 1s is a reasonable backoff for a 429
response since I can't imagine how the load could reasonably decrease in
that amount of time. I suggested 30 seconds because that's a reasonable
amount of time to back off and allow load to go down (and I think that
30, 60, and 120 seconds is a reasonable set of timeframes), but I'd say
it should be at the very least 10 seconds. I've seen cases where users
retry very aggressively and it increases the load on the server so they
just get rate-limited way, way more than if they'd been more gentle and
waited a little bit longer.
Note that the curl binary often makes very cheap requests, such as
static pages or small files, but we are making what are almost certainly
very expensive requests requiring a substantial amount of server
computation, so the curl defaults are almost certainly not right here.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]
next prev parent reply other threads:[~2026-11-05 22:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 15:57 [PATCH 0/4] http: exponential backoff, configurable status codes, and post_rpc() retries Ravi Mistry via GitGitGadget
2026-10-31 15:57 ` [PATCH 1/4] http: fix retry count and Retry-After timing Ravi Mistry via GitGitGadget
2026-11-03 1:03 ` Junio C Hamano
2026-11-03 19:05 ` Ravi Mistry
2026-10-31 15:57 ` [PATCH 2/4] http: add exponential backoff without Retry-After Ravi Mistry via GitGitGadget
2026-11-03 13:21 ` Junio C Hamano
2026-11-03 19:05 ` Ravi Mistry
2026-10-31 15:57 ` [PATCH 3/4] http: add http.retryStatusCodes config option Ravi Mistry via GitGitGadget
2026-11-03 13:41 ` Junio C Hamano
2026-11-03 19:06 ` Ravi Mistry
2026-10-31 15:57 ` [PATCH 4/4] remote-curl: retry transient HTTP errors in post_rpc() Ravi Mistry via GitGitGadget
2026-11-03 14:47 ` Junio C Hamano
2026-11-03 18:57 ` [PATCH v2 0/4] http: exponential backoff, configurable status codes, and post_rpc() retries Ravi Mistry via GitGitGadget
2026-11-03 18:57 ` [PATCH v2 1/4] http: fix retry count and Retry-After timing Ravi Mistry via GitGitGadget
2026-11-03 18:57 ` [PATCH v2 2/4] http: add exponential backoff without Retry-After Ravi Mistry via GitGitGadget
2026-11-04 22:05 ` brian m. carlson
2026-11-05 0:10 ` Ravi Mistry
2026-11-05 17:45 ` Junio C Hamano
2026-11-05 22:32 ` brian m. carlson [this message]
2026-11-06 16:27 ` Ravi Mistry
2026-11-03 18:57 ` [PATCH v2 3/4] http: add http.retryStatusCodes config option Ravi Mistry via GitGitGadget
2026-11-03 20:56 ` Junio C Hamano
2026-11-03 18:57 ` [PATCH v2 4/4] remote-curl: retry transient HTTP errors in post_rpc() Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 0/5] http: exponential backoff, configurable status codes, and post_rpc() retries Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 1/5] http: fix retry count and Retry-After timing Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 2/5] http: add exponential backoff without Retry-After Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 3/5] http: add http.retryStatusCodes config option Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 4/5] remote-curl: retry transient HTTP errors in post_rpc() Ravi Mistry via GitGitGadget
2026-11-07 3:40 ` [PATCH v3 5/5] http: default http.retryAfter to 10 seconds Ravi Mistry via GitGitGadget
2026-11-07 4:37 ` [PATCH v3 0/5] http: exponential backoff, configurable status codes, and post_rpc() retries Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=au0EE96afsApvfZM@fruit.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=rmistry@google.com \
--cc=vaidas.pilkauskas@shopify.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox