HTTP1.1 connection pool and Keep-Alive header?

44 views
Skip to first unread message

Eric Covener

unread,
Jul 22, 2022, 8:15:42 PM7/22/22
to net-dev
Hello, I am investigating some issues related to the roughly simultaneous chrome reuse and server-side close of a HTTP/1.1 keepalive connection on an XHR POST.

Does chromium parse the Keep-Alive response header to setup a max TTL on connections put into the pool to try to avoid these races?  Any hints about where i could see this in the chromium source if there is anything like this?

I am familiar with this (https://bugs.chromium.org/p/chromium/issues/detail?id=377581) change where a 408 response in place of a connection closure can be used to help this kind of race, but for the moment I am focusing on how we might be able to avoid the race.

Thanks.

Eric Lawrence

unread,
Jul 25, 2022, 12:53:32 PM7/25/22
to net-dev, cov...@gmail.com
As far as I know, no, Chromium does not attempt to control connection pool duration via a Keep-Alive value.


  • By default, an idle socket (not waiting on a response) will live for five minutes awaiting reuse


Eric Lawrence

unread,
Jul 25, 2022, 12:58:30 PM7/25/22
to net-dev, Eric Lawrence, cov...@gmail.com
https://bugs.chromium.org/p/chromium/issues/detail?id=131960 says "By-design" that this isn't supported.

Eric Covener

unread,
Jul 25, 2022, 12:59:32 PM7/25/22
to net-dev, Eric Lawrence
Great find, thanks for both responses!
--
Eric Covener
cov...@gmail.com
Reply all
Reply to author
Forward
0 new messages