From: Jeff King <peff@peff.net>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2 4/4] http.c: allow custom TCP keepalive behavior via config
Date: Tue, 1 Apr 2025 05:16:06 -0400 [thread overview]
Message-ID: <20250401091606.GC21089@coredump.intra.peff.net> (raw)
In-Reply-To: <3fe62181e563d011d4a6374ed7894cc4ea807316.1742423021.git.me@ttaylorr.com>
On Wed, Mar 19, 2025 at 06:23:56PM -0400, Taylor Blau wrote:
> For those users and others who wish to more finely tune the OS's
> keepalive behavior, expose configuration and environment variables which
> allow setting curl's KEEPIDLE, KEEPINTVL, and KEEPCNT options.
OK. I have never wanted those myself, but I have no problem with other
people using them. ;)
The implementation mostly looks as I'd expect, but...
> +http.keepAliveIdle::
> + Specifies how long in seconds to wait on an idle connection
> + before sending TCP keepalive probes (if supported by the OS). If
> + unset, curl's default value is used. Can be overridden by the
> + `GIT_HTTP_KEEPALIVE_IDLE` environment variable.
...while this environment variable (and its siblings) makes sense to
me....
> @@ -1382,6 +1409,10 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
> ssl_cert_password_required = 1;
> }
>
> + set_long_from_env(&curl_tcp_keepidle, "GIT_TCP_KEEPIDLE");
> + set_long_from_env(&curl_tcp_keepintvl, "GIT_TCP_KEEPINTVL");
> + set_long_from_env(&curl_tcp_keepcnt, "GIT_TCP_KEEPCNT");
...we seem to use different names in the code.
I think the ones mentioning HTTP make the most sense, to match the
config (and since this only affects curl).
-Peff
next prev parent reply other threads:[~2025-04-01 9:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 22:21 [PATCH 0/3] http: support fine-tuning curl's keepalive behavior Taylor Blau
2025-03-18 22:21 ` [PATCH 1/3] http.c: introduce `set_long_from_env()` for convenience Taylor Blau
2025-03-19 16:00 ` Elijah Newren
2025-03-19 16:00 ` Patrick Steinhardt
2025-03-19 18:02 ` Taylor Blau
2025-03-18 22:21 ` [PATCH 2/3] http.c: inline `set_curl_keepalive()` Taylor Blau
2025-03-19 16:01 ` Elijah Newren
2025-03-18 22:21 ` [PATCH 3/3] http.c: allow custom TCP keepalive behavior via config Taylor Blau
2025-03-19 16:00 ` Patrick Steinhardt
2025-03-19 16:15 ` Elijah Newren
2025-03-19 18:05 ` Taylor Blau
2025-03-19 22:23 ` [PATCH v2 0/4] http: support fine-tuning curl's keepalive behavior Taylor Blau
2025-03-19 22:23 ` [PATCH v2 1/4] http.c: remove unnecessary casts to long Taylor Blau
2025-03-19 22:23 ` [PATCH v2 2/4] http.c: introduce `set_long_from_env()` for convenience Taylor Blau
2025-03-20 5:24 ` Patrick Steinhardt
2025-04-01 9:10 ` Jeff King
2025-03-19 22:23 ` [PATCH v2 3/4] http.c: inline `set_curl_keepalive()` Taylor Blau
2025-04-01 9:12 ` Jeff King
2025-03-19 22:23 ` [PATCH v2 4/4] http.c: allow custom TCP keepalive behavior via config Taylor Blau
2025-04-01 9:16 ` Jeff King [this message]
2025-03-19 22:49 ` [PATCH v2 0/4] http: support fine-tuning curl's keepalive behavior Elijah Newren
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=20250401091606.GC21089@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=ps@pks.im \
/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;
as well as URLs for NNTP newsgroup(s).