HTTP1.1 connection pool and Keep-Alive header?

Skip to first unread message

Eric Covener

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 ( 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.


Eric Lawrence

Jul 25, 2022, 12:53:32 PM7/25/22
to net-dev,
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

Jul 25, 2022, 12:58:30 PM7/25/22
to net-dev, Eric Lawrence, says "By-design" that this isn't supported.

Eric Covener

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