Detailed explanation of IIS Server Load balancer-application request route Article 1: arr Introduction

Source: Internet
Author: User

Detailed explanation of IIS Server Load balancer-application request route Article 1: arr Introduction

Speaking of Server Load balancer, I believe everyone is no stranger. 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 already has manyArticleI have introduced it, but many documents are in English. In my project, I used to convert the relevant documents into Chinese to use and test the application request route, and circulated them among the team members, this series adds some useful experiences to these documents.

This topic is as follows:

Application request routeIntroduction

Application request routeInstall

Application request routeIntroduction

Application request route (ARR) is a proxy-based module hosted on iis7 (and later IIS versions). It can determine HTTP headers, server variables, and Server Load balancerAlgorithmForward HTTP requests to different processing servers. ARR is used as follows:

        1. Enhance application availability and scalability
        2. Better use of server resources
        3. Make the applicationProgramAnd supports satellite deployment management and hot replacement.
        4. Lower management costs, making shared host deployment possible

ARR is based on the URL rewrite module. It detects HTTP requests sent from the client to make request routing decisions.

Next, let's take a look at some features of ARR:

1. Request Routing decisions made based on HTTP requests

Unlike Hardware load balancing (the Request Routing Method is determined at the OSI model's IP layer), arr performs Load Balancing Based on the application layer, because more information is available at the application layer (in fact, 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 Algorithms

We can decide which Server Load balancer algorithm to use for Request Routing. Arr provides the following six algorithms.

3. Health Check

We 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 affinity

As 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:

      1. If client affinity is used, traditional sessions and caches can be used in applications, instead of distributed sessions and caches. Here, we use session as an example, because in many cases, we need to deploy a site application to multiple servers. If session is used in some places, in particular, distributed sessions are used to save user data. User logon is the most obvious example (to prevent users from logging on from server, when the current request is processed on server B, You need to log on again ). With the client affinity, arr can forward requests from the same user to the server where the user requests for the first time.
      2. By using client affinity, the significance of Server Load balancer is lost to some extent. Because the client affinity is set, even if the user's initial request server is under great pressure, arr will still forward the user's request.
      3. Client affinity, loss of high availability. It is very likely that the server processing user requests is down. Although arr has a health check mechanism, arr can still send requests to the down server, resulting in the request being unable to be processed.

5. affinity of the Host Name

After understanding the "client affinity" above, it is easier to understand it here. "Host Name affinity" is mainly used in shared servers (many people use a server, that is, when the site is deployed, they purchase a "virtual address space "). We will explain it in detail later.

6. server group

Arr can manage many server groups, each of which contains multiple server servers.

7. graphical interface-based management and health

ARR is integrated with IIS and visualized operation interfaces are provided to facilitate operations.

8. Develop tracking rules for request failures

In arr, you can define specific tracking rules to view the tracing information after request processing fails to facilitate diagnosis.

Application request routeInstall

Next, we will introduce how to install arr for Quick Start and learning:

Arr depends on the following components:

      1. Microsoft URL rewrite module for IIS 7.0.
      2. Microsoft Web Farm Management Version 1 for IIS 7.0.
      3. Microsoft Application Request Routing version 1 for IIS 7.0.
      4. Microsoft external cache version 1 for IIS 7.0.

Arr installation requires the following environment:

      1. IIS 7.0 and later versions (I have installed IIS in both Windows 7 and server, which is acceptable)

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/ApplicationRequestRouting

2. Now arr is integrated into the web Installation Platform, As follows:

3. Click "Install" to start installation.

4.After installation, open the IIS control window, as shown in the following figure (win7 System Interface ):

If "server farms" is displayed, the installation is OK.

5. Configure the application pool

All 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 (numbers A, B, and C) in our hands to deploy the agilesharp site. The arrangement is as follows:

Now the address exposed by server a to the outside is assumed to be: 159.12.2.15, then we will create an agilesharp site on server A, as shown below:

In addition, we set the application pool of the agilesharp site to the IIS integration mode. 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 can continuously accept HTTP requests (the application pool will not continuously introduce requests by default, it has a time delay, which is usually the default request processing time) and is then forwarded by arr.

The settings are as follows:

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!

Address: http://www.agilesharp.com/u/yanyangtian/Blog.aspx/t-196

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.