What kind of configuration do I need for a Windows based server(s) to support 10K-20K TCP connections simultaneously. 99% of these connection will only send keep alive (but will remain active) signals at 60 seconds interval and rest 1% will be sending/receiving XML data at any given time.

Can anyone suggest me the kind on infrastructure I need to setup for above requirement?


That is quite a lot of connections!

Providing that everything does not connect at exactly the same time or your application allows for queuing / a tiny bit of latency, I do not really think you will have a problem with regards to CPU or memory as long as you take an average modern box (Minimum Quad Core, 4-8GB memory), but I think you will want to take a look at serious Intel networking gear and tweaking Windows Networking (For example look here, but that list is quite old and I am not sure how many still apply).

If however you really want to prepare for big loads of connections, the real thing to look at is clustering your environment - however, if this is a custom written application, you may have a little trouble.

Also, for that amount of connections, you will need to look at upgrading your entire infrastructure - for example, faster/powerful routers/switches.

| improve this answer | |

I hope you have written an event-based server, rather than a thread-based one, so you avoid using 1+ MB of stack per connection. Assuming that, the Windows kernel should be able to handle that number of open sockets with minimal configuration change. See http://smallvoid.com/article/winnt-tcpip-max-limit.html.

You will also want to look into Windows IO completion ports in order to do asynchronous network IO more efficiently than using a select() loop.

Are you planning on doing this with a general-purpose, threaded web server like IIS? If so, think again (one thread per connection = massive fail with 20K connections).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.