I am using asp.net 4.0 with C# and my application is hosted on web farm which consist 2 sever with load balancer now I want to create web garden on each server to assign multiple process for application (To enhance application perfomance). Is it possible to create web garden inside webfarm.If yes then what changes I need to do, alll asp.net controls and state mgmtlike session application, caching woking fine or i need to do some setting for that Please suggest.
Thanks
From the moment that you have web farm, the web garden must work with out any issue.
Web Farm is when you add 2 or more computers to run actually the same content.
Web garder is when you add on one computer 2 or more working process for the same application.
What you need to take care is the synchronization of the data. The Data must be the same on both computers, and on every working process. From the moment that you have all ready web farm I suppose that you use session on database that is common to both computers, so the same session is going to be used on web garden.
Also I suppose that if you use database, this is shared for the 2 computers, and you take care with the synchronization when you write data.
The synhronization is done inside a thread using the lock, inside a web garden using the mutex, and inside the web farm + web garden using a common mutex file name among computers, or some part of the database.
If you not write any data, then you do not need other synchronization other than the common session database. All the extra thinks that you have to take care here is the common data.
Session on InProc
If you use Inproc session then the session is keeped on the memory on each computer.
Now if the load balance take care to send all the calls from the same user to the same computer it will work.
If not load balance take case to send all calls from the same user to the same computer then as you understand the same user can possible have two different session data, one on each computer, and because the session is keeped on same cookie name you probably have a mess with the session.