Summary of IIS easy-to-mix concepts and summary of iis concepts

Source: Internet
Author: User

Summary of IIS easy-to-mix concepts and summary of iis concepts
Common sense of IIS connections:

A vm limits the number of IIS connections. Almost every host provider has its own statement about its meaning, and Microsoft has not given a clear explanation;

Meaning:

The IIS server can accommodate the maximum number of connections requested by the customer at the same time. Specifically, it should be called "IIS limit connections ";

One connection:

1. website html requests, image resources in html, script resources in html, and other resources that need to be connected and downloaded. A request for any resource is a connection (although some resource requests have a fast connection response)

2. If a webpage uses a framework (embedded webpage requests within the framework), a framework (iframe) is connected once.

3. If a webpage pop-up window (a webpage request is embedded in the window), a window is connected

Therefore, the maximum number of connections is the public IIS connection Standard for the VM. If the number of purchased IIS connections is 50, we have to consider the website content framework and traffic.

However, in fact, many enterprise portal websites have an astonishing low access volume, and the number of IIS connections is more than 50.

4. Set the location:

IIS (version 6.2, all of the following versions) in "click website"-> "right-click to switch to function view"-> "select a website"-> "click the 'limited' link on the right of the page"-> "Edit website restrictions"

 

Although the server can specify the maximum number of connections for each site, there is also the total maximum number of connections for the server. Therefore, even if the maximum number of connections to a user's site is not limited, when the server reaches the maximum number of connections, the site cannot be accessed. The maximum number of connections on the server is generally 1000--2000.

Number of concurrent IIS connections

Set location: "select a website"-> "Advanced Settings"-> "Limit"-> "Maximum number of concurrent connections"

 

The default maximum number of concurrent connections is 4294967295, which is an amazing number! The problem arises:

1. Is the unlimited number of concurrent connections mentioned by many VM providers true?

2. For each connection, IIS will enable a thread for processing. If this processing method is set up, Will IIS immediately start 4294967295 concurrent connection requests for processing?

For 1: Obviously, the maximum number of concurrent connections is definitely limited.

For 2: This is a misunderstanding of many friends. If 4294967295 concurrent connections come at the same time, IIS will not immediately start 4294967295 threads for processing, because this is unrealistic. For connection processing, IIS has the "Maximum number of concurrent working threads" limit. This number is related to the operating system. The IIS value of win7 is 10 (or others are not sure ), the value of IIS Express in VS2012 is 80. The specific value of the windows Server version is unclear, that is, after 4294967295 concurrent connections are established (taking 10 under win7 as an example, assuming that the queue length is 0 ), iis can only start 10 working threads for processing at the first time, so the other 4294967285 must be queued. Queuing means webpage loading for the user experience, but nothing is displayed, then, the customer who purchased the number of concurrent connections according to the virtual host supplier said that there is no limit on the number of concurrent connections. Why is it still loading the so-called "unlimited number of concurrent connections, I can only say that this is a problem with limited IIS processing capabilities. However, a message other than The queue will directly return "HTTP Error 503. The service is unavailable ."

Maximum number of concurrent working threads in IIS

This involves some of the above. Simply put, it is the processing mechanism of IIS when concurrent connection requests come over. It is more witty to process in batches in a certain order of magnitude, the user's browser's response to waiting in queue is "loading", which is directly displayed as "HTTP Error 503. the service is unavailable. "It is more acceptable, but do not refresh the button if you are angry, because the more points you have, the more requests you have in the queue.

Of course, many of my friends will say, why can't I click it for the first time? I just click it again to get the content,

It may be:

1. Where is the page script downloaded or handled? As a result, the page displays an exception or is not displayed directly.

2. The second-level operation you refresh, the web server has processed requests from other queues more quickly or others have abandoned the operation on the web server connection request.

3. routing or broadband network operator problems (unstable)

4. browser or computer problems

  I don't know if "Maximum number of concurrent working threads in IIS" can be set. Anyone who knows can leave a message for me. Thank you.

Now the question is, the maximum number of concurrent connections affects the number of queues. Is there any progress affecting the setting of the number of queues? Some: Queue Length

Queue Length

1. Concept: Maximum number of connections allowed in the queue is limited, but the maximum length allowed in the queue is limited by the number of IIS connections limit.

2. settings: Find the application pool to which the website belongs, and right-click Advanced Settings-> "general"-> "queue length". The default value is 1000, and the value range is between 10 and 65535.

Maximum number of worker processes in Web parks:

IIS 6.0 allows the application pool to be configured as a Web Garden, that is, when the maximum number of working threads is greater than 1, when the server load is small, when no additional worker process is required, IIS 6.0 automatically reduces the actual number of worker processes after a certain period of time (20 minutes by default, which can be configured). If the load increases, if an additional worker process is required, IIS 6.0 will increase the number of worker processes again. All these operations are performed automatically without administrator intervention.

Set location:

Find the application pool to which the website belongs, and right-click Advanced Settings-> "Process Model"-> "Maximum number of working processes". The default value is 1 and the maximum value is 4000000:

 

Note: Setting basis

Determine the maximum number of worker processes in the application pool based on the principle that each worker process can carry 30 concurrent tasks. Note that each worker process occupies about MB of system memory. When setting the maximum number of worker processes, the product of the maximum number of worker processes and the maximum number of available memory of the system must not exceed the maximum number. Generally, we recommend that you adjust the maximum number of worker processes by increasing the number of five worker processes each time. After the adjustment, observe the website for a period of time. If the requirements still cannot be met, then, increase the number of worker processes.

Session sharing

If the website does not use the session mechanism, this issue will not occur. If the session mechanism is used to transmit values and store data, you need to consider sharing sessions among multiple worker processes in the application pool to prevent session loss. It is better to use StateServer or SQLServer for storage, and context replication occurs when multiple worker processes are switched. This is where more resources are consumed.

Reasonable Resource Recovery Mechanism

Most application systems have high work time usage and low non-work time usage. In this case, operating system resources should be reasonably released when the system is not busy. Therefore, the [Restriction timeout] and [recycle interval] attributes of the application pool should be reasonably set.

 

[Summary]Concurrency capacity = actual queue length limit (the queue length limit and the number of IIS connections limit are small) * Maximum number of worker Processes

 

Http://www.cnblogs.com/yinhaichao/p/4060209.html

Related Article

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.