Web Farm :
This is the case, where you have only one web server and multiple clients requesting for the resources from the same server. But when there is huge numbers of incoming traffic for your web sites, one standalone server is not sufficient to process the request. You may need to use multiple server to host the application and divide the traffic among them. This is called “Web Farm” . So when you are hosting your single web site on multiple web server over load balancer called “Web Farm”. Below diagram showing the over all representation of Web Farms.In general web farm architecture, a single application is hosted on multiple IIS Server and those are connected with the VIP ( Virtual IP ) with Load Balancer. Load Balancer IP’s exposed to external worlds to access. So whenever some request will come to server from clients, it will first hit the Load Balancer, then based on the traffic on each server LB distributed the request to corresponding web server. These web server may share same DB server or may be they can use replicated server in the back end.
So, In a single statement, When we host a web application over multiple web server to distributed the load among them is called Web Farm.
Web Garden :
Before understand "Web Gardgen", Let us understand "worker process" & "Application Pool"
ASP.Net functionality inside IIS runs under the scope of worker process. Worker Process is responsible for handling all kind of request, response, session data, cache data. Application Pool is the container of worker process. Application pools is used to separate sets of IIS worker processes and enables a better security, reliability and availability for any web application.
Now, by default each and every Application pool contains a single worker process. Application which contains the multiple worker process called "Web Garden".
So, a Web application hosted on multiple server and access based on the load on servers is called Web Farms and When a single Application pool contain multiple Worker process is called web garden.
Advantages of Web Farm and Web Garden :
Advantages of Web Farm
- It provides high availability. If any of the server in the farm goes down, Load balancer can redirects the requests to other servers.
- Provides high performance response for client requests.
- Provides Better scalability of the web application and reduce the failure of application.
- Session and other resource can be stored in a centralized location to access by the all server.
- provides better application availability by sharing request between multiple worker process.
- Web garden use processor affinity where application can swapped out based on preference and tag setting.
- Less consumption of physical space for web garden configuration.
