ruebenramirez / blog

My blog
http://blog.ruebenramirez.com/
7 stars 0 forks source link

ASP.NET 5 on kestrel #338

Open ruebenramirez opened 8 years ago

ruebenramirez commented 8 years ago

http://tostring.it/2016/01/12/Using-Kestrel-with-ASPNET-5/

ruebenramirez commented 8 years ago

run .net apps on kestrel and reverse proxy with nginx/iis

ruebenramirez commented 8 years ago

https://docs.asp.net/en/latest/fundamentals/servers.html#kestrel

ruebenramirez commented 8 years ago

http://aspnetmonsters.com/2016/07/2016-07-17-nginx/

http://stackify.com/15-lessons-learned-while-converting-from-asp-net-to-net-core/

IIS is dead, well sort of

As part of .NET Core, Microsoft (and the community) has created a whole new web server called Kestrel. The goal behind it has been to make it as lean, mean, and fast as possible. IIS is awesome but comes with a very dated pipeline model and carries a lot of bloat and weight with it. In some benchmarks, I have seen Kestrel handle up to 20x more requests per second. Yowzers!

Kestrel is essentially part of .NET Core which makes deploying your web app as easy as deploying any console app. As matter of fact, every app in .NET Core is essentially a console app. When your ASP.NET Core app starts up, it activates the Kestrel web server, sets up the HTTP bindings, and handles everything. This is similar to how self hosted Web Api projects worked with Owin.

IIS isn’t actually dead. You can use IIS as a reverse proxy sitting in front of Kestrel to take advantage of some of it’s features that Kestrel does not have. Things like virtual hosts, logging, security, etc.

If you have ever made a self hosted web app in a Windows service or console app, it all works much differently now. You simply use Kestrel. All the self hosted packages for WebApi, SignalR and others are no longer needed. Every web app is basically self hosted now.

ruebenramirez commented 8 years ago

reverse proxying Kestrel with nginx: http://aspnetmonsters.com/2016/07/2016-07-17-nginx/