4 ms·
The limit is 65k connections per client IP address, limited by the number of available ports on the client. You can theoretically accept connections from all po
by hathawsh 8y ago
The limit is 65k connections per client IP address, limited by the number of available ports on the client. You can theoretically accept connections from all possible client IP addresses simultaneously.
This means that in order to test 1M simultaneous connections, you would need to use at least 16 client IP addresses. Probably more.
- e-r-a-n 8y agoAnd most linux distros limits the ephemeral range even further to about 30K ports If you take a deeper look, the solution uses Docker to connect clients from different network namespaces to mitigate this
- athenot 8y agoAs a fun aside, you can do this on localhost by defining additional addresses tied to the loopback interface: 127.0.0.2 127.0.0.3 etc. I once had to test a piece of software that identified its connections by the source IP, so I had a script to create thousands of loopback addresses within 127.0.0.0/8 and then run against that software and verify the connections were doing what they were supposed to do. (This was on Mac OS X.)