HOWTO: Maximize the Number of Concurrent Connections to IIS6


I’m considering building a realtime ASP.NET application on IIS6, that’ll need to support about 3,000 simultaneous users on a server, each with a keep-alive HTTP connection for “server push.”

The HTTP connection will need to stay open for the duration of the user’s session, to allow updates to be pushed to the browser in near real time.

My question is, is this technically feasible on IIS6, particularly with the large number of connections? If it’s possible, are there any special considerations to get it to work?

Thanks in advance.


Yup, IIS6 can easily handle 3,000 concurrent keep-alive connections, assuming you:

  1. Have sufficient HW resources (like RAM) on the system
  2. Reconfigure the system (i.e. tweak any applicable limits)
  3. Run scalable user software that handles the user load (i.e. uses asynchronous IO, not necessarily multi-threaded, has appropriate caches, etc)

Windows Server 2003 and IIS6 come configured for security out of the box, whose goal frequently opposes performance/scalability. For example, ability for the system to hold 3,000 connections ties up valuable system resources and can be considered a “security threat” given the right context. Now, one may want to make the tradeoff for functionality… but last I checked, software is neither clairvoyant nor omniscient (well, neither are humans, but that is a separate tangent altogether 😉 )… so one may need to do some tuning.

In your situation, there are a couple of non-obvious limits:

MaxConnections (HTTP.SYS)

Controls the number of simultaneous HTTP connections (and hence limits number of simultaneous connections serviceable by IIS6).

  • On Windows Server 2003 RTM x86, this comes out to around 8,700
  • On Windows Server 2003 SP1, the limit has been removed
  • On Windows Server 2003 SP1 x64, since NPP is bound by available memory, you can increase concurrent connections by merely adding more RAM. To give a sense of scope – I have seen 50K+ concurrent connections to IIS6 on WS03SP1 x64 with 4GB RAM
Value: Range from 0 to 2^32-1

MaxUserPort (TCPIP.SYS)

Controls the max port number that TCP can assign. Every unique client making a request to your web server will use up at least one of these ports on the server. Web applications on the server making outbound SQL or SMB connections also use up these ports on the server… so it highly affects the number of concurrent connections. For SMB tuning, read the de-facto IIS6 and UNC Whitepaper.

Value: Range from 5000 to 65536


Incidentally, default value for both are above 3,000, so given sufficient HW resources like RAM and well written application software, IIS6 should just work for you out of the box without any tuning. 🙂


Comments (60)

  1. Mac says:

    Is the ServerListenBacklog metabase property, which has a max of only 500 on IIS 6, relevant in this situation?

  2. David.Wang says:

    Mac – Nope.

    Queuing, Threads, and Concurrently do not describe the same concept…


  3. sergio says:

    This is great info, thank you!

    Keep the good work with your blog.

  4. [JS/CSS] event:Selectors – the simplest way to hook

    Javascript events to a CSS class [Via: Jon


  5. Tomas says:

    Hi, do you know why when I have 2 concurrent downloads from an IIS site, I can’t initiate a 3rd one. I can’t even browse to any other pages, until either one of the tw downloads is complete.



  6. David.Wang says:

    Tomas – I presume you are browsing/downloading with Internet Explorer. If so, that is by-design – WinInet, the underlying socket layer used by Internet Explorer, places that limit. It has nothing to do with IIS.


  7. QSquared says:


    do you know why when I have 2 concurrent downloads from an IIS site, I can’t initiate a 3rd one.


    This is the By Design "Safe Neighbor" style standard which downloads from webbrowsers are asked to adhere to when downloading gfrom the same site.  Internet Explorer adhears to this guidline but it can bue turned off, You can change this by hacking the registy and editing the max number of downloads per site or turnign it off.  However some sites will ban you for downloading too many concurrent streams, so use with caution.


  8. KeithPell says:


    Is there an equation so that you can figure out how many you can support according to hardware? For example if I have a W2K3 w/SP 1 (Connections limit removed) IIS 6 server with a PIII 1.4 and 1.25Gb of ram?



  9. David.Wang says:

    KeithPell – sorry, no such answer exists because you are giving insufficient input. The answer depends on both hardware and the software running on it. The application(s) have arbitrary requirements and bottlenecks which you must measure and determine on your own. If you have both sets of numbers and have determined the main bottleneck, then you can do some calculations.

    For example, suppose the application running on one connection is able to run a request which consumes 140Mhz of CPU. You can reason that you can sustain 10 such requests and hence 10 connections simultaneously as a lower bound, but how much CPU do requests to your application take, on weighted average? No idea – you have to measure this of your application – determine the CPU usage of every request type and its weighted distribution.

    Of course, the above calculation assumes that CPU is the bottleneck; maybe network bandwidth is the bottleneck. Or hard disk contention. Or maybe software lock contention. In which case, the above measurement is irrelevant if CPU is not the bottleneck. You have to first figure out the biggest bottleneck faced by your application and provision around it, but you usually determine this experimentally…

    And here’s the Catch-22. If you are trying to provision an application for a given server hardware but do not have the hardware yet, how do you come up with the experimental numbers to do the provisioning to buy that surver?

    Well, you may look for published "perf numbers", but remember that they only apply to the specific configuration which generated the numbers, and those configurations are usually dream scenarios. How do you extrapolate down to your actual hardware? Anyone’s guess; you’ll need other people’s measurements or just learn some tricks of the trade.

    So you see, provisioning is an art, not science. Yes, there are scientific ideas (you are limited by your greatest bottleneck), but you have to figure out which bottleneck and to what degree. And that is where systems knowledge, problem-solving, and artistic flair come in.


  10. Apurva says:

    I want to increase no of simultaneous connection hanlded by IIS6 in windows XP SP2.How can I?

  11. David.Wang says:

    Apurva – You cannot. XP is considered a Client OS and number of simultaneous connections are deliberately limited.


  12. RP Arya says:

    Does concurrent connections depend only on  RAM Sizing or speed of CPU also plays an important role.. Is there any socket limit, which controls the conucurrent connection..How many sockets can be opened by a streaming server for this..

  13. RP Arya says:

    Can I get the solution to my queries.  Tks

  14. Scotch says:

    I think you may be confused. MaxUserPort affects outbound connections only.;EN-US;196271

    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.

  15. David.Wang says:

    Scotch – Thanks for the concern, but it applies to the context under which it is mentioned. Users frequently get so focused on the "server" aspect that they forget about it.


  16. Ingmar Groppe says:


    This article is very helpful.

    Are the limits of concurrent connections the same for IIS 5.0 with Windows 2000 then for IIS 6.0 with Windows 2003 SP1?


  17. David.Wang says:

    Ingmar – IIS5 and IIS6 are totally different architecturally, so this discussion dos not apply to IIS5.

    We designed and built IIS6 to be way more scalable than IIS5. Try IIS6 on an x64 machine with plenty of RAM and see it fly…


  18. igroppe says:

    Thanks David.

    We currently have a web application (with read/write access to a MS SQL Server database) that runs on Windows 2000 Server with IIS5 and we want to know if the app would be able to support 5000 concurrent users.

    Since the move to Windows 2003 would imply changes to the application, we would want to make sure that this is really necessary. As a first step we have done some research in the web to see if there are any experiences as far as growing concurrent users to 5000 with IIS5 but we really haven’t found much.

    What would recommend us to do?

  19. David.Wang says:

    igroppe – I suggest that you first test your application to determine if it can support 5000 concurrent users. You need to do this because you need to know the methodology and have tools to measure this value. Otherwise, your requirement is useless since you cannot validate whether a given server configuration actually meets the requirement or not.

    Words mean nothing when it comes to scalability or performance. Ability to measure the numbers yourself, in your own configuration, means everything.

    I suggest against searching for experiences of users configuring IIS5 for 5000 concurrent users because you assume you trust those people’s measurement metholodogy and that their usage pattern is comparable to your own. Then, there is the fact that Microsoft will measure but rarely publish such results –  for good reasons.

    Anyways… if you test and see that IIS5 can meet your requirement – great. You do not need to move to Windows Server 2003.

    But if it cannot, then you have heard me say that we have validated IIS6 to meet that requirement with our own test application – but you still need to validate it yourself (Windows Server 2003 180 day evaluation is free) since performance ALWAYS depends on the specific hardware, software, and configuration.

    Then, you can weigh the costs of either staying on IIS5 and figuring out how to tune/scale it, or move to IIS6.


  20. igroppe says:

    Thank you very much David.

  21. Mauricio says:

    Dave, how would you suggest me to test 5000 concurrent connections against my current application?

  22. Tony Su says:

    Hello Dave,

    Found this post interesting.

    But, I was wondering about your recommendation to configure through the Registry, is that preferable over configuring this and other similar IIS6 settings in the metabase.lxml?


  23. Thomas H says:

    Those are TCP/IP stack settings, not IIS 6 settings…

  24. David.Wang says:

    Thomas H – Yes. Sometimes I wish that everyone just understand the entire Windows networking stack and not just myopic goals like "maximize concurrent connections handled by IIS6" and magically figure out which settings to tweak.

    I apologize if my satire is not evident. I did point out where in the stack that the setting comes from, but I wager that few people would care about that detail when they just want to do things like "maximize concurrent connections".


  25. Brock says:

    Was glad to come across this article because it gives me some hope. We’re building a simple IRC like application and I’ve been wondering how many connections it’d be able to handle. I’m wondering though if socket connections == http connections. We’re running a socket server on port 6667. Was also wondering if I’m OK accepting all that traffic through a single port or if I should try to distribute it over several ports.


  26. Alex Pinsker says:

    Very nice, but for MaxConnections is not the only restriction for this scenario. IIS itself by default handles only 25 simultaneous connections. User would need increase the value of  AspProcessorThreadMax parameter in C:WINDOWSsystem32inetsrvMetaBase.xml.


         Alex Pinsker

  27. John Xu says:

    In config page of application pool under IIS 6 , Maximum worker process can be set to 1, 2, …. Question is, when set as 1, is this a single thread system?

    And, When each client sends a request, an instance of web application started so two requests will start two instances, right? How maximum worker process setting 1 or 2 differ, in terms of number of application instances?


  28. David.Wang says:

    Alex – AspProcessorThreadMax is ASP specific, not IIS specific.

    What each application platform like ASP, ASP.Net, PHP chooses to do on top of IIS is up to the application platform and obviously need to be tweaked.


  29. David.Wang says:

    John – Maximum worker process has no connection with single thread system. Application instance has no connection with number of worker process.

    IIS is a multi-threaded, multi-process system, and it can be configured to whatever you describe.


  30. Kal says:

    Hi David,

    Very useful info. I wanted to know if this simultaneous connection is affected by number of CAL (Client Access Licence). In otherwords do I need 3000 CALs for 3000 simultaneous connections on Windows Server?

  31. David.Wang says:

    Kal – I am no legal expert on CAL behavior. I believe the correct answer depends on your negotiated license agreement. For example, simultaneous anonymous and authenticated connections are accounted differently for various agreements.

    There are no technical constraints from IIS perspective.


  32. Lino says:

    My application running on Mainframe sends severals (1000/2000) http commands to II6 and sometimes the answer coming from webserver is TOO MANY OPEN FILES!! On unix, the solution consist to modify the parameter ULIMIT but which is the corrispondent parameter to be modified on Windows 2003 Server.

    Thanks a lot for your kind answer.

    Ciao, Lino

  33. David.Wang says:

    Lino – ULIMIT controls limits. However, the error you get back is not about limits, so I do not think the two are corresponding. Windows has corresponding limit controls, but I doubt they are involved here.

    You will have to give more information about how many HTTP requests in what time-span, to what resources, and how those resources are configured to be handled. For example, are you retrieving files from UNC Virtual Directory, or executing server-side ISAPI application, etc.

    Thousands of simultaneous HTTP requests is no problem for IIS6, but depending on what you are doing, the server-side application or configuration may not be able to handle it.


  34. Nick says:


    Given that XP64 and 2K3 have the same base code will those tweaks work for XP64?

    Thx. Nick

  35. David.Wang says:

    Nick – XP64 is not server SKU and thus will have a TCP-level concurrent connection limit.


  36. Rao says:

    Hi David

    I wonder if there is a limit on the maximum users reading and writing on to remote storage spce allocated by an IIS-FTP server running on a W2008/ 2003 server? What are the performance bottlenecks one is likely to face?

  37. David.Wang says:

    Rao – I recommend reading the following documentation to understand the relationship between users and remote storage as well as how to properly provision the server.


  38. Balaji says:


     Is it possible to retrieve the concurrent user connections in the server now…

  39. Ronen chen says:

    Hi David,

    We have high end application that cannot establish more than ~70 outbound concurrent connections. (we’re using httpwebrequest directly).

    Hardware is no limit, CPU and memory running in very low level.

    It deployed on qaud core machine with 4Gb memory.

    I tried to tweak the machine.config maxconnection, io worker thread pool size and also your recommendations regarding http.sys and tcpip.sys with no help.

    We also tried to run similar app written in c++ which use winhttp, wininet directly and we got the same results.

    Does windows limit the connections elsewhere?

  40. David.Wang says:

    Ronen – Outbound requests have nothing to do with IIS at all…

    There are no such limitations in Windows to outbound connections. You will have to look at your application code and explain what it is doing that limits its scalability.

    It is very easy to write unrealistic prototype code that does not scale properly.

    For example, rapidly opening/closing connections will quickly exhaust server-side ports and limit outbound connections by causing failure.


  41. mahendra says:

    Hi If I use my windows XP system as server for howmany clients I can server with iis?

  42. Raaj says:

    Hi David,

    I have gone thro’ the blog which is quite interesting and useful. I have a VBA application which fetches data from Oracle and processes some complicated business logic and gives the output in a excel sheet(With so many graphs and sheets). Now my requirement is to convert the VBA application into .NET web application. Now my client is asking me, how many concurrent users the application would be able to handle. I searched the web and i couldn’t found any answers for this. I understand that it all depends on the H/W, memory, etc, but i need to give him a clear explanation. Could you please help me out in this task.

  43. David.Wang says:

    Raaj – You need to first ask your client how many concurrent users are required.

    The real answer is "it depends" — the web application can scale from 1 to unlimited number of concurrent users. Too many dependencies to explain.

    I doubt you will ever find answers to performance questions by searching the web because many people get paid a lot of money for such skills and information.

    If the client cannot set expectations (that are reasonable), then attempting to give a clear explanation will not be useful, either.


  44. Tram says:

    I need help.  I am testing IIS to setup the max connection and I see somthing werid happened.  Can you explain this?  

    This is the senerio: I set the max connection to 2.  I open 2 browsers to the webiste.  They both work ok.  The 3rd browser to the website gets the "Service Unavailable" as expected.  I didn’t touch any of the browser for about 2 mins.  When I refresh the 3rd browser, it now gets the website ok.  However, one of the first two is kicked out.  I set the connection timeout to 600.  What is happening here?  I thought when the user reachs the max connection, he can not go to the website until others have closed connection.  

    What can I do?  I don’t want the users being kicked out.

    Please help.

  45. Johann says:


    What if IIS 6.0 is running on a virtual server (VMware). Given that it has enough resources, would the numbers you specify still valid?

  46. byter says:


    I know this isn’t the place for it.. but assuming the concurrent connections to be the topic here.. how can I get or know if user has many concurrent connections simultaneously, using ISAPI..?


  47. Haroon says:

    that’s very good for me and this link will help me. so thank u very much

  48. Allen says:

    Hi, we have a web application hosted, which is taking longer time sometimes when numbner of users are increasing or when the number of page request shots up it’s just hanging…

    Pls help it’s veru veru crucial……asap

  49. Matt H. says:

    Hi, we have ten client access licenses for SQL Server 2005 standard.  My question is does this limit us to 10 concurrent connections?  Or does it just limit us to 10 installations (on 10 different machines)?

    Thank you for any information.

  50. Shastri says:

    I have multiple virtual directories in my IIS 6. I want to configure max connections separately for each of them (ranging between 20-200). Is it possible to do? I am using Windows 2003 Advanced Server.

    Thanks in advance.

  51. David.Wang says:

    Matt H. – You need to clarify the type of CAL you purchased.

    I found the following URL explaining the types of CAL for SQL Server 2005.

    The URL explains the licensing types very well, as well as the situations which benefit each licensing type.


  52. Arijit says:

    Hi David…. I would like to know the maximum number of connections possible <b>from the same IP</b> to an application running on IIS 6. Is there a limit put in by Microsoft. If there is, do can I remove that ?

    I am asking this because a large number (over 1000) people access the application from the same organization and to IIS they appear to come from the same IP.

    Thanks in advance!!

  53. Arijit says:

    Editing my previous question…

    All the users access the application concurrently..


  54. Ankoboto says:

    But what about the maxWorkerThread in machine.config as I see it, this is a limit of 20 that can not be set higher than 100.

    I would need to have several open connection to aspx pages, but i dont know how i can set up a system so that i can have more than 100 ?

    I would need about 1000 – 2000 open connection.

    Is this posible using aspx or do i need to answer from sockets ?

    I happy if someone can help or add some information.

  55. manish says:


    i would like to know how many concurrent connection IIS 7 on windows server 2008 can handle ?

    actually i have an application to be used for atleast 30,000 concurrent users

    plz help

  56. Thank you for the information, it is very worthy for me 🙂

  57. Pramod Singh says:

    We have a .NET restful web-service returning stream out of ~5mb file.

    We have to support 5000 concurrent download, and the restful web service is hosted at:


    32 bit processor

    2GB RAM

    IIS 6

    The average response time of service is .025 sec.

    Please let know how much server we would need to NLB to meet our concurrent thread limit.

    Thank you

  58. David says:

    Does this article apply to Windows Server 2008 and other OSes like Window XP, Windows 7, Vista, etc. that host IIS 5.1-7?

  59. Pati says:

    Can we change any of the IIS parameters like max client runtime without re-starting the sever?

  60. Kumar says:

    If I have Windows authentication enabled in Windows 2003 IIS and want users to be logged in only one time, i.e. a users cannot use his/her login on more than one computers simultaniously, what should I do?