Do you really understand: IIS connections, IIS concurrent connections, IIS max concurrent worker threads, application pool queue Length, application pool ...

Source: Internet
Author: User
Tags web hosting server memory

General purchase of virtual host friends are familiar with the purchase, will limit the number of IIS connections, this side first from the general do not understand the code user perspective of IIS connections

As the name implies, the maximum number of connections that the IIS server can hold for a client request, which is exactly the number of "IIS Restricted connections"

This way the customer requests the connection content including:

1, web site HTML requests, HTML image resources, HTML script resources, other need to connect to download resources, and so on, any one resource request is a connection (although some resources request connection response quickly)

2. If the Web page is framed (nested Web requests within the framework), then a frame is connected

3, if the page pop-up window (inside the window nested page request), then a window a connection

Web hosting provider in IIS (version 6.2, all of the following) "Click on site", "right click on the switch to feature view"-click on the right side of the "Restrictions" link, "Edit Site Restrictions"

Restricting the number of connections is the standard for the number of IIS connections exposed by the virtual host, and if the number of IIS connections purchased is 50, then we have to consider the content framework and volume of the site

If there are enough pictures of the website, pop-up window random (may even time selection box, simple condition filter box also with pop-up new window), plus the forced to open a new page to browse content, then only can tolerate 10 people at the same time operation is also very normal, I will not describe this operation as many sites said "10 Simultaneous online", This is easy to misunderstand, in a user's request (on the surface may be refreshing a page, in fact, the internal request more than once, in fact, rarely only once) to complete the server response is completed, the connection will be released, of course, before you see the displayed page, internal nesting if the request picture and other connection requests, The connection will be released early.

In fact, a lot of Enterprise Portal site access is surprisingly low, IIS connection number is 50 is more than enough

Here's a more detailed reference link: http://www.west263.com/info/html/IDCzixun/zhujizuyong/20080221/1677.html

Number of IIS concurrent connections

Maximum concurrent connections, limits, advanced settings, administration Web site

In fact, ordinary users often say "IIS link number" Is this side of the "Maximum number of concurrent connections", if the PC has IIS friends, you can test the above two images of the settings, is a mutual influence

This way, the default maximum number of concurrent connections is: 4294967295, which is a staggering number, does this mean that the site can have concurrent execution of the number of connections 4294967295 capacity?

Here I make a few assumptions:

1, a lot of virtual host vendors said that no concurrent connection limit is really set up?

2, the processing of each connection, IIS will open a thread to handle, assuming this processing mode is set up, then 4,294,967,295 concurrent connection requests come to whether IIS will immediately start 4,294,967,295 threads to process?

for 1: obviously not, the maximum number of concurrent connections is set to an absolute limit

for 2: This is a myth for many friends, assuming that 4294967295 concurrent connections come at the same time, IIS does not immediately start 4,294,967,295 threads to process, because this is unrealistic, for processing connections, IIS has the " maximum number of concurrent worker threads" limit, This is what I want to introduce below, I see from some information, this number is related to the operating system , the value of IIS for Win7 system is 10 (or other indeterminate), the value of VS2012 comes with IIS Express is 80. For Windows Server version of the specific value of the system is not clear, that is, 4,294,967,295 concurrent connections came, (this side with Win7 under 10 for example), IIS can only start 10 worker threads in the first time to process, then the other 4294967285 must queue, queued to the user's experience is that the Web page is loading, but nothing is displayed, and then purchased according to the virtual host provider said that the number of non-concurrent connection limit of customers will start to rage, why buy so-called "unlimited concurrent connections", or will always be loaded in the situation, I can only say that this is the problem with limited IIS processing power.

Of course the server did not return "HTTP Error 503" directly. The service is unavailable. " should also be some of the comfort that you spend more money, because you only purchase the number of IIS connections is 50, then the first 50+1 connection request operation will be directly "HTTP Error 503." The service is unavailable. " The

In addition, if the Web server's hardware is hearty enough, then the worker threads of IIS will handle it faster, and the user who responds will be less likely to wait (if your IIS connections are large enough, or you will be 503 directly)

Overall, the maximum number of concurrent connections affects the number of queues,

There are times when we need to evaluate the maximum number of concurrent connections for our site and then set the optimal number

Here is a more detailed reference link:

Http://www.th7.cn/system/win/201407/63593.shtml

http://blog.csdn.net/shigaofei1/article/details/8222048

IIS maximum number of concurrent worker threads

This is involved in the above, the simple is that IIS in the concurrent connection request come over the processing mechanism, it will be more witty in a number of orders to batch processing, so that no processing connection requests queued, the user's browser in the queue waiting for the response is "loading", which is more than the page directly display "HTTP Error 503. The service is unavailable. " More acceptable, but do not get angry at the point of the Refresh button, because the more points, your request in the queue of the more on the back.

Of course, many friends will say, why I sometimes do not brush the first time, re-brush the content is out,

May be:

1, the page script where to download or handle the problem, causing the page to show abnormal or directly do not display

2, you re-refresh the second level of operation, the Web server faster has been processed by other queues of requests or others have abandoned the Web server connection request operation

3, routing or Broadband network operator problem (unstable)

4, the browser or its own computer problems

I don't know. "IIS Max concurrent worker threads" there is no place to set, know friends can give me a message, thank you

So now the problem is, the maximum number of concurrent connections affects the number of queues, so is there any progress affecting the number of queued settings? Yes: Queue Length

Queue Length

Assuming that the maximum number of connections is set to 100,1000 a concurrent connection request comes up, first 900 is returned directly to the customer "HTTP Error 503." The service is unavailable. "

Then IIS starts first (assuming the maximum number of concurrent worker threads is 10) for 10 threads to process the request, and the other 90 into the queued state, if the following actions are done:

Locate the application pool to which the site belongs, right-click Advanced Settings, general, queue length, set to 20

So what does the situation look like? Only 20 will enter the queue, and 70 (90-20) requests will return "HTTP Error 503" immediately. The service is unavailable "

The IIS default queue length setting is 1000, and the range is between 10-65535

Maximum number of worker processes

IIS 6.0 allows application pools to be configured as a Web garden

Find the application pool to which the site belongs, right-click Advanced settings, process model, maximum number of worker processes, default 1

If this value is greater than 1, a number of new worker process instances are started when there is a connection request, the maximum number of processes that can be started, and more requests will be sent to the worker process in a round-robin manner, each of which can assume a load of some connection requests. Of course, the cost of CPU and other hardware, it is worthwhile, if the Web server CPU utilization is very low but also need to more efficient processing of concurrent connection requests, why not do so?

If the site uses the dependent process of the session and cache objects, it can not be saved in the server memory, the storage mode of StateServer or SQL Server will be better, and many other worker processes will have context replication when switching, which is also a resource consumption more places

Setting the maximum number of worker processes: (copy) determines the maximum number of worker processes for an application pool by the principle that each worker process can host 30 concurrency. Also note that each worker process will occupy about 200M of system memory, when setting the maximum number of working processes, the main maximum number of working processes and 200M do not exceed the maximum available memory of the system. In general, it is recommended that the maximum number of working processes be adjusted by the number of 5 work processes each time, after adjusting to the website for a period of time, such as still unable to meet the requirements, and then continue to increase the number of 5 work processes.

Here is a more detailed reference link:

Http://www.itmano.com/87.html

Http://www.xuebuyuan.com/174816.html

Do you really understand: IIS connections, IIS concurrent connections, IIS max concurrent worker threads, application pool queue Length, application pool ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.