views:

1555

answers:

2

I have .Net service that listens on single port over TCP protocol. Clients connect and then transmit data for some time (from few minutes to several hours).

Is there any limit on number of connections on Windows 2008 server? I did not hit any, since now there is up to 50 users. Plan is to have thousands of users, so I'd like to know if there will be problems in future.

Edit:
As Cloud answered, it seems that there are some limits in some versions of Windows Server 2008. Is there any reference on those limits? I tried Google, but it returns articles on limit on half-bound tcp connections.

+3  A: 

There is a limit on the number of half-open connections, but afaik not for active connections. Although it appears to depend on the type of Windows 2008 server, at least according to this MSFT employee:

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

Cloud
Sorry for ignorance, but what is "half-open connection" ?
zendar
I added a link on the half-open connections which should explain it
Cloud
+2  A: 

How many thousands of users?

I've run some TCP/IP client/server connection tests in the past on Windows 2003 Server and managed more than 70,000 connections on a reasonably low spec VM. (see here for details: http://www.lenholgate.com/archives/000564.html). I would be extremely surprised if Windows 2008 Server is limited to less than 2003 Server and, IMHO, the posting that Cloud links to is too vague to be much use.

Personally I'd test it and see. Even if there is no inherent limit in the Windows 2008 Server version that you intend to use there will still be practical limits based on memory, processor speed and server design.

If you want to run some 'generic' tests you can use my multi-client connection test and the associated echo server. Detailed here: http://www.lenholgate.com/archives/000568.html and here: http://www.lenholgate.com/archives/000569.html. These are what I used to run my own tests for my server framework and these are what allowed me to create 70,000 active connections on a Windows 2003 Server VM with 760MB of memory.

Edited to add details from the comment below...

If you're already thinking of multiple servers I'd take the following approach.

  1. Use the free tools that I link to and prove to yourself that you can create a reasonable number of connections onto your target OS (beware of the Windows limits on dynamic ports which may cause your client connections to fail, search for MAX_USER_PORT).

  2. during development regularly test your actual server with test clients that can create connections and actually 'do something' on the server. This will help to prevent you building the server in ways that restrict its scalability

Len Holgate
Thanks for info. We are working on multi player game, where players are divided into rooms - similar to poker. How many thousands - as much as we can put on server. Hopefully, we will be able to serve 50.000-100.000 users per server.
zendar
Since you're already thinking of multiple servers I'd take the following approach. 1st use the free tools that I link to and prove to yourself that you can create a reasonable number of connections onto your target OS (beware of the Windows limits on dynamic ports which may cause your client connections to fail, search for MAX_USER_PORT). 2nd during development regularly test your actual server with test clients that can create connections and actually 'do something' on the server. This will help to prevent you building the server in ways that restrict its scalability.
Len Holgate
Would you please put advice from your comment into answer. It's valuable info and really should be part of answer.
zendar