Detailed explanation of IIS Server Load balancer-Application Request Route Article 1: ARR Introduction

Source: Internet
Author: User

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

 

 

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 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 RouteIntroduction

Application Request RouteInstall

Links to articles:

Detailed explanation of IIS Server Load balancer-Application Request Route Article 1: ARR Introduction

Detailed explanation of IIS Server Load balancer-Application Request Route Article 2: Create and configure Server Farm

IIS Server Load balancer-Application Request Route explanation Article 3: Server Load balancer for Http requests using ARR (I)

IIS Server Load balancer-Application Request Route explanation Article 3: Server Load balancer for Http requests using ARR (below)

Detailed description of IIS Server Load balancer-Application Request Route Article 4: layer-3 deployment architecture using ARR

Application Request RouteIntroduction

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

      1. Enhance application availability and scalability
      2. Better use of server resources
      3. This makes application deployment more convenient and 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!

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.