How to use IIS as Load Balancer with Application Request Routing

More and more companies needs High Availability for the systems that they are using. It doesn't matter if the service published to the Internet or use it internally.

Last months I worked a lot with Load Balancers for a Website or a specific service. So today i would like to explain how can use Microsoft ARR as Load Balance for your IIS Servers.

Let's start !!!

 

What is Application Request Routing (ARR)

Before start with the implementation i would like to explain in few words what is the Application Request Routing or ARR.

Application Request Routing it's is a proxy based routing module that forward HTTP requests to content servers based on the HTTP headers.

ARR can be used to

  • Increase application availability and scalability.ke 
  • Better utilize content server resources.
  • Facilitate application deployment including pilot management and A/B testing.
  • Lower management costs and create opportunities for shared hosts.

 

 

Web Farm infrastructure types

It's very important to spend some time for the proper infrastructure before start the implementation.

The ARR can give us 2 types that can use for the Web Farm infrastructure.

  • Local Content Infrastructure

In local content infrastructure each Web Server keeps the content locally. This type of infrastructure has a main disadvantage when you have to publish a large website with a lot of folders and data in the backend.

The main disadvantage is that you must keep the content in each Web Server sync and it's very difficult to do it manual. The only way to automate the sync is to use the DFS Technology.

  • Share Network Infrastructure

In Share network infrastructure the content hosted in a share location as a File Server and all the Web Servers pointed to the share location.

It's very useful for large sites but has some disadvantages.:

  • Network bandwidth can become a limiting factor for a busy web farm.

  • File locking issues might arise as multiple servers use the same files.

Both infrastructure types has advantages and disadvantages. Based on your requirements you can decide which is the more efficient for your Web Farm.

 

Lab Infrastructure

Let's see what i have used for the Load Balance scenario:

  • 2 x IIS as Webservers that host the Website
  • 1 x Load Balancer to forward all the HTTP Requests in the Webservers.

Here you can find a diagram of how will be the infrastructure of your Web Servers after included the Load Balancer.

 

 

How to Install IIS and ARR in the Load Balance Server

To use the Application Request Routing(ARR) we need to proceed with the default installation of an IIS in the Server that will be used as Load Balancer.

Let's proceed with the right order of the tasks that must be done.

  • Open the PowerShell as Administrator to do the IIS default installation
  • Type the following command
    Install-WindowsFeature -name Web-Server -IncludeManagementTools

 

 

How to create and configure the Web Farm

After the installation is completed, open the IIS Manager and proceed with the following steps to create the Web Farm.

  • You will see a new option, the Server Farm.
  • Right-click in the Server Farm, and select Create Server Farm.

 

  • Type the Name that you would like to use, and click Next.

 

  • Add the IP Addresses of the Web Servers, and click Next.

 

  • Now if you will expand the Web Farm, and click on Servers , you will see the the IP Addresses and the Status of our Web Servers.

 

  • It's very important to do some changes in the DNS Entries of our DNS Servers.
  • As we have the Load Balancer all the request must be send to the IP Address of the Load Balancer.
  • So we must create a DNS A Entry in our DNS Servers with the website name to point in the Load Balancer IP Address.

That's it!!

Now you have include a Load Balancer that will be manage all the traffic to your web site ,and at the same time will have  High Avaialable solution for your Web Servers.