From: Junio C Hamano <gitster@pobox.com>
To: Ravi Mistry <rmistry@google.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
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, 05 Nov 2026 09:45:00 -0800 [thread overview]
Message-ID: <xmqqa4nnw4tf.fsf@gitster.g> (raw)
In-Reply-To: <CAF+mdifcp+qkESZzd=8SmrL6eckxAQXR-4nxxSuL=xCV48OhVQ@mail.gmail.com> (Ravi Mistry's message of "Wed, 4 Nov 2026 16:10:10 -0800")
Ravi Mistry <rmistry@google.com> writes:
> "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.
>
> If 1s sounds reasonable, I can send a v3 with that change.
I am not brian and I cannot tell why he suggested "such as 30 seconds",
but matching what somebody else like curl does sounds sensible, if
you ask me.
Thanks.
next prev parent reply other threads:[~2026-11-05 17:45 UTC|newest]
Thread overview: 21+ 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 [this message]
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
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=xmqqa4nnw4tf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=rmistry@google.com \
--cc=sandals@crustytoothpaste.net \
--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