dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.44k stars 25.33k forks source link

HTTP2 scenario coverage #7161

Closed Tratcher closed 5 years ago

Tratcher commented 6 years ago

This is for tracking notes about HTTP/2 related features in 2.2. Most of the work will be related to Kestrel, but HttpSys and IIS In-Proc will also get a few notes.

HTTP/2 support is limited by TLS ALPN availability on various platforms.

Kestrel

Not ASP.NET Core version specific, only constrained by the OS:

HttpSysServer

IIS In proc

IIS Out of proc

Tratcher commented 5 years ago

New kestrel APIs:

guardrex commented 5 years ago

@Tratcher

A Tale of Two Options

  1. Split HTTP/2 coverage across the server topics, where the content is maintained within the existing topics.
  2. Provide a dedicated HTTP/2 topic that would appear in the Servers node of the TOC. The topic would break down along the lines of the outline you provided in the OP :point_up:.

TOC and topic proposal (for Option 2):

Title: HTTP/2 support in ASP.NET Core Description: Discover how HTTP/2, the latest HTTP network protocol, is supported in ASP.NET Core. Location: fundamentals\servers\http2.md UID: fundamentals/servers/http2

:point_right: Which way would u like to go?

Tratcher commented 5 years ago

Why not both? 😁

There won't be a lot of common HTTP/2 content so the first option should be adequate. Having the second page too that gives you an overview of all your options would be a bonus.

guardrex commented 5 years ago

Let's go ahead with Option 1. I'm just concerned about the size of the Kestrel and IIS topics (and to some extent versioning hell 😈 in the Kestrel topic). This would have been an opportunity to (mostly) cleanly break out a subject into its own topic. However, it probably is less work and a cost savings to roll it into the existing topics.

Side-note on the Kestrel topic: I'm not happy with the heading/section structure of the topic, especially for the config/options subject matter, given how much content was placed into the topic for 2.0 and 2.1. Without good section support, the topic has become a kind of word wall/code wall and the topic's internal TOC is just about useless. ☚ī¸ I might do some work on this for the PR, but I've opened #8496 to make sure it gets addressed later.

RE: Both

Wouldn't that be duplicate coverage? I'm looking at the backlog, too. 🏃 😅 Might be best to put the call for a standalone topic on a new issue.

Tratcher commented 5 years ago

The part you don't get with option 1 is the high level side-by-side comparison. E.g. which server should I use? Option 2 wouldn't need to include the extra details like https://github.com/aspnet/Docs/issues/7161#issuecomment-420324094.

When we get around to server push then we'll want a shared HTTP/2 doc because that would be a common API across multiple servers. https://github.com/aspnet/Home/issues/2727. That likely won't happen until 3.0 though.

guardrex commented 5 years ago

the high level side-by-side comparison

We could (for the time being until 3.0) place that content into the Servers landing page: https://docs.microsoft.com/aspnet/core/fundamentals/servers/

... and then link back out to it from the individual topics. Later, that content could move to the dedicated HTTP/2 topic.

guardrex commented 5 years ago

... or bite the bullet and go ahead and create the dedicated HTTP/2 topic now with it. That wouldn't take long if a basic set of guiding principles for server selection is provided there. (No duplication of what's going into the individual topics.)

Tratcher commented 5 years ago

The server landing page would be a good start.

guardrex commented 5 years ago

ok

guardrex commented 5 years ago

@Tratcher When you say "high level side-by-side comparison," do you mean that you want the content rolled into each server section of the Servers landing page, or you you want one HTTP/2 support section laid out similar to the way you have them outlined in the OP :point_up:?

https://docs.microsoft.com/aspnet/core/fundamentals/servers/

Tratcher commented 5 years ago

One HTTP/2 section like the OP. There are enough caveats around versions that it's nice to see side by side.

guardrex commented 5 years ago

@Tratcher Your OP suggests that the IIS in-process deployment scenario relies on the Kestrel limits+options ... is that correct?

... similar question on HTTP.sys. I don't see new props in the HttpSysOptions, so is it configured entirely thru registry settings? I don't see a topic anywhere that explains HTTP/2 config for HTTP.sys; so if it is configured via HTTP.sys, I don't know what to link to or examine for more information.

Tratcher commented 5 years ago

@Tratcher Your OP suggests that the IIS in-process deployment scenario relies on the Kestrel limits+options ... is that correct?

No, IIS in-process is completely independent of Kestrel. Its HTTP/2 configuration/limitations stem from Http.Sys.

For IIS/HttpSysServer/Http.Sys HTTP/2 was not initially configurable, it was automatically on if the base requirements were met (TLS, ALPN, Win10). The Http.Sys team is only now retroactively adding APIs and config flags to disable it. One is netsh http add sslcert [disablehttp2=enable|disable]. @shirhatti do you have any doc links for this feature in IIS?

Tratcher commented 5 years ago

For now there are no new APIs for HttpSysServer or IIS, only HttpRequest.Protocol will indicate if HTTP/2 was negotiated.

guardrex commented 5 years ago

IIS in-process is completely independent of Kestrel

Independent of Kestrel but not independent of the TFM/app framework [i.e., ".NET Core (in proc restriction)"] ... that's why I thought they might be connected.

One approach we could take: I can go ahead with what I have (it's not very much text to review), and you can correct it and indicate what it's missing on review.

RE: HTTP.sys

disablehttp2 hasn't reached the command doc yet ( https://docs.microsoft.com/windows/desktop/http/add-sslcert ).

guardrex commented 5 years ago

Another slightly confusing point: This issue and your OP say for 2.2, but your outline states 2.1. Not sure how to version it. However, we can fix that stuff on review easily enough.

[EDIT] ... and I'm noting on the server-side: WS2016 or better (Win10 equivalent) ... and for IIS, IIS 10 or better.

Tratcher commented 5 years ago

Edited to clarify 2.2 for Kestrel and no version for the others.

The HttpSysServer/IIS/Http.Sys stuff isn't dependent on the version of ASP.NET Core since the functionality is all provided by the OS. The only change to these for 2.2 is making HttpRequest.Protocol correctly report HTTP/2.