Article View: linux.kernel.git
Article #2388Re: [PATCH v2 2/4] http: add exponential backoff without Retry-After
From: "brian m. carlson"
Date: Wed, 04 Nov 2026 22:05
Date: Wed, 04 Nov 2026 22:05
49 lines
11557 bytes
11557 bytes
--/lPWL3vq1S/IIFnB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2026-11-03 at 18:57:25, Ravi Mistry via GitGitGadget wrote: > From: Ravi Mistry <rmistry@google.com> >=20 > When a server returns HTTP 429 without a Retry-After header, Git waits > the same fixed http.retryAfter delay on every retry. If that delay is > short (e.g., 1s), Git burns through all of its retries in just a few > seconds before a busy server can recover. If that delay is long, even a > brief glitch has to wait a long time on the first retry. >=20 > Pass the 1-based retry attempt count to handle_rate_limit_retry() and > double http.retryAfter on each subsequent retry (1s, 2s, 4s, ..., via > http.retryAfter * 2^(attempt - 1)), clamping the delay at > http.maxRetryTime. This keeps the first retry fast while giving the > server more time to recover on later attempts, matching curl's own > --retry behavior (while keeping http.retryAfter's existing default of 0 > for immediate retries when unconfigured). When the server provides an > explicit Retry-After header, continue to honor the server-provided delay > (or fail fast if it exceeds http.maxRetryTime). 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. --=20 brian m. carlson (they/them) Toronto, Ontario, CA Speaking for myself only --/lPWL3vq1S/IIFnB Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- wr0EABYKAG8FgmrrrD0JEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z LnNlcXVvaWEtcGdwLm9yZ4OUnPvaVE10ltsZuSkOUYsAXAOv8ct8L2fPmddwgEof FiEECCzmip28ZfuD0cORfAxJYoiHooEAAPEHAQCNh62/6dft6ivlU9F2ny9M2MSm xQKOF9yqQsCkwVCTDAD8DL49I8SL9T41JIW9GUXPBeVHTa1tvn+egd1hVotbeQE= =kjjU -----END PGP SIGNATURE----- --/lPWL3vq1S/IIFnB--
Technical Details
Message-ID:
<auusPUaYRmUBDsdI@fruit.crustytoothpaste.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74493-linux-kernel-git=dewy.ruReferences:
<pull.2287.git.1793462224.gitgitgadget@gmail.com> <pull.2287.v2.git.1793732247.gitgitgadget@gmail.com> <fe1e847dede7579da911b5a9ba16c806b5332723.1793732247.git.gitgitgadget@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74493-linux-kernel-git=dewy.ru
From: sandals@crustytoothpaste.net ("brian m. carlson")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 2/4] http: add exponential backoff without Retry-After
Date: Wed, 4 Nov 2026 22:05:50 +0000
Organization: Usenet Network
Message-ID: <auusPUaYRmUBDsdI@fruit.crustytoothpaste.net>
References: <pull.2287.git.1793462224.gitgitgadget@gmail.com>
<pull.2287.v2.git.1793732247.gitgitgadget@gmail.com>
<fe1e847dede7579da911b5a9ba16c806b5332723.1793732247.git.gitgitgadget@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="/lPWL3vq1S/IIFnB"
Injection-Info: usenet.network;
logging-data="3548053"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:q4Z8OssagAlLkhFXvoJ1qGS8esc= sha256:RtMTiq6DCo3BBD85gr5+97k+Gx7COcF/LvEDDC+6MbM=
sha1:YV2v3AioBr8C5RYs6QKG1YqL/YI= sha256:kid+0dSUWPwQlGcw5Wt22MPj9GpJUXWvapbEqzTySBY=
Content-Disposition: inline
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id D1E19112E1E; Thu, 5 Nov 2026 06:02:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (3072-bit key)
header.d=crustytoothpaste.net
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id KCtOdR-oag1l;
Thu, 5 Nov 2026 06:02:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-74493-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id 5BB9F112E6E; Thu, 5 Nov 2026 06:02:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id 85ABBA0D5B; Wed, 4 Nov 2026 22:20:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793829959;
b=whdJ/E9Wp0UKEzxsJXlRujAn9TWuxUIu6N07vLUMAXQVtwlGWBeXhEdUK+gE769g0Zw1
kc0AdJJ/SCw80rCB3+86YZi+DO5cY6TYfnD6D0OvE2WVJmo4xfyqhvoX3onWbIRO3F1AT
/xonS9TKLqn6eREE/U0EIJAsvsVRWexnKyW/CuCETfX6/1hw6R3o1Vh3KwwNJSpzXUxYK
Is+Zme5R16bMsLTxhwARDKEoxH8IflPUbN9ZNrlEXgM1dvYDHgmA8h6d247UdGOe/aJij
/ytDQUQpXAkyPJeMBo3ew1x9Lr+HAJ2nmvdksw84d4L3u1D165uDZ31QX0JBEiKmmkw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793829959;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To:User-Agent;
bh=BTPyjbT4uva0pqZjUTUXL5utzniKm0aUAEHXaNGLRSk=;
b=kyCgxAd8v/LhNQ986JMrGhxvtovDdaHhXEWkmZ8Aa7j24xXLeo3I4wI5R3jPAdadEvcE
hs3ZAgtk/SsEzIczLmiDLNmerY5WkZFVXqNpNmngXBvj4PrkQZc8yB0C9fxIB7ljN14Ml
T0PZzdNjUtMC/Vmn1YlC7Bt48Jq1vQors9Ja4YdBj9oya0MrxPX4aiQPAktoEMXcQc/5m
xU5eYyOppWLXAPq0RtE7OdH+gpk6dQ8sPA63nIcYvUBABhbSEPuJ0anRKNJaBQGPm9nN+
WX7sJclzv/dNvX+Xh/VxNzBdc+Zfu9LF7CCGzNYykKakeOmIQV5D+ONbUCB7aptT85Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=esKqKGUE;
dmarc=none header.from=crustytoothpaste.net;
spf=pass smtp.mailfrom=crustytoothpaste.net;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DA4D9606CA3D;
Wed, 4 Nov 2026 22:05:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (3072-bit key, unprotected) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=esKqKGUE
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=172.105.7.114
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793829959;
b=NE3wuqCeoN6WDFurdPb50+UZ3RpsZ2tzDxRJZf79GchcXiI3ofG4JwrJLUpwLHVfZFbb
3C7Rh152sw1rC+ag01CtuBU7SJOoITITDh7owrxYbwPiH9P9DKoxP/h6D++du5iEA4yRL
ZQDx4W/FeP2/+GnYYL8zpt1dXgSS6hNbERGldBXKYkforbBpJhPJoz+xCVEGhWxlOGmoG
DStXAphosvsDgAnOT6IG4yt4TG+BwNj/ch79JTltNaev18QDCHQhbTEp/ESoCJpu9OSqT
4w1VGDoC9RXB9fZb0PHGtgpuoFJRBT+s3dR/iJyeNcfYBXtlL/nf9SOb78LirP/6pbA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793829959;
h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To:User-Agent;
bh=BTPyjbT4uva0pqZjUTUXL5utzniKm0aUAEHXaNGLRSk=;
b=mAFa5HTnVDJ4ieepfbwftk5f/Q0WwA1FZ+ZACmzWNshEmFFTwMTqbbH+aOSOS+/XM0K2
CgfRliYI211tQXw4EW35GQmj90PD6dTl1wJiG8tAgnDzC53KtFUNvGV9oug9fTshnRavx
GIOQvc3ND1K8O5sC1EQx4KgM6PP0yGbP+5IJvVkedfg8ODVNctYouenNPvKK8eEq9Ic8x
shNlcFpvyvkEnDhWUTnd9wd8NSLJdDy6N92ilVT4wkwGkD2E0M9Wxx0ZviqOYs6PgJOKO
rhKfGdOkJ3QivUiDQxD86PLI2I83b6/wbVwh9d1GvQGuCa5bcXXpowBNxLyLaXortwQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=crustytoothpaste.net;
spf=pass smtp.mailfrom=crustytoothpaste.net;
dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=esKqKGUE;
arc=none smtp.remote-ip=172.105.7.114
X-Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E840B606CA37
for <git@vger.kernel.org>; Wed, 4 Nov 2026 22:05:57 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E840B606CA37
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net;
s=default; t=1793829951;
bh=ne5YXscipw4rRDgLlUJx21T01HjxmtnS3L+S0zfdVEY=;
h=Date:From:To:Cc:Subject:References:Content-Type:
Content-Disposition:In-Reply-To:From:Reply-To:Subject:Date:To:CC:
Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References:
Content-Type:Content-Disposition;
b=esKqKGUEewaTpgySqt33PG0Y+35JAtu2eaBqO2h2kEXtPZeOiVPOpt7N2z38ACjgK
2tQ2tGX34SH6fJJ3zPOjCXMlKCBbKJHOvO1D1MXCZ+lcLfAwItZohFBkM7yh7+DwpC
0udBybW95+Sf1GScfqjNNaaV0X3EDkVNHmjHHtIEbyjNrI0Vow5yqmR/KXd6wHAGNa
yJ/MGfeZn2udgEYGaCvKzyA2K0tdAJ8NF41tK/ZjDjOh9pYjUQmlhbKmpwjbwidpmI
4T98EfHlTXjlbfHoeoILniug7me/dyFocqy+uX0jELAF4rm3Hgl6iCN4+Ci0gpk+IF
Jxy87GHqJ+VpcHzyPSK/q1MMcDLzwxXPyEK4d/XQLtHM0ujtasnGgjGnyIMh1lz83n
sxZUr2D346wxDdi4GTqFjR79p3+sBnK83kHeuKTeuIT591M/YVtoXWz6ZKbyxSZdt8
fMkoVfjbvnmZNpZ+pidOSodJoE7pLOfU2tEf0FFmyraXWHtUAyB
X-Received: from fruit.crustytoothpaste.net (unknown [IPv6:2607:f2c0:f00f:f901:e583:5f34:4c85:81fa])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 7D95520069;
Wed, 4 Nov 2026 22:05:51 +0000 (UTC)
X-Cc: git@vger.kernel.org, Vaidas Pilkauskas <vaidas.pilkauskas@shopify.com>,
Patrick Steinhardt <ps@pks.im>, Ravi Mistry <rmistry@google.com>
X-Mail-Followup-To: "brian m. carlson" <sandals@crustytoothpaste.net>,
Ravi Mistry via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org,
Vaidas Pilkauskas <vaidas.pilkauskas@shopify.com>,
Patrick Steinhardt <ps@pks.im>, Ravi Mistry <rmistry@google.com>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <fe1e847dede7579da911b5a9ba16c806b5332723.1793732247.git.gitgitgadget@gmail.com>
X-User-Agent: Mutt/2.4.1 (2026-07-04)