Difference Between Web Farm and Web Garden

Abhijit Jana
Posted by in ASP.NET category on for Beginner level | Views : 152638 red flag
Rating: 4.2 out of 5  
 5 vote(s)

This article describe basic overview of WebFarm and WebGarden for ASP.NET Site Deployment on IIS
Introduction

Web Farms and Web Garden are very common terminology for any production deployment. Though these terms looks same but the things are totally different. Many beginners very confused with these two terms. Here I am giving the basic difference between the Web Farm and Web Garden.

Web Farm

After developing our asp.net web application we host it on IIS Server.  Now one standalone server is sufficient to process ASP.NET Request and response for a small web sites but when the site comes for big organization where there an millions of daily user hits then we need to host the sites on multiple Server. This is called web farms. Where single site hosted on multiple IIS Server and they are  running behind the Load Balancer.

Fig : General Web Farm Architecture

This is the most common scenarios for any web based production environment. Where Client will hit an Virtual IP ( vIP) . Which is the IP address of Load Balancer. When Load balancer received the request based on the server load it will redirect the request to particular Server.

Web Garden

All IIS Request process by worker process ( w3wp.exe). By default each and every application pool contain single worker process. But An application pool with multiple worker process is called Web Garden.   Many worker processes with same Application Pool can sometimes provide better throughput performance and application response time. And Each Worker Process Should have there own Thread and Own Memory space.

There are some Certain Restriction to use Web Garden with your web application. If we use Session Mode to "in proc", our application will not work correctly because session will be handled by different Worker Process. For Avoid this Type of problem we should have to use Session Mode "out proc" and we can use "Session State Server" or "SQL-Server Session State".

How To Configure Web Garden?

Right Click on Application Pool > Properties > GoTo Performance Tab
In bottom Group Section  Increase the Worker Process Count.

Further Study

1. http://www.codeproject.com/KB/aspnet/ExploringIIS.aspx

Page copy protected against web site content infringement by Copyscape

About the Author

Abhijit Jana
Full Name: Abhijit Jana
Member Level: Bronze
Member Status: Member,MVP
Member Since: 12/24/2008 11:28:35 PM
Country: India
Cheers ! Abhijit
http://abhijitjana.net
He has done Master Degree in Computer Application and currently working as a Sr. S/W Developer in a US based MNC and having more than 3 years exp. He has worked with all the .NET framework and good exposer in Web and Windows based development using Microsoft Technology . Currently he working with C# 3.5, ASP.NET 3.5, Enterprise Library 4.1 and SDL Tridion also Exploring VS 2010 with .NET 4.0.

Login to vote for this post.

Comments or Responses

Posted by: Raja on: 11/24/2009
Short but very unique and informative. Thank you very much Abhijit.

Keep writing !

Login to post response

Comment using Facebook(Author doesn't get notification)