Using Multiple Instances of Application Request Routing (ARR) Servers
by Won Yoo
This topic leads you through the steps to configure Microsoft External Cache for IIS 7.0 and above, which can be used to manage the host name affinity data between multiple instances of Application Request Routing (ARR) servers.
Note that the External Cache for IIS is only required if:
- The host name affinity feature is used.
- There is more than one ARR server being used in the environment.
External Cache is a disk-based cache module for IIS.
To configure and use Microsoft External Cache for IIS with Application Request Routing:
This walkthrough requires the following prerequisites:
- Minimum of two IIS 7.0 or above on Windows 2008 (any SKU) or newer installations.
- Microsoft Application Request Routing Version 1 and dependent modules (which includes Microsoft External Cache Version 1).
- Minimum of two application servers with working sites and applications.
- One file share where ARR can read and write files.
If the Application Request Routing Version 1 has not been installed, download it at:
- Download Microsoft Application Request Routing Version 1 for IIS 7 (x86) here.
- Download Microsoft Application Request Routing Version 1 for IIS 7 (x64) here.
Follow the steps outlined in this document to install Application Request Routing.
You must have at least two ARR servers and two application servers. You can use a shared configuration to keep the ARR servers configured the same way, and use another shared configuration to keep the application servers in sync. For more information about shared configuration, refer to this article.
As another prerequisite, you must have defined and configured a server farm using the steps outlined in Define and Configure an Application Request Routing (ARR) Server Group.
Step 1 - Enable External Cache.
To enable External Cache using the UI:
- Launch IIS Manager.
- Select the server farm that has been created for this walkthrough.
- The following icons are shown:
- Double-click Server Affinity.
- As mentioned above, External Cache is needed only if host name affinity is used and there are multiple instances of ARR. Therefore, ensure that the Use host name checkbox is selected.
- Select the Use external cache checkbox to enable External Cache. The File share path text box is a required field, and specifies where the ARR servers will access to maintain the host name affinity state between the ARR servers.
- Repeat the steps above on all ARR servers.
- To verify that the feature works, send a request with a specific host name to one of the ARR servers. Make a note of which application server this host name is affinitized to. Send the same request to the remaining ARR servers. Regardless of which ARR server is handling the requests with this host name, they all should be routed to the same application server.
- You may also want to verify the file share where the data is being written.
To enable External Cache using the command-line:
- Open a command prompt with administrator privileges.
- Navigate to
To enable host name affinity, enter (the example below uses myServerFarm as the name of the server farm):
appcmd.exe set config -section:webFarms /[name='myServerFarm'].applicationRequestRouting.affinity.useHostName:"True" /commit:apphost
To enable and configure External Cache, enter the following script (the example below uses the same values as the ones used in the UI steps above). Enter your password in place of ********:
appcmd.exe set config -section:system.webServer/externalCache/diskCache /[name='ARRCache'].path:"\\wonyoo-w2k8-3\IISShared" /[name='ARRCache'].userName:"redmond\wonyoo" /[name='ARRCache'].password:"********" /commit:apphost
You have now successfully enabled and configured Microsoft External Cache for IIS to be used with the host name affinity feature in Application Request Routing. For more information about achieving high availability at the ARR tier, refer to: