IIS 7 Web Farm Basics with ARR, NLB and MySQL (Video)

Web Farming with IIS

     IIS 7 has proven to be a solid web server that can be easy to manage yet powerful at the same time. In this post I wanted to show how easy it can be to set up a redundant load balanced scalable server farm using IIS 7 using Application Request Routing. This isn’t intended to be a step by step guide but more a high level over view of what pieces you’ll need and how to assemble them. The plan is to use 7 Windows 2008 R2 servers to accomplish this. With this configuration up to 3 servers can go down and the farm stay up and operational.

  • 1 x AD Domain Controller
  • 2 x ARR Controllers in NLB
  • 2 x IIS Web servers
  • 2 x MySQL DB Servers

Traffic flow across the farm

     Network load balancing (NLB) is used to balance request to the Application Request Routing (ARR) servers with a VIP (Virtual IP) that is shared between the two servers in the NLB Cluster. The ARR servers then use URL Rewrite to forward/balance requests to the web servers located in the Web farm under ARR. The web servers can then make calls to the db servers as needed and complete the request. NLB is used instead of a Cluster because we want to balance the servers, in a cluster typically 1 server works until it fails and then second server kicks in. ARR is used to load balance in combination with NLB because ARR is aware at the application level so it knows if IIS is turning up errors like Error 500 pages and will quit sending requests to that server. NLB on the other hand will continue to send requests as long as the server can be reached.

     With IIS 7 in Shared configuration, you can use DFS-R to sync those files as well as all of the web content. Shared configuration makes keeping all of your IIS server configurations in sync a breeze. With Shared configuration the IIS configuration files are exported to a local or central directory, after that IIS is put into shared configuration mode and pointed to the files. Any changes made to one server instantly reflects on any of the other servers sharing the configuration. For the MySQL Servers I have set them up in a Master-Slave Replication configuration, with all reads and writes being done on one server the other being a backup for manual fail over.

IIS Web Farm Traffic Flow

Server configurations

     The image below gives you an idea of the basics that will need to be installed on each server. One thing to note is that ARR and URL Rewrite are add-ons for IIS 7.

Server configurations

Final thoughts

     In the end I was surprised how seamlessly everything tied together making a flexible yet powerful server farm. DFS-R is a great solution for keeping the IIS configs in sync as well as all your web content. The Web Farm Framework (WFF) could also be used to keep our content in sync and manage the farm with out needing AD. For this setup I opted for the AD controller though because it makes managing the farm and user/app pool accounts considerably easier. I hope this helps give a sense of direction in what you’ll need to get started web farming using IIS 7.

ARR – http://www.iis.net/downloads/microsoft/application-request-routing
Url Rewrite – http://www.iis.net/downloads/microsoft/url-rewrite

Comments are closed.