Friday, July 4, 2014

Difference Between WebFarm and Web Garden

Web Farm: It is a multi-server scenario and we can keep servers separately. If the load on one server is in excess then the other servers step in to bear the strength. Server Load is based on various following models.
1. Round Robin. (All servers share load equally)
2. Network Load Balancer (economical)
3. HLB (expensive but can scale up to 8192 servers)
4. Hybrid (2 and 3).
5. CLB (Component load balancer).
We can implement web farms in .NET. Open web.config file and add mode options.
i) if mode=inproc (non web farm but fast when you have very few customers).
ii) if mode=StateServer (for web farm)
iii) if mode=SqlServer (for web farm)
Whether to use option (ii) or (iii) depends on situation. StateServer is faster but SqlServer is more reliable and used for critical applications.

Web farms means many Application of Multiple server on different location on the world. for example: www.yahoo.in, www.yahoo.uk



Web Garden:
WebGarden is the scenario in which a single physical machine is used for multiple worker processes running simultaneously. Each worker process is responsible for handling all kinds of requests, responses, session data, cache data, etc. and all the ASP.NET functionality inside IIS runs under the scope of the worker process. By default, every application pool contains a single worker process. A WebSite containing multiple worker processes is called a WebGarden.
Put simply – if you increase the number of worker processes for a given ApplicationPool you get a WebGarden.

Generally it is a multi-processor setup i.e. in case of a web garden we have a one server having more than one processor. You can use web gardens in .Net as: Open web.config file and add webGarden = true in process model tag.

If you enable Web-garden mode by setting the webGarden attribute to true in the processModel element of the application's Web.config file, do not use InProc session state mode. If you do, data loss can occur if different requests for the same session are served by different worker processes.

More than one worker process is a "web garden." In-process session state will not work correctly. You'll need to use either a single worker process for your web app, or use a session state server, or SQL Server for session state.

if we configure an ASP.Net application pool with more than one worker process (web garden), they do not share session object, application object or ASP.net intrinsic cache object. If I want all these processes to share one single cache, is it possible to configure at all some way or the other?

Web Gardens means many application of single server.
for example www.mail.yahoo.com, www.chat.yahoo.com

No comments:

Followers

Link