Distinction between Kestrel and Katana

asp.netasp.net MvcOwinKatana

asp.net Problem Overview


My understanding is currently you can self host WebAPI using Katana, and MVC will have this capability in a future version. Essentially Katana will be a hosting option available to both MVC and WebAPI.

Kestrel has entered the picture, and I see a few MS employees blogging about it demonstrating hosting ASP.NET vNext on Linux.

My understanding is that both Kestrel and Katana implement the OWIN pipeline.

From there it is all a bit fuzzy. I ask myself, why has Kestrel entered the picture, when it seems Katana could serve the same purpose if you compiled it with mono and made some efforts to make it cross platform compatible(perhaps easier said than done).

Do Kestrel and Katana serve the same purpose? Or is one specialized in some way that the other is not?

Will Kestrel eventually be a viable choice for Windows deployments? Or will it be specialized for non-Windows environments and Katana still the choice for Windows?

I recognize that I'm possibly asking for an apple to oranges comparison due to my lack of knowledge of Katana/Kestrel, but if the answer is "Oranges have more of an acidic taste than apples" then that IMO is a perfectly valid answer.

asp.net Solutions


Solution 1 - asp.net

Katana is Microsoft's OWIN implementation and also includes some middleware components for security/authentication, serving static files, and a few other things.

Kestrel is Microsoft's cross-platform development web server that can be used with ASP.NET 5.

ASP.NET 5 does not implement OWIN, but has a "bridge" to enable OWIN components to be used in ASP.NET 5 applications, including running on Kestrel.

Solution 2 - asp.net

I still don't get a clear picture after reading other answers under this question, so I made some research and here's my conclusion:

  • OWIN is a specification, which defines an programming interface between a web server(like Kestrel and the ones provided by Katana) and a web application(the code by you).
  • Kestrel comes from ASP.NET Core. It's a OWIN compatible web server.
  • Katana comes from ASP.NET 4.X. It's a set of things of Microsoft's OWIN implementation, including OWIN servers.

Last but not least:

  • ASP.NET 5 is dead and replaced by ASP.NET Core. So don't mention it any more.

    (Update at 2019/06/28: "Today, we’re announcing that the next release after .NET Core 3.0 will be .NET 5" - BY MS https://devblogs.microsoft.com/dotnet/introducing-net-5/. That means there will be ASP.Net 5, which is in fact the next generation of ASP.Net Core)

  • OWIN is the key/essential thing in both ASP.NET 4.X and ASP.NET Core.

For more, you may read https://www.quora.com/Is-ASP-NET-Core-a-replacement-for-OWIN-Katana

Solution 3 - asp.net

May be an old question, but since a quick google search led me here i think no one else asked a similar question.

Quoting ASP.NET 5 Documentation:

>Kestrel > >Kestrel is a cross-platform web server based on libuv, a cross-platform asynchronous I/O library. Kestrel is open-source, and you can view the Kestrel source on GitHub. You add support for Kestrel by including “Kestrel” in your project’s dependencies listed in project.json. > > Choosing a server > > If you intend to deploy your application on a Windows server, you should run IIS as a reverse proxy server that manages and proxies requests to Kestrel. If deploying on Linux, you should run a comparable reverse proxy server such as Apache or Nginx to proxy requests to Kestrel. > >For self-hosting scenarios, such as running in Service Fabric, we recommend using Kestrel without IIS. However, if you require Windows Authentication in a self-hosting scenario, you should choose WebListener.

So, my understanding is: If Kestrel was only a development server, its not anymore and is somehow replacing Katana and OWIN.

Solution 4 - asp.net

"Project Katana" includes Microsoft adding support to IIS for OWIN, creating OwinHost.exe, and providing libraries to allow application to interface with a self hosting WebAPI. Some of these libraries such as Microsoft.Owin.Security are used by ASP.NET MVC 5 (not ASP.NET Core) to wire up identity/authentication through OWIN, but MVC 5 does not support self hosting(although it is possible using other tools). The SelfHosting library is only intended for WebAPI.

So "Katana" is a broad term referring to both host implementations as well as web application support for OWIN: "These components include both infrastructure components, such as hosts and servers, as well as functional components, such as authentication components and bindings to frameworks such as SignalR and ASP.NET Web API."

You may see phrases like "Migrate from Katana to ASP.NET Core" which refere to the web application side. Meaning abandoning the Microsoft.Owin libraries, and using ASP.NET Core which has full OWIN support built in without the need for additional libraries. Or you may see a similar phrase which means moving off of a Katana host to another host such as Kestrel. Unfortunately the term is used to refere to either side of the implementation with little clarification, and you'll have to pay attention to the context of the discussion.

Kestrel is just a host implementation. Its goal is to provide OWIN hosting support across many platforms. It is more lightweight, and not as full featured or mature as IIS. It is recommended to use it behind a reverse proxy of a more secure and rebust web server such as IIS, Apache, nginx, or other. Kestrel is what Microsoft's current documentation recommends as a host to deploy ASP.NET Core web application's on other platforms such as Linux.

If you create an ASP.Net Core project, then Kestrel is currently included by default. It is supported on the same platforms that ASP.NET Core supports.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAaronLSView Question on Stackoverflow
Solution 1 - asp.netEilonView Answer on Stackoverflow
Solution 2 - asp.netRobertView Answer on Stackoverflow
Solution 3 - asp.netrafaelvasccView Answer on Stackoverflow
Solution 4 - asp.netAaronLSView Answer on Stackoverflow