Why You Shouldn’t Use Web Gardens in IIS-Week 24

IIS’s Web Gardens are a highly misunderstood feature in IIS ever since they were first introduced in IIS 6.0. This week’s lesson discusses why it’s rarely worth using Web Gardens and why using them is often detrimental to your server’s performance. This lesson is a type of anti-pattern on what to avoid, while also covering good theory and pointers to better practices that can be used instead.

This is week 24 of a 52 week series for the Web Pro. This week’s topic is foundational in properly understanding the security sandbox boundaries in IIS.  Past and future videos can be found here: http://dotnetslackers.com/projects/LearnIIS7/

You can find this week’s video here.

2 Comments

  • Thank you for doing these great videos.

    I know this is a rather old post, but was wondering if you have changed your mind about web gardens or have an opinion on the optimal use for them.

    My situation is we have one machine that host a web service that get sent small burst of data (stateless) via post, about 50 a second at peak. With 1 worker process there is a HUGE backup for these request to get processed. CPU/Memory usage was low (4%/40%). Going against some of the rules I've read about CPUs and Worker Processes I've jacked this up to 12 worker processes and now the CPU and memory usage is higher (36%/77%), but acceptable since this is all this box does.

    Would this be the right usage, or is there another strategy I should be looking at?

    Again, thank you.

    Jason

  • Hi Jason,

    My thoughts remain the same, but I'm not completely opposed to web gardens. Your situation sounds like it would temporarily benefit from a web garden because there is something blocking. If you aren't using session state in-process than the impact of web gardens are nil or minimal, so I would say to go for it.

    However, blocking issues like that suggest that there is something that could be improved. COM objects are a common culprit. The problem with a blocking item is that it won't scale. Eventually you may have enough load that will be a problem even with many more worker processes, or the blocking item may run extra long, causing some of the requests to fail.

    So I would say that the best solution is to track down what is causing the blocking issues, then you should be able to get 100% out of the CPU with a single worker process. However, in the meantime a web garden is a good temporary solution.

Comments have been disabled for this content.