IIS Server Load balancer-Application Request Route: ARR introduces Server Load balancer. I believe you are no longer familiar with it. This series mainly introduces the Server Load balancer software that can be used in IIS: microsoft's Application Request Route module. In fact, Application Request Route has been introduced in many articles, but many documents are in English. In my project, I used to use and test Application Request Route, the relevant documents have been converted into Chinese and circulated among the team members. This series includes some usage experiences in these documents. This topic is as follows:Application Request RouteIntroductionApplication Request RouteInstall Links to articles:IIS Server Load balancer-Application Request Route explanation Article 1: ARR introduction IIS Server Load balancer-Application Request Route explanation Article 2: Create and configure Server FarmApplication Request RouteIntroductionApplication Request Route (ARR) is a proxy-based module hosted on IIS7 and later versions of IIS). It can determine Http Headers, server Variables and Server Load balancer algorithms forward HTTP requests to different processing servers. ARR is used as follows:ARR is based on the URL Rewrite Module. It detects HTTP requests sent from the client to make request routing decisions. 650) this. width = 650; "border =" 0 "alt =" 20120326103946.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 105 "/> next, let's take a look at some features of ARR:1. Request Routing decisions made based on HTTP requestsDifferent from Hardware load balancing, the IP layer of the OSI model determines the Request Routing mode.) ARR performs Load Balancing Based on the application layer, because more information is available at the application layer, it is necessary to clarify the principle of Server Load balancer. However, this series focuses on ARR, some underlying principles will not be involved too much. In the future, I plan to introduce the principles and implementation of Server Load balancer for my friends systems. For details, refer:Server Load balancer Article 1-Introduction). By using the URL Rewrite Module in ARR, we can implement more powerful routing rules based on Http Headers and Server Variables.2. Multiple Load Balancing AlgorithmsWe can decide which Server Load balancer algorithm to use for Request Routing. ARR provides the following six algorithms.3. Health CheckWe can use "real-time communication" and "specific Url test" to check the health status of the server. In addition, we can also use a lot of parameters to determine what kind of server is healthy and normal. For example, some people think that as long as the server is enabled, it is healthy; some people think that it is healthy to enable the server and process requests without overloading, and so on. In addition, we can use our own Health Monitoring Provider to implement our own Health check possibilities.4. Client affinityAs for affinity, I believe everyone is no stranger. Here I will mention it a little bit: I prefer it or like it. For example, you can set CPU affinity in SQL Server. Assume that there are four CPUs, numbered A, B, C, D, now, the CPU affinity of SQL Server is set to A, which means that SQL Server prefers to send the request to the CPU numbered A when processing the request, of course, the request will also be sent to other CPUs, but the CPU Of A will process more requests. Similarly, in ARR, you can set the client affinity. ARR is mainly implemented by using cookies. It is actually very easy to implement. Here are some considerations for customer affinity:5. affinity of the Host NameAfter understanding the "client affinity" above, it is easier to understand it here. "Host Name affinity" is mainly used by many people on the shared server to use a server, that is, when the site is deployed, the "virtual address space" is purchased "). We will explain it in detail later.6. server groupARR can manage many server groups, each of which contains multiple server servers.7. graphical interface-based management and healthARR is integrated with IIS and visualized operation interfaces are provided to facilitate operations.8. Develop tracking rules for request failuresIn ARR, you can define specific tracking rules to view the tracing information after request processing fails to facilitate diagnosis.Application Request RouteInstallNext, we will introduce the installation of ARR for Quick Start and learning: ARR depends on the following components:ARR installation requires the following environment:Start installation as follows:1. Download ARR:Now ARR has developed version 2.5, which can be said to be quite stable. I have also adopted it in some large projects, and the effect is good. Current address: http://www.iis.net/download/ApplicationRequestRouting2. Now ARR is integrated into the Web Installation Platform, As shown below: 650) this. width = 650; "border =" 0 "alt =" 20120326116119.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 106 "width =" 550 "/>3. Click "Install" to start installation.4.After installation, open the IIS control window, as shown in the following Win7 System Interface): 650) this. width = 650; "style =" display: block; margin-left: auto; margin-right: auto "border =" 0 "alt =" 20120326102150.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 107 "/> If" Server Farms "is displayed, the installation is OK.5. Configure the application poolAll HTTP requests must go through ARR. Therefore, we hope that IIS on the server where ARR is installed must run continuously and forward requests to other servers, that is: the basic function of this server with ARR installed is request forwarding. Assume that we have three servers numbered A, B, and C respectively in our hands to deploy the agilesharp site, as shown in the following figure: 650) this. width = 650; "border =" 0 "alt =" 20120326101_5.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 108 "width =" 544 "height =" 94 "/> the address exposed by server A to the outside is assumed to be: 159.12.2.15, then we create an agilesharp site on server A, as shown in the following code: 650) this. width = 650; "border =" 0 "alt =" 20120326104335.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 109 "/> and we set the application pool of the agilesharp site to the integration mode of IIS. At this time, because the site is actually only exposed to the outside, the real request is processed on server B and server C. Therefore, we need to set the application pool of this agilesharp site, so that it will not continuously introduce requests by default when it continuously accepts HTTP request application pool, it has a time delay, the delay is usually the default request processing time), which is then forwarded by ARR. Set as follows: 650) this. width = 650; "border =" 0 "alt =" 20120326104412.png" src = "http://www.agilesharp.com/Services/BlogAttachment.ashx? AttachmentID = 110 "/> setIdle Time-out (minutes)Set it to 0 and save it. OK. Here is the introduction. Next, let's take a look at some specific applications!
This article is from the "Yan Yang Tian" blog, please be sure to keep this source http://yanyangtian.blog.51cto.com/2310974/817136