Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawback to creating a separate IIS application pool for each website / application

Currently, on our production IIS web farm, we host about 15 applications in a single App Pool (Default App Pool). There are two websites and about 13 virtual directories.

A colleague has recommended that we change our IIS configuration so each application is a separate App Pool (with identical settings).

Is there any drawback or potential issues to doing this? Is it possible that ASP.NET applications could have been built with the requirements that they are all within the same App Pool?

like image 690
frankadelic Avatar asked Jan 05 '10 20:01

frankadelic


People also ask

Can one web application have multiple application pool?

You can have multiple websites running under a single application pool, but you can not have a single website running in multiple application pools.

How many application domain can be linked to a website in IIS?

One IIS server may have multiple application pools. One web application binds to one application pool. One application pool may have more than one worker process (when Web Garden is enable). One worker process can have multiple app domains.

What was the purpose in creating the application pool?

Because application pools allow a set of Web applications to share one or more similarly configured worker processes, they provide a convenient way to isolate a set of Web applications from other Web applications on the server computer.

Why would you need more than one application pool in IIS?

When using multiple application pools, you can use different Windows accounts on each application pool. This can not only enhance security, but it can also help when trying to track down performance issues. Pros: Your sites will be isolated from each other.


1 Answers

I doubt they were built with that requirement in mind unless they rely on shared memory for some reason. Otherwise, for the scenario described...

Pros (of separate app pool):

  • process isolation (one crash doesn't bring down the others)
  • less resource contention
  • more memory available for in-proc sessions, cache

Cons:

  • more processes, memory, and context switchces
  • shared cache scenarios no longer available*

*I'm not sure how .NET segregates websites in the same app pool as it pertains to the HttpRuntime cache; for Sessions, "application uniqueness" (1) is determined by:

  • The physical path on all servers (case sensitive)
  • The machine key
  • The instance id
  • The approot

This is what prevents you from sharing sessions across different websites in the same app pool, for instance; but it might be easier to share cache data though. By and large, the discussion overlaps with the pros/cons of deploying a Web Garden for a specific application (2).

1)
http://support.microsoft.com/?id=325056
http://rodiniz.spaces.live.com/blog/cns!F2A56AAF89A7E43A!658.entry

2)
http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/

like image 146
Nariman Avatar answered Nov 09 '22 05:11

Nariman