Web farm is scenario where the
worker processes are running on more than one machine connected together.
Open machine.config in your machine
and go down to machine key section. The Validation key and decryption key
default set to auto generate. This will be change to single key across all the
machines in the web farm.
you will get the following modes
1. Mode = inproc (non web farm but fast when
you have very few customers)
2. Mode = StateServer (for webfarm)
3. Mode = SqlServer (for webfarm)
StateServer is faster but SqlServer is more reliable and used
for mission critical applications.
bear it is based on various models
1. Round robin (all servers share load
2. NLB (economical)
3. HLB (expensive but can scale up to
4. Hybrid (of 2 and 3)
5. CLB (Component Load Balancer)
Web Garden is a scenario in which a single machine has
multiple aspnet worker process running simultaneously. To achieve this machine
should have multiple CPU and scheduling of job is done by operating system.
Setup in .NET
Open machine.config on your machine and go down to
process model section the attribute webgarden
will be set to true and cpuMask is used to indicate which CPU can run ASP.NET