3 ms·
> I mean, you have to have all of your ports open, with multiple IP addresses allocated to a single server Not sure what this section is about. IP connections
by toast0 6y ago
> I mean, you have to have all of your ports open, with multiple IP addresses allocated to a single server
Not sure what this section is about. IP connections are keyed on a 5-tuple of
{PeerAIP, PeerBIP, Protocol, PeerAPort, PeerBPort}
If you hold PeerAIP and PeerAPort and protocol fixed (single server IP, single port, TCP), you can accept 65535 connections from any other IP (so long as the system managing that IP can use all the ports; if it's CGNAT, it probably can; if it's a traditional OS, it will probably have soft limits, but easily thousands).
- darksaints 6y ago65,535 is substantially less than 2,000,000. At a minimum, you'd need 31 IP addresses allocated to a single box in order to have 2,000,000 active connections on that box. Unless you're arguing that the chat clients would be opening dozens of connections...but that's ridiculous. Whatsapp was built for actual usage, not research projects, and more than 1-2 connections per client is overkill.
- toast0 6y agoLet me be more concrete. If your server is 192.0.2.23, and it listens on port 5222. You can accept 65535 connections from 198.51.100.1. 198.51.100.1:X to 192.0.2.23:5222 for X in {1:65535} (port zero is weird) You can also accept 65535 connections from 198.51.100.2 198.51.100.2:X to 192.0.2.23:5222 for X in {1:65535} Pick any X, like say 12345; a connection between 198.51.100.1:12345 and 192.0.2.23:5222 does not preclude a connection between 198.51.100.2:12345 and 192.0.2.23:5222. Thus, this only gets to be an issue if you have a large number of potential clients behind a single (public) IP address; which is generally not the case (except when you're testing from a load generator)