Use Multiple Instances of ARR Servers
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
This topic describes how to configure and use 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 affinitized 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 affinitized.
To configure External Cache, you must have IIS 7 installed on a computer that is running Windows Server® 2008 or a later operating system, ARR and its dependent modules, a server farm, and a minimum of two application servers that have working sites and applications. You should also have a file share configured so that ARR can read and write files.
For information about shared configuration, see Shared Configuration.
For information about how to achieve high availability at the ARR tier, see Achieve High Availability and Scalability Using ARR and NLB and Achieve High Availability and Scalability Using ARR and Hardware Load Balancer.
Configure External Cache
You can configure External Cache by using the UI or by using the command line.
To configure External Cache by using the UI
Open IIS Manager.
In the Connections pane, expand the server node and then expand the Server Farms node. Select your server farm.
In the Server Farm pane, double-click Server Affinity.
On the Server Affinity page, select the Use host name check box.
To enable External Cache, select the Use external cache check box.
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.
Repeat steps 4–6 on all ARR servers.
To verify functionality, send a request with a specific host name to an ARR server. Record the host name to which the application server is affinitized. Send the same request to the remaining ARR servers. All requests with this specific host name should be routed to the same application server.
To configure External Cache by using the command line
Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.
To enable host name affinity, enter the following command:
appcmd.exe set config -section:webFarms /[name='serverFarmName'].applicationRequestRouting.affinity.useHostName:"True" /commit:apphost
where serverFarmName is the name of your server farm.
To enable and configure External Cache, enter the following command:
appcmd.exe set config -section:system.webServer/externalCache/diskCache /[name='ARRCache'].path:"fileSharePath" /[name='ARRCache'].userName:"username" /[name='ARRCache'].password:" *****" /commit:apphost
where fileSharePath is the location where the ARR servers will maintain the host name affinity state, username is your user login, and ***** is your password.