I have a slightly unusual situation where I\'m needing to maintain CLIENT tcp connections to another server for thousands of mobile users on my servers (basically the mobile dev
65355 is a limit of the IP protocol and more importantly is the limit the TCP/IP stacks of most operating systems impose.
To increase the maximum number of ephemeral ports on Windows, follow these steps:
On the Edit menu, click New, and then add the following registry entry:
Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically , ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive.
Normally to scale to more than 65K ports you would use multiple servers in a cluster.