❦ 30 juin 2014 15:54 +0200, Klavs Klavsen <[email protected]> :

> As far as I can gather - that would mean it will run out of ports, when
> it hits about 64k connections being open.
>
> But perhaps ports can be reused, if they are used against different
> backends ? (ie. the max open connection amount in the linux tcp stack
> becomes 64k * backends-available)

Yes, the 64k limit is per target IP. Only one connection can match a
source IP, source port, destination IP, destination port. So, with one
source IP, N destination IP and one destination port, you have about
N*64k simultaneous connections.

You can increase the number of possible quadruplets by using multiple
target ports (you make the daemon listen on several ports on the
backends) or multiple target IP (you add more IP on your backends).

Don't forget to tune net.ipv4.ip_local_port_range.
-- 
Each module should do one thing well.
            - The Elements of Programming Style (Kernighan & Plauger)

Reply via email to