Application Request Routing (ARR)

Application Request Routing (ARR) is an extension to Internet Information Server (IIS), which enables an IIS server to function as a load balancer. With ARR, an IIS server can be configured to route incoming requests to one of multiple web servers using one of several routing algorithms. By load balancing requests, high availability of web servers can be achieved without incurring the typically-high costs of dedicated load balancing products.

A typical ARR deployment is illustrated in the diagram below:

Application Request Routing (ARR)

ARR 3.0 supports the following features:
• Reverse proxy / web publishing
• Support multiple load balancing algorithms
• Health checking
• Caching
• Content delivery network (CDN)
• SSL Offloading
• Layer 4 and 7 routing decisions
• Usage reporting
• Cookie based affinity
• Application affinity opt-out
• Rich API
• Websocket support

Install and Configure Application Request Routing

Prerequisites:
• IIS 7.0 and above on Windows 2008 or newer where Application Request Routing would be installed.
• Minimum two application servers with working sites and applications.

STEP 1: Install Application Request Routing (ARR) and its dependencies:

Microsoft’s Application Request Router (ARR) IIS Extension is a complex piece of software which integrates with several other components to do its job. These components are URL Rewrite, Web Farm Framework and ARR’s External Cache module. For things to work correctly, not only do you need all components, but they must also be installed in a specific order

1. Stop IIS first by typing net stop was /y and net stop wmsvc /y on an elevated command-line window:

Application Request Routing (ARR)

*** note that WMSVC is the IIS Web Management Service, which might not be enabled on your server. In such a case, trying to stop it will result with the ‘Web Management Service’ service is not started. This is not unusual and should not be cause for alarm.

2. Download and install the Web Farm Framework module. It is currently available in version 1.1
http://download.microsoft.com/download/5/7/0/57065640-4665-4980-a2f1-4d5940b577b0/webfarm_v1.1_amd64_en_us.msi

3. Download and install the External cache module. It is currently available in version 1.0
http://download.microsoft.com/download/3/4/1/3415F3F9-5698-44FE-A072-D4AF09728390/ExternalDiskCache_amd64_en-US.msi

4. Download and install the URL Rewrite module. It is currently available in version 2.0
http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_amd64_en-US.msi

5. Download and install ARR itself. It is currently available in version 3.0
http://download.microsoft.com/download/6/3/D/63D67918-483E-4507-939D-7F8C077F889E/requestRouter_x64.msi

6. Start the IIS services back (or, simply reboot your server) and you should be good to go!

STEP 2: Create and Configure an Application Request Routing Server Farm

The server farm is a logical group of application servers where HTTP requests are routed based on HTTP inspection rules and load balance algorithm.

A. Create a server farm in Application Request Routing

1. Launch IIS Manager.
2. Application Request Routing is a server level feature. Select and expand the root of the server.

Application Request Routing (ARR)
3. To create a server farm, right-click Server Farms, and then select Create Server Farm.

Application Request Routing (ARR)
4. Enter a name for the server farm. In the example below, MyServerFarm is the name of the server farm. Click Next.

Application Request Routing (ARR)
5. The next step is to add servers to the server farm. On the Add Server page of the wizard, add as many application servers as needed. Click Finish to create the server farm with the entered application servers as the server farm members. (Note: Advanced options… allow you to configure the HTTP and HTTPS ports to non-standard (80 for HTTP and 443 for HTTPS) ports:

Application Request Routing (ARR)
6. A generic URL rewrite rule will be created to route all incoming requests to this server farm automatically. Click on Yes.

Application Request Routing (ARR)
7. You have successfully created a server group with application servers as its members.

B. Configure server farm properties for Application Request Routing

After the server farm is created and defined, additional properties can be set to manage the behavior of Application Request Routing.

Select the server farm, MyServerFarm. The following icons are shown:

Application Request Routing (ARR)
a. Verify URL rewrite rules

1. Double-click Routing Rules.
2. Verify that the Use URL Rewrite to inspect incoming requests checkbox is checked.

Application Request Routing (ARR)
3. SSL offloading is enabled by default. When this feature is enabled, all communication between the ARR server and the application servers are done in clear text, even for HTTPS requests from clients to the ARR server. When both the ARR server and the application servers are deployed within a trusted network, such as within the same datacenter, enabling SSL offloading does not sacrifice security. Also, enabling this feature can further help to maximize the server resources on the application servers, since they do not have to spend cycles in encrypting and decrypting requests and responses.

To disable SSL offloading, uncheck the Enable SSL offloading checkbox, and then click Apply.

b. Configure Load Balance Algorithm

1. Select MyServerFarm. Double-click Load Balance Algorithm.
2. Verify that Weighted round robin option is selected under Load balance algorithm.
3. Verify that Even distribution option is selected under Load distribution. You can also configure custom load distribution if required.

Application Request Routing (ARR)
4. Open a browser and send several requests to the ARR server.
5. To verify that the requests are being load balanced equally between the application servers, select MyServerFarm. Double-click Monitoring and Management.
9. In the dashboard view, verify that the requests are being evenly distributed.

c. Configure health check monitoring

Application Request Routing monitors the health of the content servers in two ways:

• Via the live traffic
• Via an explicit URL testing

The live traffic testing is performed automatically by default when the requests are made to Application Request Routing. The explicit URL testing is an additional test that can be used with the live traffic testing. In this section, the walk through guides you through configuring the explicit URL testing.

1. The URL testing requires a specific URL to test. To satisfy this requirement, use Notepad to create a text file named healthCheck.txt that contains the sentence “I am healthy.”
2. Place the healthCheck.txt file on the application servers.
3. Verify that the healthCheck.txt is rendering properly by opening the page in a browser.
4. In IIS Manager, select the server farm, MyServerFarm.
5. Double-click Health Test.

Application Request Routing (ARR)
6. Enter http://(server name or FQDN of ARR server)/healthCheck.txt as the URL value.
7. Enter healthy as the Response match value. Response match is an optional test to make sure that the body of the response contains the expected string. In this case, since healthCheck.txt contains the sentence “I am healthy.”, Response match will look for the word “healthy”.
8. Click Apply to save the changes.
9. To verify the functionality of health check monitoring, stop the monitored site on one of the application servers. Since the Interval (seconds) value is set to 30 seconds, wait for 30 seconds for the next health check.
10. After waiting for 30 seconds, send several requests to the ARR server.
11. To verify that all requests are going to the healthy server(s), double-click Monitoring and Management, and then refresh the dashboard by using the F5 key. Note that the runtime statistics have been reset. This is by design. You may want to send additional requests and refresh the dashboard, as needed.

Application Request Routing (ARR)
12. Health monitoring is also used to detect when an unhealthy server becomes healthy. To verify this functionality, start the site that was stopped in Step 9. Again, since the Interval (seconds) value is set to 30 seconds, wait for 30 seconds for the next health check.
13. After waiting for 30 seconds, send several requests to the ARR server.
14. To verify that the requests are distributed evenly between servers, refresh the dashboard in IIS Manager. Note that the runtime statistics have been reset. This is by design. You may want to send additional requests and refresh the dashboard, as needed.

Application Request Routing (ARR)

d. Configure client affinity

Application Request Routing provides a client affinity feature that maps a client to a content server behind Application Request Routing for the duration of a client session. When this feature is enabled, the load balancing algorithm is applied only for the very first request from the client. From that point on, all subsequent requests from the same client would be routed to the same content server for the duration of the client session. This feature is useful if the application on the content server is stateful and the client’s requests must be routed to the same content server because the session management is not centralized.

1. Select the server farm, MyServerFarm.
2. Double-click Server Affinity.

Application Request Routing (ARR)
3. To enable client affinity, check the Client affinity checkbox, and then click Apply.

Application Request Routing uses a cookie to enable client affinity. The Cookie name (JSESSIONID) will be used to set the cookie on the client. That said, the client must accept cookies for client affinity to work properly.

4. To verify the functionality of client affinity, send several requests to the ARR server. Refresh the dashboard in IIS Manager (Monitoring and Management). Verify that the runtime statistics are changing for only one of the application servers to where the client is affinized. You may want to send additional requests and refresh the dashboard, as needed.

Application Request Routing (ARR)

f. Configure Application Pool Settings

The application pool idle time-out is an IIS feature that shuts down the application pool when there is inactivity. By default, the amount is set for 20 minutes, which represents amount of time (in minutes) that a worker process will remain idle before it shuts down. A worker process is idle if it is not processing requests and no new requests are received.

Because all HTTP requests and responses go through ARR, delays or errors occur if the application pool times out or recycles unexpectedly. However, an application pool for ARR should be running all the time. Set the idle time-out and application pool recycle settings to zero to avoid problems.

To Change Application Pool Settings:
Including ARR server, on each web servers in your farm, open IIS Manager.
1. In the Connections pane, select Application Pools.
2. In the Application Pools pane, select the application pool for your website, and then click Advanced Settings in the Actions pane.
3. In the Advanced Settings dialog box, expand Process Model, and change the Idle Time-out (minutes) value to 0.

Application Request Routing (ARR)
4. Expand Recycling, and change the Regular time intervals (in minutes) value to 0.

Application Request Routing (ARR)
5. Click OK.

Remove Request Routing Component

To remove Application Request Routing completely, the 4 packaged components must be removed individually.

1. Open Control Panel.
2. Select Program and Features.
3. Locate the following 4 components and uninstall one at a time:

• Microsoft Application Request Routing
• Microsoft External Cache Version
• Microsoft URL Rewrite Module
• Microsoft Web Farm Framework

Using Multiple Instances of Application Request Routing (ARR) Servers

While ARR provides high availability and scalability for the content servers, the overall deployment is not highly available or scalable because:

• ARR is the single point of failure.
• The scalability of the content servers is limited by the maximum capacity of one ARR server.

To overcome these challenges, administrators may consider using multiple ARR servers with hardware load balancers, such as F5. ARR can be deployed in active/passive mode to only achieve high availability or in active/active mode to achieve both high availability and scalability.

Application Request Routing (ARR)

Configure Multiple Instances of Application Request Routing (ARR) Servers

You need to configure Microsoft External Cache to manage host name affinity between multiple instances of Application Request Routing (ARR) servers. The External Cache module lets you share runtime state information, including the affinized mapping between host names and content servers, with multiple ARR servers. This module is only required if your environment includes more than one ARR server and if you intend to use the host name affinity feature. The host name affinity feature is specific to shared hosters and uses two providers to determine to which server the host should be affinized.

Prerequisites:

• Minimum two ARR servers with IIS 7.0 or above on Windows 2008 or newer installations. All ARR servers must be configure in a same way.
• Microsoft Application Request Routing and dependent modules (which includes Microsoft External Cache).
• Minimum two application servers with working sites and applications.
• One file share where ARR can read and write files.

Configure External Cache

1. Open IIS Manager on ARR server.
2. In the Connections pane, expand the server node and then expand the Server Farms node. Select your server farm.
3. In the Server Farm pane, double-click Server Affinity.
4. On the Server Affinity page, select the Use host name check box.

Application Request Routing (ARR)
5. To enable External Cache, select the Use external cache check box.
6. In the File share path box, enter a location where the ARR servers will maintain the host name affinity state. A file share is required.

Application Request Routing (ARR)
7. Repeat steps 4–6 on all ARR servers.

FIX: The host name affinity expires unexpectedly when you enable the External Cache option in Application Request Routing 3.0

Symptoms
Assume that you install the Microsoft Application Request Routing (ARR) 3.0 module on a server that is running Internet Information Services (IIS) 7.0, 7.5, or 8.0. Then, you enable the External Cache option when you configure the host name affinity of an ARR server farm. In this situation, the host name affinity expires before the configured time-out period. Additionally, the client affinity cookie for the requests is changed.

Resolution
Hotfix information: The following file is available for download from the Microsoft Download Center:
http://www.microsoft.com/en-us/download/details.aspx?id=40877

Prerequisites
To apply this hotfix, you must have Microsoft Application Request Routing (ARR) 3.0 installed.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

 


<<Click here to see all posts>>

If you found any of the information on this page helpful in anyway then please consider sharing this content with your favorite social network or by leaving your thoughts in the comment section. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove You Are Human Time limit is exhausted. Please reload CAPTCHA.