Web gardens... are they good or bad or what?

Are there any downsides to giving Application Pools multiple Worker Processes in IIS? They seem really easy to enable and (almost) everything I’ve read seems to suggest they’re good... so why doesn’t IIS give each App Pool 10+ Worker Processes? There must be some detrimental effects, right?


Solution 1:

You're right to be suspicious. Web Gardens having no downside is a massive myth, they can cause you no end of problems, but many people still don't even know when they should be used.

According to Chris Adams (from the IIS team) there is only a single reason you would want to use a Web Garden: To give applications, that are not CPU-bound but execute long running requests, the ability to scale and not use up all threads available in the worker process. There are lots of reasons why they can be bad, however, it is a common misconception that there's no downside.

They increase system overheads (they don't share cache), they don't share sessions (the user can lose their session if they're switched over to another process), InProc can get messed up. In short, they're actually, more often than not, a lot of trouble, and you shouldn't be using one without good reason.

Read Chris's full explanation: http://blogs.iis.net/chrisad/archive/2006/07/14/1342059.aspx

Further reading: http://weblogs.asp.net/owscott/why-you-shouldn-t-use-web-gardens-in-iis-week-24