1 of 6 12/28/2011 3:26 PM Home > Learn > Installing and Configuring IIS 7 > Application Request Routing Module > Define and Configure an Application Request Routing Server Farm Define and Configure an Application Request Routing Server Farm Published on July 02, 2008 by pharr Updated on November 05, 2009 by pharr Tags: Application Request Routing ARR 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. Microsoft Application Request Routing Version 1 and dependent modules. Minimum of two application servers with working sites and applications. If Application Request Routing RC has not been installed, it is available for download at: Download Microsoft Application Request Routing Version 1 for IIS 7 (x86) here (http://iis.net/downloads
2 of 6 12/28/2011 3:26 PM /default.aspx?tabid=34&g=6&i=1709). Download Microsoft Application Request Routing Version 1 for IIS 7 (x64) here (http://iis.net/downloads /default.aspx?tabid=34&g=6&i=1712). (http://iis.net/downloads/default.aspx?tabid=34&g=6&i=1712) Follow the steps outlined in this (http://learn.iis.net/page.aspx/482/install-application-request-routing/) document to install Application Request Routing. 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 Next.
3 of 6 12/28/2011 3:26 PM (/file.axd?i=1197) 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: (/file.axd?i=1487)
4 of 6 12/28/2011 3:26 PM (/file.axd?i=1198) 6. You have successfully created a server group with application servers as its members. To create and define a server farm using the command-line: 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 of Application Request Routing. Only the subset of the settings is covered in this walkthrough. To configure server farm properties using the UI: 1. Select the server farm, myserverfarm. The following icons are shown:
5 of 6 12/28/2011 3:26 PM (/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) 3. ARR can be configured to send a GET request to a URL to determine the health of the servers. To configure this feature, double-click Health Test, and then type the URL that should be tested by ARR. Click Apply to save changes. (/file.axd?i=1201)
6 of 6 12/28/2011 3:26 PM 4. Explore other icons to familiarize yourself with ARR settings. (/file.axd?i=1062) Summary You have now successfully created and defined a server farm, myseverfarm. At this point, myserverfarm is 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-hostingdeployment-with-arr/) Using Compression in Application Request Routing (/page.aspx/676/using-compression-in-application-requestrouting/) Use Scavenge.exe tool to delete cached content from secondary cache drive (/page.aspx/725/usescavengeexe-tool-to-delete-cached-content-from-secondary-cache-drive/) Using Performance Counters (/page.aspx/691/using-performance-counters/)