It is pretty clear that if you are developing a web UI for a desktop/server application owin/nancy hosting is a logical choice. It is also clear that for high traffic web site that would not be sufficient, but IIS hosting is preferable.
I would like to know what are the practical considerations / limitations when using self-hosted web app. Let's assume that we do not need any IIS provided functional features such as, say gzip compression. From pure performance point of view, at which load level (approximately) self-hosting starts breaking down, and why? Does IIS do thread scheduling more efficiently then owin host?
Open Web Interface for . NET (OWIN) defines an abstraction between . NET web servers and web applications. OWIN decouples the web application from the server, which makes OWIN ideal for self-hosting a web application in your own process, outside of IIS.
In web applications and cloud services, self-hosting refers to software installed and maintained by the user on a generic web hosting service, such as a VPS. The benefit of self-hosting is that the user has complete control over their data, at a potentially lower monthly cost.
Self-hosting is the practice of running and maintaining a website or service using a private web server, instead of using a service outside of someone's own control. For example, someone wishing to write a blog could use hosted blog services.
There is no official documentation by Microsoft answering this question. Nevertheless you can find some comparisons through google like this. From my personal experience, self hosted applications should and are performing better than IIS just because the last one creates much overhead for the features it's providing, while self hosted is based on pure TCP connections with much less steps before it's getting to your actual controller.
As Evk already mentioned in comments, people picking up IIS just because they simply need some features it's providing. It's also a case when people don't want to manage application full lifecycle (along with self hosted you will need to create windows service or run it manually each time), IIS simply providing you a possibility set it up once and whenever your machine is running - webpage is available, as simple as that.
I have never heard any concerns about self hosted performance even though we built really huge systems based on that. Hope that helps!
P. S. I wouldn't really expect any link to Microsoft's comparison page as it would be pretty surprising they're telling that IIS (their product) worse than self hosted from performance perspective, telling to not use it for highly loaded apps. IIS is advertised as solution for enterprise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With