Freigeben über


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:

  1. Create a server farm in ARR.

  2. 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

  1. Open IIS Manager.

  2. In the Connections pane, expand the server node.

  3. Under the server node, right-click Server Farms, and then select Create Server Farm….

  4. In the Create Server Farm dialog box, on the Specify Server Farm Name page, type a name for your server farm. Click Next.

  5. 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

  1. Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.

  2. 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.

  3. 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.

  4. To add application servers to your server farm, repeat step 3 as needed.

  5. 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

  1. Open IIS Manager.

  2. In the Connections pane, expand the server node.

  3. Under the server node, expand Server Farms, and then select the server farm that you created.

  4. In the Server Farm pane, double-click Load Balance.

  5. On the Load Balance page, select Weighted round robin from the Load balance algorithm list, and then click Apply.

  6. In the Connections pane, select the server farm that you created.

  7. In the Server Farm pane, double-click Health Test.

  8. 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.

See Also

Concepts

ARR Common Tasks
Configure HTTP Load Balancing Using ARR