-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In-process hosting model coverage #8658
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,32 @@ author: rick-anderson | |
description: Discover the web servers Kestrel and HTTP.sys for ASP.NET Core. Learn how to choose a server and when to use a reverse proxy server. | ||
ms.author: tdykstra | ||
ms.custom: mvc | ||
ms.date: 09/13/2018 | ||
ms.date: 09/21/2018 | ||
uid: fundamentals/servers/index | ||
--- | ||
# Web server implementations in ASP.NET Core | ||
|
||
By [Tom Dykstra](https://github.com/tdykstra), [Steve Smith](https://ardalis.com/), [Stephen Halter](https://twitter.com/halter73), and [Chris Ross](https://github.com/Tratcher) | ||
|
||
An ASP.NET Core app runs with an in-process HTTP server implementation. The server implementation listens for HTTP requests and surfaces them to the app as sets of [request features](xref:fundamentals/request-features) composed into an [HttpContext](/dotnet/api/system.web.httpcontext). | ||
An ASP.NET Core app runs with an in-process HTTP server implementation. The server implementation listens for HTTP requests and surfaces them to the app as sets of [request features](xref:fundamentals/request-features) composed into an <xref:Microsoft.AspNetCore.Http.HttpContext>. | ||
|
||
ASP.NET Core ships two server implementations: | ||
ASP.NET Core ships three server implementations: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be done in a separate PR, but I think we should make inprocess and out of process separate pages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TL;DRI considered it, but it looks like organization, reader flow (navigation), and/or duplication will ensue and make a big mess if the hosting model scenarios are split. Full explanationI'll describe the landscape and what I ran into. In ancient times, the team set up the outline like this ...
These topics and the content they provide are NOT easy to arrange. 🐉 There be dragons here! 🐉
One thing that could be done is that Kestrel and HTTP.sys could be split between basic overview and configuration. Kestrel in the Server node could merely be an overview (like ANCM/IIS is). Kestrel in the Host-and-deploy node could hold the configuration. Same deal for HTTP.sys. That would consistently introduce server concepts in Fundamentals but configure every scenario in Host-and-deploy (i.e., Kestrel can "host," so it fits; one just doesn't "deploy" anything to it like reverse proxy scenarios). I'd also pitch making that ANCM topic in the Servers node ANCM and IIS and introduce them with greater balance + see what, if anything, of a general nature in the Host-and-deploy IIS topic can be moved there. Anyway .... that's a digression! I considered splitting ANCM in-proc and out-of-proc, but I wasn't looking at the Servers node for that split because the content is so minimal. It's just about three paragraphs of text, a list, and an image. If in-proc and out-of-proc are split out, the reader flow is ...
... mmm ... 🤔 ... not so good. The other spot to consider for a split is with the configuration in the Host-and-deploy node. There's no natural way to split the hosting models without creating one of two problems ...
If configuration is split out for the two hosting models with common config in an ANCM landing page, then the outline is ...
BUT consider ...
I didn't see a good workable outline for either the Servers node or the Host-and-deploy node. Therefore as you see, I in-lined the content in both spots. Do you have a different outline/approach in mind? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that duplicate content/ navigation flow makes the change confusing. This organization seems fine then 😄 |
||
|
||
::: moniker range=">= aspnetcore-2.2" | ||
|
||
* [Kestrel](xref:fundamentals/servers/kestrel) is the default, cross-platform HTTP server for ASP.NET Core. | ||
* `IISHttpServer` is used with the [in-process hosting model](xref:fundamentals/servers/aspnet-core-module#in-process-hosting-model) and the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) on Windows. | ||
* [HTTP.sys](xref:fundamentals/servers/httpsys) is a Windows-only HTTP server based on the [HTTP.sys kernel driver and HTTP Server API](https://msdn.microsoft.com/library/windows/desktop/aa364510.aspx). (HTTP.sys is called [WebListener](xref:fundamentals/servers/weblistener) in ASP.NET Core 1.x.) | ||
|
||
::: moniker-end | ||
|
||
::: moniker range="< aspnetcore-2.2" | ||
|
||
* [Kestrel](xref:fundamentals/servers/kestrel) is the default, cross-platform HTTP server for ASP.NET Core. | ||
* [HTTP.sys](xref:fundamentals/servers/httpsys) is a Windows-only HTTP server based on the [HTTP.sys kernel driver and HTTP Server API](https://msdn.microsoft.com/library/windows/desktop/aa364510.aspx). (HTTP.sys is called [WebListener](xref:fundamentals/servers/weblistener) in ASP.NET Core 1.x.) | ||
|
||
::: moniker-end | ||
|
||
## Kestrel | ||
|
||
Kestrel is the default web server included in ASP.NET Core project templates. | ||
|
@@ -54,7 +66,19 @@ IIS, Nginx, and Apache can't be used without Kestrel or a [custom server impleme | |
|
||
### IIS with Kestrel | ||
|
||
When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview) as a reverse proxy for ASP.NET Core, the ASP.NET Core app runs in a process separate from the IIS worker process. In the IIS process, the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) coordinates the reverse proxy relationship. The primary functions of the ASP.NET Core Module are to start the ASP.NET Core app, restart the app when it crashes, and forward HTTP traffic to the app. For more information, see [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module). | ||
::: moniker range=">= aspnetcore-2.2" | ||
|
||
When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview), the ASP.NET Core app either runs in the same process as the IIS worker process (the *in-process* hosting model) or in a process separate from the IIS worker process (the *out-of-process* hosting model). | ||
|
||
The [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) is a native IIS module that handles native IIS requests between either the in-process IIS Http Server or the out-of-process Kestrel server. For more information, see <xref:fundamentals/servers/aspnet-core-module>. | ||
|
||
::: moniker-end | ||
|
||
::: moniker range="< aspnetcore-2.2" | ||
|
||
When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview) as a reverse proxy for ASP.NET Core, the ASP.NET Core app runs in a process separate from the IIS worker process. In the IIS process, the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) coordinates the reverse proxy relationship. The primary functions of the ASP.NET Core Module are to start the ASP.NET Core app, restart the app when it crashes, and forward HTTP traffic to the app. For more information, see <xref:fundamentals/servers/aspnet-core-module>. | ||
|
||
::: moniker-end | ||
|
||
### Nginx with Kestrel | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention here that inprocess has isn't own IIS server implementation.