Define and Configure an ARR Server Farm
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
This topic describes how to define and configure a server farm for Application Request Routing (ARR). ARR is used when a server farm, composed of application servers, receives HTTP requests from ARR. These ARR requests are based on HTTP inspection rules and load-balance algorithms. To configure an ARR server farm, you must have ARR and its dependent modules installed, and a minimum of two application servers. For system requirements, see Install Application Request Routing.
To define and configure an ARR server farm, you must do the following:
Create a server farm in ARR.
Configure the server farm properties.
Create a Server Farm in ARR
You can create a server farm by using the UI or by using the command line.
To create a server farm by using the UI
Open IIS Manager.
In the Connections pane, expand the server node.
Under the server node, right-click Server Farms, and then select Create Server Farm….
In the Create Server Farm dialog box, on the Specify Server Farm Name page, type a name for your server farm. Click Next.
On the Add Server page, enter the server addresses for the servers that you want to add to your server farm. Optionally, expand the Advanced options… setting to modify the HTTP and HTTPS ports to non-standard values. When you finish adding servers to your server farm, click Finish.
To create a server farm by using the command line
Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.
To create a server farm, enter the following command:
appcmd.exe set config –section:webFarms /+”[name=’serverFarmName’]” /commit:apphost
where serverFarmName is the name that you designate for your server farm. For example, to create a server farm with the name MyServerFarm, enter the following command: appcmd.exe set config –section:webFarms /+”[name=’MyServerFarm’]” /commit:apphost.
To add an application server to your server farm, enter the following command:
appcmd.exe set config –section:webFarms /+”[name=’serverFarmName’].[address=’serverAddress’]” /commit:apphost
where serverFarmName is the name that you designate for your server farm, and serverAddress is the address of the server that you want to add to your server farm.
To add application servers to your server farm, repeat step 3 as needed.
To create URL rewrite rules that will route all incoming HTTP requests to the server farm that you just created, enter the following commands:
appcmd.exe set config -section:system.webServer/rewrite/globalRules /+”[name=’ARR_serverFarmName_loadbalance’,patternSyntax=’Wildcard’,stopProcessing=’True’]” /commit:apphost
appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name=’ARR_serverFarmName_loadbalance’,patternSyntax=’Wildcard’,stopProcessing=’True’].match.url:”*” /commit:apphost
appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name=’ARR_serverFarmName_loadbalance’,patternSyntax=’Wildcard’,stopProcessing=’True’].action.type:”Rewrite” /[name=’ARR_serverFarmName_loadbalance’,patternSyntax=’Wildcard’,stopProcessing=’True’].action.url:https://serverFarmName/{R:0} /commit:apphost
where serverFarmName is the name that you designated for your server farm.
Configure Server Farm Properties for ARR
After you successfully create and define a server farm, you can set additional properties to manage the behavior of ARR. The following procedure configures your server farm to distribute incoming requests evenly between the application servers in your server farm.
To configure server farm properties
Open IIS Manager.
In the Connections pane, expand the server node.
Under the server node, expand Server Farms, and then select the server farm that you created.
In the Server Farm pane, double-click Load Balance.
On the Load Balance page, select Weighted round robin from the Load balance algorithm list, and then click Apply.
In the Connections pane, select the server farm that you created.
In the Server Farm pane, double-click Health Test.
On the Health Test page, in the URL box, enter a URL that you want ARR to test by sending a GET request to determine the health of the servers. Click Apply.