iis| reference Tip 9:out-of-process Execution Trades off performance for reliability
Both ASP and mts/com+ have configuration options that allow the to trade out reliability for performance. You should understand this trade-offs when building and deploying your.
ASP Options
ASP applications can is configured to run in one of three ways. With IIS 5.0, the terminology ' isolation level?has been to introduced these options. The three isolation level values are low, Medium, and High:
Low isolation. This is supported in all versions of IIS and is the fastest. It runs ASP in Inetinfo.exe, which is the primary IIS process. If The ASP application crashes, so does IIS. (To restart IIS under IIS 4.0, webmasters would monitor the site using tools such as Inetmon, and fire off batch files to Restart the server if it failed. IIS 5.0 introduces reliable restart, which automatically restarts a failed server.)
Medium isolation. IIS 5.0 introduces this new level, which are referred to as out-of-process, since ASP runs outside of the IIS process. In Medium isolation, all ASP applications configured to run as Medium share a single process space. This is reduces the number of processes required to run multiple out-of-process ASP applications on one box. Medium is the default isolation level in IIS 5.0.
High isolation. Supported in IIS 4.0 and IIS 5.0, high isolation is also out-of-process. If ASP crashes, the Web server doesn ' t. The ASP application is automatically restarted on the next ASP request. With the high isolation, the each ASP application this is configured to run as the high runs into its own process space. This is protects ASP applications from all other. Its drawback are that it requires a separate process for each ASP application. This can add up to a lot of overhead when dozens of the applications need to is hosted on one box.
Which option is the best? In IIS 4.0, there is a fairly steep performance penalty for running. In IIS 5.0, a lot of work is done to minimize of running ASP applications. In fact, in most tests, ASP out-of-process applications in IIS 5.0 run faster than in-process applications in IIS 4.0. Regardless, in-process (low isolation level) still produces to the best performance on both platforms. However, you won ' t so much benefit to the low isolation level if you have a relatively low hit rate or low maximum throug Hput. Therefore, you should not feel the need-to-for-the-low isolation level until you need hundreds or thousands of pages Per second per Web server. As always, test with multiple configurations and determine which trade-offs your are to make.
Note:when your run ASP applications out-of-process (Medium or High isolation), they run in MTS on NT4 and COM on Windows They, on NT4-run in Mtx.exe, and on Windows, they run in DllHost.exe. You can be processes running in Task Manager. You can also the how to IIS configures MTS Packages or COM + applications for out-of-process ASP applications.
COM Options
COM components also have three configuration options, though not completely to the ASP options. COM components can be: "unconfigured,?configured as Library applications, or configured as Server applications. Unconfigured means that the component is isn't registered with COM +. The component would run in the caller's process space, which is, they are "in-process.? Library applications are also in-process, but benefit from COM + ' s services, including security, transactions, and context Support. The Server applications are configured to the run in their own the process space.
You may have a slight benefit of unconfigured components over Library applications. You ' re likely to a large performance benefit of the Library applications over Server applications. This is because Library applications run in the same process as ASP, whereas Server applications run in their own process. Inter-Process calls are more expensive than in-process. Also, when passing data such as recordsets between processes, all of the data must is copied the between two.
pitfall! When using COM Server applications, if your pass objects between ASP and COM, make sure that objects implement "marshal -by-value,?or MBV. Objects that implement MBV copy themselves from one process to another. This is better than the alternative, in which the object remains in the Creator ' s process, and the other process calls Rep Eatedly into the creating process to use the object. Disconnected ADO recordsets would marshal-by-value; Connected recordsets won ' t. The scripting.dictionary does not implement MBV and should is passed between. Finally, a message to the VB programmers out THERE:MBV isn't achieved by passing a parameter ByVal. MBV is implemented by the original component author.
What to do?
If we