Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the theoretical maximum number of open TCP connections allowed on a Windows server [closed]

On my Windows server I have a port open listening to incoming TCP connections from multiple clients. Is there a limit to the number of unique clients that can concurrently establish a socket connection on that opened port on my Windows server? One of the threads What is the theoretical maximum number of open TCP connections that a modern Linux box can have talks about number of socket connections being limited by the allowed file descriptors on Unix platforms. Is there such a limitation on the latest available Windows servers? If so how to go about changing that limit?

like image 280
Rahul J Avatar asked Oct 27 '25 16:10

Rahul J


2 Answers

Based on an answer by a MSFT employee:

It depends on the edition, Web and Foundation editions have connection limits while Standard, Enterprise, and Datacenter do not.

Though as Harry mentions in another answer, there is a setting for open TCP connections that has a limit of a bit over 16M.

But while technically you could have a large amount of connections, there are practical issues that limit the amount:

  • each connection is identified by server address and port as well as client address and port. Theoretically even the number of connections two machines can have between them is very large, but usually the server uses a single port which limits the number. Also rarely a single client would open thousands of connections, but in NAT cases it may seem like it

  • the server can only handle a certain amount of data and packets per second, so a high speed data transfer or lots of small packets may cause the number to go down

  • the network hardware might not be able to handle all the traffic coming in

  • the server has to have memory allocated for each connection, which again limits the number

  • also what the server does is an important issue. Is it a realtime game server or a system delivering chess moves between people thinking their moves for 15 minutes at a time

like image 161
Sami Kuhmonen Avatar answered Oct 29 '25 05:10

Sami Kuhmonen


In addition to the licensing and practical limits outlined in Sami's answer, there is in fact a configurable limit to the number of simultaneous open connections, determined by the TcpNumConnections setting. The default value is also the maximum, which is just shy of 16M.

(The linked documentation is for Windows 2003. The corresponding documentation for later versions of Windows Server does not appear to exist. However, I can't find anything to suggest that the setting has been removed.)

In practice, however, you are likely to run into the practical issues outlined in Sami's answer long before you hit this. (Unless the system administrator has manually changed the setting, of course.)

like image 22
Harry Johnston Avatar answered Oct 29 '25 05:10

Harry Johnston



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!