What's the maximum number of HTTP connections I can have open in one Windows Server 2008 box?

11,846

Solution 1

I found this:

http://blogs.msdn.com/david.wang/archive/2006/04/12/HOWTO-Maximize-the-Number-of-Concurrent-Connections-to-IIS6.aspx

To give a sense of scope - I have seen 50K+ concurrent connections to IIS6 on WS03SP1 x64 with 4GB RAM

Anything else you can find?

Solution 2

To be honest, in all but the most extreme of situations you will run out of resources for your application before you ever exceed the amount of supported connections. IIS can handle a crazy amount of pure network connections but it ultimately comes down to if your application can process data from them fast enough.

If you are really expecting to scale this to thousands of users at a time I would go ahead and build in your design to be able to scale out to multiple front-end servers. Most likely this would look like a load balancer or reverse proxy that balances these HTTP connections between front-end servers, with those front-end servers doing the processing and communicating with a central SQL DB or whatever your storage mechanism is.

Edit: One other note, regarding the single server scenario - regardless of how many connections IIS can handle, your firewall has its limits, too. Usually it's also a crazy amount but you'll need to look at your firewall too if you really want to find the ceiling.

Share:
11,846
recursive9
Author by

recursive9

Founder of Crystal Gears Portfolio: - www.movertrends.com - www.friendshopper.com - www.digitalshow.com - www.translatorscorner.com - www.gigpay.com

Updated on July 10, 2022

Comments

  • recursive9
    recursive9 almost 2 years

    I have a web server hosting an HTTP chat application that works with long-polling.

    This means a client browser "polls" for new info and the server does not respond until there is info to send back, so the HTTP connection is left open for a long time, up to a minute.

    My question is how many of these connections the server can handle open at the same time before it dies.
    Of course, there is no precise number, but I want to get a grasp, an order of magnitude (1,000 , 10,000, 100,000?)

    Any insights related to this based on any experiences you may have had is more than welcome!

  • recursive9
    recursive9 over 14 years
    Two comments: Most of the time, our code is not doing ANYTHING, it's just holding the handle of the connection in case something happens that needs to be notified. I'm not saying it won't ever be a bottleneck, of course, but we can keep getting bigger and bigger servers if that's the case, and it truly is a very lightweight piece of code.
  • recursive9
    recursive9 over 14 years
    As for splitting the servers: Yes, we have that idea for the future, but it implies a lot of effort that we'd rather use on building features for now. We are trying to figure out, for now, how long the single server scenario will hold. We will eventually have to move to multi-servers, but we'd like to hold that for as long as possible.
  • recursive9
    recursive9 over 14 years
    That said, I don't expect our code to work with 65k connections. I thought the limit would be much lower (5-10k), in which case we could be hitting it. Thanks for your answer!
  • eselk
    eselk almost 11 years
    @future readers - In my experience, our network card(s) in our server where the first limit we reached, turns out your typical cheap-o NIC not made for servers can max out around 1024 connections. They usually don't have this documented anywhere, and sometimes it comes down to the driver, but keep in mind you might need to spend around $100 for a good card, if this is your setup. With new card now have over 2000 connections and going strong.
  • martinezdelariva
    martinezdelariva over 2 years
    65.536 is the maximum number of ports at a time due the port is a 16 bit unsigned
  • Martin Thoma
    Martin Thoma over 2 years
    You've answered this question 12 years ago and possibly the world has changed / you've got a ton of experience. Is there something you would add to your answer?