Welcome to MSDN Blogs Sign in | Join | Help

Tradeoffs of IIS Hosting

Another one of those rules of thumbs that I hear often quoted but rarely demonstrated covers the performance of hosting a web service in IIS. Running a WCF service host in IIS is going to be more expensive than running that same service host in your own process. However, I've heard people quote figures of sixty, eighty, or even one hundred percent increases in throughput by self hosting. I have difficulty believing that in real practice the throughput is going to double by hosting a web service in your own process rather than in IIS. I would be less skeptical about numbers closer to twenty percent. Nevertheless, you should expect to see a difference because IIS is providing additional services for you.

In my mind, these are the most valuable services that you're trading off for that performance.

  • Application configuration, management, and diagnostics through the IIS management tools
  • Easier deployment and security setup assuming that IIS is already installed
  • Demand based activation of services
  • Health monitoring and automatic crash recovery
  • Better compatibility with ASP.NET behavior

Conversely, if you find yourself trying to add these features to a self hosted web service, then you may want to think about using IIS instead because it will probably beat your implementation on performance.

Next time: AfterInvoke Must Run

Published Tuesday, September 18, 2007 5:00 AM by Nicholas Allen
Filed under: ,

Comments

Tuesday, September 18, 2007 12:18 PM by BenK

# re: Tradeoffs of IIS Hosting

I would  not say IIS had better security configuration tham windows  services - the model is such a pain many admins ( who DONT know the product  , havent got time to learn and either push it back to the devs or end up  reducing security big time )

Dont know about easier deployment either... I have gone back to  msi installs or xcopy with a batch file for services. Ever tried to cretae a new site with FrontPage extensions ? Or used click once for your client and wanted to change it to point at a different server ?

If he site is idle for 10 min you get your app restarted.

And the nicest feature of all - if a minor worker thread throws an exception you get your app domain restarted.

There are a lot of things to worry about if you have admins experienced in IIS on Windows 2003 as app servers then its a good tool otherwise Windows Services will save you time and money IMHO.

Regards,

Ben

Tuesday, September 18, 2007 1:03 PM by William

# Which version of IIS do you use?

I'm wondering which version of IIS you are using...?

Wednesday, September 19, 2007 7:03 AM by Nicholas Allen

# re: Tradeoffs of IIS Hosting

Ben-

I consider xcopy a pretty good deployment strategy with IIS.  I think it's easier to be xcopy friendly in a hosted environment than with your own service.  There's simply less system things to set up as you don't have to worry about SCM, environment, port sharing, firewall exceptions, etc.  That's why I said assuming IIS is already installed and working.

Wednesday, September 19, 2007 7:04 AM by Nicholas Allen

# re: Tradeoffs of IIS Hosting

William-

I recommend IIS6 for most HTTP apps today (IIS7 is a requirement for non-HTTP apps).

Wednesday, September 19, 2007 7:05 AM by Nicholas Allen's Indigo Blog

# Turning Off Principal Handling

I'm setting up a custom principal for the current thread based on the received messages, but the principal

Sunday, April 20, 2008 12:30 AM by alik levin's

# WCF Security Resources

This is a digest of WCF Security resources I was collecting for some time. Drop me a comment in case

Sunday, May 11, 2008 12:24 PM by 江南白衣

# WCF Security Resources(转)

This is a digest of WCF Security resources I was collecting for some time. Drop me a comment in case it is useful.

New Comments to this post are disabled
 
Page view tracker