I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% (65536). What exactly does that mean? How is it possible to go over the 65536 connections when that is the limit of ports?
multiple general performance servers to play the role of clients:
if one server has only one fixed IP, and it only can provide 65535 source ports. Then, one server is able to open about 60K concurrent connections.
if you want to emulate 2million concurrent websocket connections, you need about 34 servers - 2_000_000 / 60_000 = 33.333333 ≈ 34
as a sidenote, if you have a powerful server, and have 34 IP assigned to this server, then in theory, you can simulate 2million concurrent websocket connections on this server, too.
a powerful server(40 Core CPU / 128GB RAM) to handle concurrent websocket connections:
it is not limited by the amount of its own available ports, because the source IP and source port is different for every connection.
Each network connection is described by tuple of 4 values:
Source Address
Source Port
Target Address
Target Port
So only if these 4 values match, we cannot open new connection. This should make it clear how we can have 2M (or more) simultaneous connections to single service listening on single port.