Search squid archive

Re: Setting SO_KEEPALIVE on outbound connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-01-28 08:33, eam wrote:
Hi all,

I have a squid cache behind a stateful network device which drops idle TCP connections after 300 seconds. I need to ensure TCP level keepalives are
set both for traffic to squid (accept) as well as traffic from squid
(connect) in order to support long-lived connections with idle periods.

I've found the "http_port keepalive" option, which does set SO_KEEPALIVE on the accept end of squid. But this directive doesn't set keepalives for
outbound traffic, which I need as well.

Would squid folks be receptive to a patch that adds a toplevel config
directive to set SO_KEEPALIVE on all connections, both inbound and
outbound? Or have I overlooked something and is this possible today? I'm relatively unfamiliar with Squid and am just starting to paw through the
source to see what achieving this would take.

We do not have anything configurable today doing this.

Patches are welcome on the squid-dev mailing list, please see the patch submission requirements at http://wiki.squid-cache.org/MergeProcedure

Your patch should probably call commSetTcpKeepalive() for any the server connection when the following timeouts are set: icap_io_timeout, ident_timeout, read_timeout, request_timeout, server_idle_pconn_timeout, write_timeout using the configured values for those timeouts as the maximum keep-alive period.

Amos





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux