Configuration of high-availability IIS server for building high-performance. Net Applications-Part 3 Explanation of the three core components of IIS (Part 1)

Source: Internet
Author: User
Tags msmq

 

 

 

SeriesArticle:

Configuration of high-availability IIS server for building high-performance. Net Applications-Article 1: required knowledge of IIS 

Build a high-performance. NET application configuration high-availability IIS server-Part 2 IIS Request Processing Model Configuration of high-availability IIS server for building high-performance. Net Applications-Part 3 Explanation of the three core components of IIS (Part 1) Configuration of high-performance. Net Applications-Part 3 Explanation of three core components of IIS (part 3) Build a high-performance. NET application to configure a high-availability IIS server-Article 4 common IIS problems: Working Process recycling mechanism (I)

 

Today's article is easier. It mainly describes three important components in IIS: Protocol listeners and WWW Service) and was (Windows Process activation Service), understanding the functions of these three components is a required knowledge to understand IIS.

 

Next, let's take a look at the first one.

 

Protocol listener (Protocol listeners)

 

We know that many different types of applicationsProgramThey all need their clients to communicate with them through different protocols. Let's give you a few simple examples to understand:

      1. Web applications use HTTP for communication. Web applications communicate by accepting HTTP requests and sending HTTP responses to clients.
      2. The WCF application can use many protocols for communication, including HTTP, net. TCP, net. pipe, and net. MSMQ.

In different types of applications, protocol listeners are requests that listen to specific protocols, and then pass requests to IIS components. Each protocol has its own listener. Iis7 includes four listeners: http. sys, net. TCP, net. pipe, and net. MSMQ. If you want to listen to other protocols, you can use plugin to write the Listener component of the new protocol and insert it into iis7 (that is, the so-called "plug-in" method ).

 

IIS 7 uses http. sys to listen to HTTP requests, and also improves security because it can also listen to SSL requests. In addition, HTTP. sys supports the following features in IIS6 and iis7:

      1. HTTP. sys is implemented as a component in kernel mode.
      2. HTTP. sys directly transmits the received HTTP request to the processing Worker Process of the request without any overhead of inter-process communication. In the previous step of iis6, the HTTP request was first accepted by the user's module inetinfo.exe. This process then forwards the request to the working process in IIS. This process involves cross-process communication between the working process and IIS.
      3. Each application pool has its own kernel-based request queue. When there are not enough worker processes to process HTTP requests, HTTP. sys places the new requests in the queue. Then, the worker process will take out the request from the queue for processing, and the overhead of inter-process communication will not be involved in the process.
      4. HTTP. sys caches the response of the Request output in the kernel cache to facilitate rapid response to subsequent requests.

Next, let's look at the second component.

 

Was (Windows Process activation Service)

 

The main responsibility of was is to read the configuration items in the applicationhost. config configuration file. Some configuration items are used to configure protocol listeners. We have discussed before that each Protocol has a listener (in IIS6, only HTTP protocol is supported. In iis7, the plug-in Protocol listener method is introduced, therefore, many protocols can be processed. If you still remember to deploy WCF in IIS6, you can only use HTTP protocol ).

 

If was interacts directly with each protocol listener, then was is only coupled with the listener of these protocols and cannot interact with other protocol listeners (because we cannot modify was'sCode, Unless Microsoft releases a new version ). Therefore, in iis7, the Protocol listening adapter is introduced here. In fact, the adapter mode is used. Make the was dependency abstract, rather than depending on the specific implementation.

 

The Protocol listening adapter isolates was from listeners of specific protocols. Each Protocol has a protocol adapter. For example, the HTTP protocol adapter knows how to adapt to HTTP. SYS. If you are familiar with the design mode, you should be very clear about this.

 

Was reads the configuration information in the applicationhost. config configuration file and then uses the information on the Protocol listener adapter. The Protocol listener uses the configuration information to listen for requests from specific channels.

 

In addition to reading configuration information, was is also responsible for some important responsibilities:

      1. Use the configuration information in the applicationhost. config configuration file to configure and start the application pool to process requests.
      2. Monitor, restart, shut down, and manage application pools and related working processes based on the configuration information of the applicationhost. config configuration file.

 

After understanding the above content, we should be very clear about the request processing process in IIS:

      1. When the request reaches, the Protocol listener starts to run.
      2. The specified protocol listener adapter is created and notifies the application pool of request arrival.
      3. Was checks whether a worker process is running in the application pool. If not, was creates a new worker process in the application pool and then submits the request to the worker process for processing, the process then processes the requests in the Request queue of the application pool.

 

Links to articles:

IISServer Load balancer-Application request routeArticle 1:ArrIntroduction

IISServer Load balancer-Application request routeArticle 2: Creation and ConfigurationServer farm

 IISServer Load balancer-Application request routeArticle 3: UseArrProceedHTTPRequest Load Balancing (up) 

IISServer Load balancer-Application request routeArticle 3: UseArrProceedHTTPRequest Load Balancing (lower) 

IISServer Load balancer-Application request routeArticle 4: UseArrImplement layer-3 deployment architecture

 

 

 

Server Load balancer Principles and Practices: Part 1 (reorganizing)

Server Load balancer Principles and Practices)

Server Load balancer principles and practices part 3 basic concepts of Server Load balancer-network Basics

Server Load balancer principles and practices Chapter 4 Server Load balancer Clusters 

Principles and Practices of Server Load balancer Article 5 Detailed description of data packet process during Server Load balancer

Server Load balancer principles and practices Chapter 6 Health Check Mechanism (part I)

Server Load balancer principles and practices Chapter 7 Health Check Mechanism (II)

Server Load balancer principles and practices Chapter 8 Network Address Translation (part I) 

Server Load balancer principles and practices Chapter 8 Network Address Translation (Part II) 

Server Load balancer principles and practices Article 9 Server Load balancer advanced technology-session persistence (I)

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.