-
Notifications
You must be signed in to change notification settings - Fork 50
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
Connection sharing/pooling #128
Comments
https://fetch.spec.whatwg.org/#connections has some logic about connection, so we need to talk with @annevk. |
Thanks for flagging me, I think that the right thing to do would be to integrate with that section in Fetch and given the questions raised in OP that may or may not need some changes to better accommodate your requirements. (There are some risks with giving pages detailed control over connections as they can use the user agent/OS global limit as communication channel, but I'm not entirely sure if this API would make the status quo worse.) |
There is some complexity here that goes beyond what is in Fetch. For example, Http3Transport requires support for HTTP/3 Datagrams, whereas a connection set up to handle a conventional HTTP/3 Request/Response will not. This means that WebTransport cannot necessarily reuse an existing HTTP/3 connection to the same Origin if that connection was not negotiated for use with WebTransport. |
And the other way around? In any event, it seems feasible to add conditions as an optional parameter to "obtain a connection" or something equivalent. It seems nice to keep establishing connections somewhat centralized so any security/privacy considerations that end up changing how they are allocated (such as the ongoing state partitioning effort) end up affecting all. (There might still be work to do here when it comes to WebRTC, not sure.) |
This issue needs to take into account whether the client has disabled pooling and whether the origin allows pooling. |
@jan-ivar Do we still believe that this issue is "ready for PR"? Using Fetch as a model, it wouldn't seem to difficult to come up with a PR, but wanted to check if that is everyone's understanding. |
Hmm, looks like I labeled it and assigned it to @yutakahirano at the second TPAC meeting. Unfortunately, I don't recall the reason, and now wish I'd left a comment. We can go back and look at the meeting I suppose. Does anyone else remember? |
At the time, pooling didn't seem particularly controversial. Some concerns were subsequently raised at the IETF WebTransport WG interim meeting (e.g. enabling control of pooling in the API as well as on the server). But I think it's still possible to compose a PR although it might take a bit of back and forth before we're ready to merge it. |
Sorry for the long silence. I'm planning something like the following:
Do they make sense? |
I think you also need to pass a parameter to "obtain a connection" to essentially demand a "webtransport ready" connection (in which case you might not have to define it in WebTransport?). |
@annevk I am not sure whether a QUIC connection established for use with WebTransport can be reused for HTTP/3 Request/Response. While negotiating support for HTTP/3 datagrams would not preclude this, HTTP/3 Request/Response and WebTransport would need to cooperate in allocation and use of stream IDs. IMHO, it would be good to figure out if this is possible and if not, whether changes to the HTTP/3 specification could make it possible. @yutakahirano I think we need to add an (optional) WebTransport constructor argument to disable pooling. Also, an internal slot that indicates whether a WebTransport connection once established supports pooling. At the January 2021 WEBTRANS WG interim, it was agreed that a server supporting WebTransport could refuse to support pooling, in which case the internal slot would indicate that the connection could not be pooled. At present, I believe that support for HTTP/3 Datagrams is required for successful negotiation of a WebTransport connection. |
For WebTransport, see: w3c/webtransport#128.
This is for #128. - Introduce WebTransportOptions.dedicated. - Initialize a connection with https://fetch.spec.whatwg.org/#concept-connection-obtain. - (Bonus) Introduce WebTransport.Closed and reject it when the connection establishment fails.
) This is for #128. - Introduce WebTransportOptions.dedicated. - Initialize a connection with https://fetch.spec.whatwg.org/#concept-connection-obtain. - (Bonus) Introduce WebTransport.Closed and reject it when the connection establishment fails. SHA: 02a7570 Reason: push, by @yutakahirano Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@aboba and @vasilvv, has this been already specified in the protocol side? I assume this should be specified at https://ietf-wg-webtrans.github.io/draft-ietf-webtrans-http3/draft-ietf-webtrans-http3.html#name-http-3-settings-parameter-r but I see nothing about it. |
Meeting:
|
Meeting:
|
The text in Section 14.2.1 lacks clarity on sharing/pooling of HTTP/3 connections:
"Either establish an HTTP/3 connection or reuse an existing HTTP/3 connection to the host specificed by the url, as specified in [WEB-TRANSPORT-HTTP3]."
Does this mean that an HTTP/3 connection created by fetch will be reused if an Http3Transport is constructed to the same host? Or is the text only applicable to reuse of connections constructed by Http3Transport? Is it possible for a QUIC connection previously created by the QuicTransport constructor to the same host to be reused by Http3Transport?
The text was updated successfully, but these errors were encountered: