Limit number of simultaneous connections squid makes to a single server

Posted by Ben Voigt on Server Fault See other posts from Server Fault or by Ben Voigt
Published on 2012-11-26T00:40:27Z Indexed on 2012/11/26 11:09 UTC
Read the original article Hit count: 254

Filed under:

Note: I am asking about outbound concurrent connection limits, not inbound, which is sufficiently covered on existing questions

Modern browsers typically open a large number of simultaneous connections, to take advantage of the fact that TCP fairly shares bandwidth between connections. Of course, this doesn't result in fair sharing between users, so some servers have started penalizing hosts which open too many connections. This limit can be configured client-side (e.g. IE MaxConnectionsPerServer, Firefox network.http.max-connections-per-server), but the method differs for each browser and version, and many users aren't competent to adjust it themselves. So we turn to a squid transparent HTTP proxy for central management of HTTP download.

How can the number of simultaneous connections from squid to a remote webserver be limited, so the webserver doesn't perceive it as abuse of concurrent connections? Ideally the limit would be per source address. Squid should accept virtually unlimited concurrent requests from the client browser, and issue them sequentially to the remote server, only N at a time, delaying (but not dropping) the others.

© Server Fault or respective owner

Related posts about squid