Hacker News new | ask | show | jobs
by jauer 1517 days ago
How do you figure?

Clients can connect to the server on the same server port, so connection limit is more like 64k*2 for every Client IP-Server IP pair.

1 comments

Actually every client IP+port / server IP+port pair. Linux uses 60999 − 32768 for ephemeral ports so can support 28e3^2 = 784 million connections per IP pair.
Except your service is almost certainly listening on one non-ephemeral port.

But having "only" tens of thousands of connections per client is rarely a problem in practice, apart from some load testing scenarios (such as the experiment here, where they opened a number of ports so they could test a large number of connections with a single client machine).

1 IP can correspond to multiple different clients.
With NAT, right. I guess there may be situations where client ports for a single server IP dry up due to NAT, but I've not encountered that issue.