Web Farm - Simple Overview



In this article we are going to discuss a simple overview of the Web Farm and its advantages.

Afterdeveloping an ASP.NET application, we need to deploy it to a production server. A single server is sufficient to process the requests and responses of a web application when the volume of users is small. When the web application is deployed for a big organization and there are millions of users hitting our websites daily, then a single server is not sufficient to handle millions of requests and responses. Let's see how a Web Farm handles this situation to process millions of requests and responses at a time.

Web Farm

A single web application will be hosted in multiple servers and the requests are handled by the Load Balancer behind it. This way of handling the requests is known as a Web Farm.

Web Farm Architecture

WebFarm1.gif

How Does It Work?

Here the client will hit the virtual IP, which is the IP address of the load balancer. The Load balancer will route the request to a web server based on the server load. There are different mechanisms on which the load balancer will redirect for e.g.:- Round Robin, NLB & etc.

Things to be Considered during Implementation

  • Validation Key Attribute - In the Web Farm, each client request will go to a different web server, so here you cannot leave the Validation Key attribute set to Auto Generate in the machine.config file. You have to set the value of a validation key to a fixed string shared by all the machines on the Web Farm. E.g.

    WebFarm2.gif
     
  • Session Maintenance - the default configuration will allow the session stored in In Process mode, but it won't work in Web Farm situation. Here the session should be stored in the Out Process mode either in State Server or in Sql Server. E.g.

    o State Server Mode

    WebFarm3.gif

    o Sql Server Mode

    WebFarm4.gif

Hope you understand the simple overview of the Web Farm way of deploying a web application in ASP.Net.


Similar Articles