Benefits of host name affinity provider in ARRv1 RTW

As you know, ARRv1 has RTW'ed last week.

Download the RTW release from:

One of the features that we have added between ARRv1 RC and ARRv1 RTW is host name affinity provider.  This feature is used only when host name affinity is enabled in shared hosting scenarios.  The feature is located at Server Farm -> Server Affinity -> Host Name Affinity:

 

There are two providers that are available out of the box:

  • Microsoft.Web.Arr.HostNameRoundRobin
  • Microsoft.Web.Arr.HostNameMemory

They are all documented in the walkthroughs (How to configure Microsoft.Web.Arr.HostNameMemory is here.) and online help so I won't repeat what they are in this blog.

What I would like to share are some of the findings and the benefits of these providers.

 

ARRv1 RC: 

In ARRv1 RC, without the providers, the host name affinity decision was made using the same load balance algorithm that was selected for the server farm.  In our environment, where we have 4 application servers behind ARR, below is what we have seen:

Above graph is showing the available memory on each of the 4 servers in the server farm and as you can see, they are not evenly distributed.  This is because the load balance algorithms are largely based on the number and size of requests/responses and the responsiveness of the servers.  More explicitly, they do not take the memory consumption as a decision point.

This is not ideal, especially in a shared hosting environment, where 100's or even1000's of sites are competing for the same resources on the shared server.  With running ASP.NET application, we also know that the application servers are memory bound.

In order to address this challenge, in ARRv1 RTW, we have introduced the two providers mentioned above.

 

ARRv1 RTW: Microsoft.Web.Arr.HostNameRoundRobin

Microsoft.Web.Arr.HostNameRoundRobin tries to evenly distribute the number of affinitized servers, but it still does not take the memory consumption as a decision point.  Using Microsoft.Web.Arr.HostNameRoundRobin provider, we have seen a dramatic change in the distribution of active worker processes:

Note the difference between before and after.

However, it still didn't result in an even distribution of memory consumption on the application servers:

It is a good improvement, but we can do better.

 

ARRv1 RTW:  Microsoft.Web.Arr.HostNameMemory

Microsoft.Web.Arr.HostNameMemory provider queries the memory utilization of the application servers in the server farm using WMI (Refer to this walkthrough for details on how to configure Microsoft.Web.Arr.HostNameMemory).

Using Microsoft.Web.Arr.HostNameMemory, the number of affinitized servers are not as evenly distributed as Microsoft.Web.Arr.HostNameRoundRobin:

However, the memory utilization across the application server is evenly distributed:

Since Microsoft.Web.Arr.HostNameMemory provider relies on WMI, it is true that the application servers in the server farm must be Windows.  Also, the configuration of Microsoft.Web.Arr.HostNameMemory provider is more involved than that of Microsoft.Web.Arr.HostNameRoundRobin.

 

Having said above, there are other great use cases for ARR.  For this and other great features of ARR, checkout the RTW release at http://www.iis.net/extensions/ApplicationRequestRouting

2 Comments

Comments have been disabled for this content.