Separate application pools for ASP.net applications in IIS

后端 未结 9 868
小鲜肉
小鲜肉 2021-02-01 02:59

I\'ve read recommendations that we should create separate application pools for each asp.net application on our Win2008 server.

We have about 20 apps that would be on t

相关标签:
9条回答
  • 2021-02-01 03:42

    If your apps are stable and don't use much memory, then I would say that it's fine to put them in the same app pool. App Pools give you isolation between your applications.

    0 讨论(0)
  • 2021-02-01 03:43

    This really depends on the applications, your security model, and how much you trust the applications.

    Here are a few things that I always tell people to consider when working with application pools.

    • Use separate application pools if each application needs different access to system resources. (Can use multiple process accounts)
    • If an application is a resource hog, mission critical, or an "unknown", it is best to put it in to its own pool to isolate it from the rest of the system
    0 讨论(0)
  • 2021-02-01 03:45

    yes, it is a good idea even for 20 applications.

    1. Security. Different app pools running under different accounts.
    2. Isolation. One crashing app won't take down other apps.
    3. Memory (if you are running 32bit). Each app pool will have its own address space. Thus you can address much more memory than a maximum of approximately 2.7GB of usable space for 1 process.
    4. You may choose to periodically restart one not-so-well behaving app without affecting other applications.
    0 讨论(0)
  • 2021-02-01 03:45

    We work as outside contractors for a large corporate client. We are not on-site, so we do not have connectivity to all of their systems. Sometimes during development it is necessary for me to debug an application directly on their development servers. To do that I must be able to attach to w3wp process. When I attach and start debugging, entire process stalls, which affects all of the applications that are in the same process/application pool. By creating a dedicated application pool and moving my development there, I can easily debug without making anyone's life miserable.

    0 讨论(0)
  • 2021-02-01 03:50

    One main reason I consider when creating app pools is the process management. There are other reasons such as security etc. When an IIS-hosted application crashes it takes down its host process as well. In previous versions of IIS this meant all web activity crashed together. With app pools you can isolate your applications from one another. If one has a memory leak and keeps crashing your other apps will continue to function.

    0 讨论(0)
  • 2021-02-01 03:51

    Reposted from ServerFault, "Why add additional application pools in IIS?"

    • AppPools can run as different identities, so you can restrict permissions this way.
    • You can assign a different identity to each app pool so that when you run task manager, you know which w3wp.exe is which.
    • You can recycle/restart one app pool without affecting the sites that are running in different app pools.
    • If you have a website that has a memory leak or generally misbehaves, you can place it in an app pool so it doesn't affect the other web sites
    • If you have a website that is very CPU-intensive (like resizing photos, for instance), you can place it in its own app pool and throttle its CPU utilization
    • If you have multiple websites that each have their own SQL database, you can use active directory authentication instead of storing usernames/passwords in web.config.
    0 讨论(0)
提交回复
热议问题