Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distinction between Kestrel and Katana

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.

like image 438
AaronLS Avatar asked Dec 31 '14 23:12

AaronLS


People also ask

What is Microsoft Katana?

Katana is a flexible set of components for building and hosting Open Web Interface for . NET (OWIN)-based web apps. New development should use ASP.NET Core. The Microsoft.

What is OWIN in ASP.NET Core?

OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses. ASP.NET Core applications and middleware can interoperate with OWIN-based applications, servers, and middleware.


3 Answers

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.

like image 146
Eilon Avatar answered Oct 08 '22 15:10

Eilon


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

like image 23
Robert Avatar answered Oct 08 '22 14:10

Robert


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.

like image 15
rafaelvascc Avatar answered Oct 08 '22 14:10

rafaelvascc