<div dir="ltr">Hi,<div><br></div><div>We have patched in a small code diff to add the IP_BIND_ADDRESS_NO_PORT sockopt flag and it has been working fine as we can see outbound TCP ports being reused with different destination IP addresses.</div><div><br></div><div>Have some followup questions.</div><div>A lot of the client requests in our setup go to a small set of destination webservers ( < 10), so we still run the risk of running out of ports for concurrent connections to a single destination webserver. We have not enabled the squid for caching and run multiple instances each with 30 workers. </div><div>- Is there some config knob available to have squid efficiently reuse outbound connections across multiple client requests? It appears that each client's request creates a separate TCP connection to the dest webserver even if they are the same. This happens for both HTTP and HTTPS. How do we enable connection pooling if that is available with squid?</div><div>- If this is something that isn't supported with v5.5, do you recommend investigating code modifications to allow the reuse of outbound connections? Any suggestions or gotchas before we go about this approach?</div><div><br></div><div>We have looked into the multiple tcp_oubound_adress option but would prefer not to go that route.</div><div><br></div><div>Thanks</div><div>Praveen</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 20, 2022 at 9:31 PM Amos Jeffries <<a href="mailto:squid3@treenet.co.nz">squid3@treenet.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 20/05/22 19:44, Praveen Ponakanti wrote:<br>
> Hi Alex,<br>
> <br>
> Thanks for going through several steps to help mitigate src port <br>
> exhaustion. We are looking to achieve 400-500% more <br>
> concurrent connections if we could :) as there is a significant buffer <br>
> on the available CPU.<br>
<br>
Then you require at least 4, maybe 5, IP addresses to handle that many <br>
concurrent connections with Squid.<br>
<br>
<br>
> The option to use multiple tcp_outoing_addresses appears to be promising <br>
> along with some tweaks to the TCP timeouts. I guess we could use ACLs to <br>
> pick a different outbound IP based on the requesting client's prefix. We <br>
> had not considered that option as the ephemeral ports were no longer <br>
> available to other applications when squid uses most of them with a <br>
> single outbound IP configured. We are also looking to modify the code to <br>
> use the IP_BIND_ADDRESS_NO_PORT sockopt as that could help delay port <br>
> assignment with the bind() call on the outbound TCP sessions (to <br>
> hopefully allow access to the 4-tuple on the socket).<br>
<br>
Patches welcome.<br>
<br>
However, please be aware that use of the 4-tuple is often no different <br>
from the 3-tuple since the dst-port is typically identical for all <br>
outgoing traffic to a given dst-IP.<br>
<br>
<br>
Cheers<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>