Configure Shared Hosting Using ARR

Updated: November 5, 2009

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

This topic describes how to enable the host name affinity feature in Application Request Routing (ARR) to use in your shared hosting environment. The host name affinity feature lets ARR affinitize requests, regardless of whether they were made from one client or multiple clients to one server behind ARR. This guarantees that a given site can consume resources from only one server. A shared hosting deployment with ARR also gives you only one shared configuration to manage, evenly distributes your server resources, and dynamically load balances requests.

You must have IIS 7 installed on a computer that is running Windows Server® 2008 or newer, ARR and its dependent modules, a minimum of two application servers that have working sites and applications, and the servers configured to use a shared configuration and shared content before you continue. You also must have a server farm defined and configured. For more information, see Define and Configure an ARR Server Farm.

To use the host name affinity feature in your shared hosting environment, you must follow these steps:

  1. Enable the host name affinity feature.

  2. Specify the number of servers to use per host name.

Ensure that your application servers are configured to use a shared configuration and shared content. The sites on your application servers should use host name binding. You can enable the host name affinity feature by using the UI or by using the command line.

  1. Open IIS Manager.

  2. Expand the server node and then expand the Server Farms node. Select your server farm.

  3. In the Server Farm pane, double-click Server Affinity.

  4. On the Server Affinity page, do the following:

    • Select Use host name.

    • Select a provider from the Host name affinity provider list: Microsoft.Web.Arr.HostNameRoundRobin or Microsoft.Web.Arr.HostNameMemory.

      The provider determines to which server the host name should be affinitized. HostNameRoundRobin will evenly distribute the number of affinitized host names. HostNameMemory will distribute the number of affinitized host names based on the amount of memory available on the application servers.

    • Enter a value in the Time-out (minutes) box. By default, this value is set to 20 minutes. The time-out value determines how long the server should wait after the last request with the same host name before resetting.

  5. In the Actions pane, click Apply.

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

  2. To enable the host name affinity feature, enter the following command:

    appcmd.exe set config –section:webFarms /[name=’serverFarmName’].applicationRequestRouting.affinity.useHostName:”True” /commit:apphost

    where serverFarmName is the name of the server farm where you want to enable the host name affinity feature.

By default, all host names use one application server. You can increase capacity by specifying the number of application servers that sites can use per host name. You can specify the number of servers per host name by using the UI or by using the command line.

  1. Open IIS Manager.

  2. Expand the server node and then expand the Server Farms node. Select your server farm.

  3. In the Server Farm pane, double-click Server Affinity.

  4. On the Server Affinity page, click Advanced Settings.

  5. In the Advanced Settings dialog box, do the following:

    • In the Host Name column, enter a host name. This field is required.

    • In the Number of Allocated Servers column, enter the number of servers that this host name can use.

    • In the Alternate Host Names column, optionally specify additional host names that should be treated just like the values in the Host Name column.

    • Click OK.

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

  2. To specify the number of servers per host name, enter the following command:

    appcmd.exe set config -section:webFarms /+"[name='serverFarmName'].applicationRequestRouting.affinity.[name='URL',servers='#']" /commit:apphost

    where serverFarmName is the name of the server farm where you want to set the number of servers per host name, URL is the host name, and # is the number of servers that you want to allow for that host name. For example, to specify three servers for the host name www.contoso.com, enter the following command:

    appcmd.exe set config –section:webFarms /+”[name=’myServerFarm’].applicationRequestRouting.affinity.[name=’www.contoso.com’,servers=’3’]” /commit:apphost

See Also

Community Additions

ADD
Show: