Published on July 02, 2008 by pharr Updated on November 05, 2009 by pharr Tags: Application Request Routing ARR
Define and Configure an Application Request Routing Server Farm
Home > Learn > Installing and Configuring IIS 7 > Application Request Routing Module > Define and Configure an Application Request Routing Server Farm
Overview
This topic leads the reader through the steps to define and configure a server group for Application Request Routing (ARR) Version 1 on IIS 7.0. The server farm is a logical group of application servers where HTTP requests are routed based on HTTP inspection rules and load balance algorithm.
Goal
To define and configure a server farm in Application Request Routing Version 1 on IIS 7.0 as shown below:
(/file.axd?i=1061) (/file.axd?i=1194)
Prerequisites
This walkthrough requires the following prerequisites:
IIS 7.0 on Windows 2008 (any SKU) or newer.
Step 1 – Create a server farm in Application Request Routing
To create and define a server farm using the UI:
1. Launch IIS Manager.
2. Application Request Routing is a server level feature. Select and expand the root of the server.
(/file.axd?i=1060) (/file.axd?i=1195)
3. To create a server farm, right-click Server Farms, and then select Create Server Farm....
(/file.axd?i=1058) (/file.axd?i=1196)
4. Enter a name for the server farm. In the example below, myServerFarm is the name of the server farm. Click
(/file.axd?i=1197)
1. Open a command prompt with administrator privileges.
2. Navigate to %windir%\system32\inetsrv.
3. To create the server farm named myServerFarm, enter appcmd.exe set config -section:webFarms
/+"[name='myServerFarm']" /commit:apphost.
4. To add an application server named wonyoo-w2k8 to the server farm named myServerFarm, enter appcmd.exe set
config -section:webFarms /+"[name='myServerFarm'].[address='wonyoo-w2k8']" /commit:apphost.
Repeat this command as many times as needed to add more servers to the server farm.
5. This step is only required when creating the server farm using appcmd. When creating the server farm using the UI, the URL rewrite rules are created automatically. With appcmd, the URL rewrite rules must be created manually. To route all incoming HTTP requests to the server farm named myServerFarm, enter:
appcmd.exe set config -section:system.webServer/rewrite/globalRules
/+"[name='ARR_myServerFarm_loadbalance', patternSyntax='Wildcard',stopProcessing='True']" /commit:apphost
appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].match .url:"*" /commit:apphost
appcmd.exe set config -section:system.webServer/rewrite/globalRules
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action .type:"Rewrite"
/[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action .url:"http://myServerFarm/{R:0}" /commit:apphost
Step 2 – Configure server farm properties for Application Request Routing
After the server farm has been created and defined, additional properties can be set to manage the behavior ofApplication Request Routing. Only the subset of the settings is covered in this walkthrough.
To configure server farm properties using the UI:
(/file.axd?i=1199)
2. For this walkthrough, you will change the load balance algorithm that will be used for the server group,
myServerFarm. Double-click Load Balance. Select Weighted round robin from the Load balance algorithm drop-down list, and then click Apply.
(/file.axd?i=1200)
configured to distribute the incoming requests evenly between the application servers that have been added as members of the server farm. For more advanced load balancing settings, refer to HTTP Load Balancing using Application Request Routing (http://learn.iis.net/page.aspx/486/http-load-balancing-using-application-request-routing/).
Related Content
Articles
Demonstration of Shared Hosting Deployment with ARR (/page.aspx/509/demonstration-of-shared-hosting-deployment-with-arr/)
Using Compression in Application Request Routing (/page.aspx/676/using-compression-in-application-request-routing/)
Use Scavenge.exe tool to delete cached content from secondary cache drive (/page.aspx/725/use-scavengeexe-tool-to-delete-cached-content-from-secondary-cache-drive/)