Configure a Health Test for an ARR Server Farm
Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
This topic describes how to configure Application Request Routing (ARR) to test the health of the content servers. ARR monitors the health of the content servers by using live traffic tests and explicit URL tests. Live traffic testing is performed automatically when requests are made to the ARR server. You can configure explicit URL testing to work in conjunction with the live traffic testing.
Configure a Health Test for an ARR Server Farm
You can configure a health test, including an explicit URL test, by using the UI or by using the command line.
To configure a health test for ARR by using the UI
Open Notepad, and create a text file named HealthCheck.txt with the sentence I am healthy.
Put the healthCheck.txt file on the application servers.
To verify that the HealthCheck.txt file renders properly, open the file in a Web browser.
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 Health Test.
On the Health Test page, enter the following in the URL box:
https://serverName/healthCheck.txt
where serverName is the name of your ARR server.
Enter the following in the Response match box: healthy
Response match is an optional test that searches the body of a response and looks for an expected string. Because the HealthCheck.txt file contains the phrase “I am healthy,” the response match test will look for the word “healthy.”
Click Apply.
To configure a health test for ARR by using the command line
Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.
To set the URL to https://serverName/HealthCheck.txt that includes the “I am healthy” string to match, enter the following command:
appcmd.exe set config –section:webFarms /[name=’serverFarmName’].applicationRequestRouting.healthCheck.url:”https://serverName/healthCheck.txt” /[name=’serverFarmName’].applicationRequestRouting.healthCheck.responseMatch:”I am healthy.” /commit:apphost
where serverName is the name of your server and serverFarmName is the name of your server farm. For example, to set the URL to https://contoso/HealthCheck.txt, enter the following command:
appcmd.exe set config –section:webFarms /[name=’myServerFarm’].applicationRequestRouting.healthCheck.url:”https://contoso/healthCheck.txt” /[name=’myServerFarm’].applicationRequestRouting.healthCheck.responseMatch:”I am healthy.” /commit:apphost