-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enable HTTP/3 support by default #73153
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsI'm surprised this wasn't done a while ago. Is there a reason for it?
|
ps We appear to lack tests for both HTTP/2 and HTTP/3 that test toggling the switch and validating it behaves as expected. We should add those separately. |
What is it going to do to single file deployments ( |
Even with HTTP/3 support enabled by default, it still then checks whether QUIC is supported: runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs Lines 135 to 138 in 508fef5
which is only set to true after successfully loading msquic:
I read that as meaning if msquic.dll isn't available, HTTP/3 simply won't be available even with this toggled. Does that address your concerns? Or are you asking whether there's additional deployment work that needs to be done to ensure msquic.dll is deployed? |
It addressed my top concern. The silent behavior changes when going from F5 to single file publish is still a problem. In general, we try to avoid behavior changes like this, and warn you via analyzers when it is possible to avoid them. We can wait and see whether this one will be a problem in practice. The proper solution for the single file issue would be to start statically linking msquic copy into the single file targets. cc @dotnet/ilc-contrib |
AFAIK we will still ship it is preview feature... and I think we want explicit enabling. It may be different than HTTP3SUPPORT. |
We do?? QUIC is in preview in .NET 7, but I thought we'd all agreed HTTP/3 was fully supported. @karelz? |
Honestly the integration of What is pretty weird is that we include the .dll in self-contained, but it effectively disappears for single-file. @VSadov - who might know what's going on there. For example the native dependencies of WPF behave the right way - they are left next to the exe. If we ship this way - if there's an API which enables QUIC or which requires QUIC it should be marked it with |
Quic is used for http (HttpClient) and everything built on top of it. It is not practical to mark this whole surface like that. |
We assume that all inbox netcoreapp native dependencies have been linked into single file host and thus it is safe to exclude them during publish. msquic violates this assumption. |
I think you may be right @stephentoub. I'll check with @karelz more on the single-file: This gets more tricky as we don't (for security reasons) ship libmsquic.[so|dylib] on Unix platforms. HTTP/3 will light-up if given system has compatible version of msquic available. |
Light-up based on the OS features is ok. We have number of places where we do that, e.g. for globalization. We are concerned about behavior differences between |
I agree, what I meant is if there's an API which is Quic specific (like EnableQuic or something along those lines), then that should be annotated. |
There isn't. There's an IsSupported get-only property that reflects whether an underlying QUIC implementation is available. |
Triage:
|
Just a note to all this, with H/3 enabled by default, you might get an upgrade via Alt-Svc and switch to H/3 behind the scenes. That was the main reason we put it behind app switch. If we're fine with this, let's proceed, I have no qualms about this change. |
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.
LGTM
If we leave it disabled via that switch by default, we're effectively saying HTTP/3 isn't supported and very few folks are going to use it. Presumably that's not our intent? If we're concerned about the Alt-Svc upgrade auto-upgrading 1.1 or 2.0 requests to 3.0, then that should presumably be considered as a separate mechanism to opt-in/out that specifically. |
We do have one, you have to either request 3.0 version or enable upgrade via EDIT: and default is |
Then I don't understand the stated concern "with H/3 enabled by default, you might get an upgrade via Alt-Svc and switch to H/3 behind the scenes"...? This PR isn't changing the default 1.1 in HttpRequestMessage, it's not changing the default RequestVersionOrLower on HttpClient, etc.; it's just changing whether HTTP/3 can be used at all by default. |
The only combination I can think of, that this would change behavior, is using As I said before, I'm not against this change, I just wanted to add one of the reasons we discussed when adding this switch originally. |
I see. If you've said you're ok with the request version or higher, congratulations, we're honoring your request :) This is the nature of HttpVersionPolicy, and if memory serves, this was all discussed at the time that unbounded upwards policy option was added. |
I'm surprised this wasn't done a while ago. Is there a reason for it?
Fixes #73140