-
Notifications
You must be signed in to change notification settings - Fork 18
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
Close sessions which originSet
is fully covered by other sessions and reuse those
#17
Comments
More details on when connection coalescing is allowed can be found in the RFC: https://tools.ietf.org/html/draft-ietf-httpbis-origin-frame-06#section-2.4 |
So as I understand it if I got two connections:
And I want to make a request to B I should use connection B instead no matter what? |
I think it's saying the opposite: you should use connection A and close connection B as soon as it finishes processing all outstanding requests, so you can keep 1 connection alive for both origins? |
Connection A contains the authority of B, which is a proper subset of connection B. OTOH, it says
Does it refer to the whole Origin Set or just a part of it? |
From https://httpwg.org/specs/rfc7540.html
|
@szmarczak could you clarify what you find confusing the origin set RFC language? I think it clearly states that if you have a connection that is authoritative for a set of origins that are already fully covered by another connection, you should close the former. This makes sense as the more valuable connection is the one with the larger encompassing set? Regarding RFC7540, I think it simply states that in some scenarios connection reuse can end up sending data to the wrong server. That happens because SNI happens at connect time when you were trying to reach origin A, but now you’re reusing the same connection for origin B. The spec resolves this potential issue by having the server send a 421 error and allowing the client to retry the request on another connection (for example one explicitly established to origin B). In summary:
|
https://tools.ietf.org/html/draft-ietf-httpbis-origin-frame-06 further clarifies that ORIGIN helps address two issues:
|
I don't understand the meaning of
What's considered a proper subset? In my example server B holds the primary authority of B. Server A provides two valid authorities: A and B. Does it refer to the primary authority? IOW: First, you want to exchange some data with B. So you connect to server B, which holds the primary authority of B. Then, you connet to server A and it has two valid authorities: A (note: A is not owned by B, they're two different parties) and B. What should you do? What's the proper Origin Set? |
Proper subset just means that one is contained in the other, but not equal:
http://mathworld.wolfram.com/ProperSubset.html
…On Sun, Jul 28, 2019 at 7:57 AM Szymon Marczak ***@***.***> wrote:
I don't understand the meaning of *proper* in:
clients SHOULD NOT emit new requests on any connection whose Origin
Set is a *proper subset* of another connection's Origin Set
What's considered a proper subset? In my example server B holds the
primary authority of B. Server A provides two *valid* authorities: A and
B.
Does it refer to the primary authority? IOW:
First, you want to exchange some data with B. So you connect to server B,
which holds the primary authority of B. Then, you connet to server A and it
has two valid authorities: A (*note: A is not owned by B, they're two
different parties*) and B. What should you do? What's the *proper* Origin
Set?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=ABW6KJIXZ2YAQZELMHO4V63QBWCT7A5CNFSM4IFDWSP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD265FAA#issuecomment-515756672>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW6KJOA6Z6JH5AI4ELPYGTQBWCT7ANCNFSM4IFDWSPQ>
.
|
Ah, my bad. Thanks for the explaination! Sorry, I didn't know that these are math keywords. I'm not native English :P Again, great thanks. You've been right from the beginning. I'll try to make a PR ASAP. |
No problem at all, these things can be confusing! Glad I was able to help :)
…On Sun, Jul 28, 2019 at 11:30 AM Szymon Marczak ***@***.***> wrote:
Ah, my bad. Thanks for the explaination! Sorry, I didn't know that these
are math keywords. I'm not native English :P Again, great thanks. You've
been right from the beginning. I'll try to make a PR ASAP.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=ABW6KJL66CA5DS43TBY3ECLQBW3Q5A5CNFSM4IFDWSP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27A5KI#issuecomment-515772073>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW6KJIS4YABIDLKSTWOUTLQBW3Q5ANCNFSM4IFDWSPQ>
.
|
originSet
is fully covered by other sessions
originSet
is fully covered by other sessionsoriginSet
is fully covered by other sessions and reuse sessions with many origins
originSet
is fully covered by other sessions and reuse sessions with many originsoriginSet
is fully covered by other sessions and reuse them
@pietermees I understand the part above. So if I got this:
and I want to make a request to C, it doesn't matter whether I choose A or B? (I can't create a C connection because it would violate the RFC) |
originSet
is fully covered by other sessions and reuse themoriginSet
is fully covered by other sessions and reuse those
@szmarczak correct, that's my understanding as well! |
@pietermees You may want to see #21 (there are two todos left). I haven't made the tests yet. |
Finished that todos. I just need to add some RFC comments so it's easier to understand the code and make the tests. |
See https://nodejs.org/api/http2.html#http2_event_origin
The text was updated successfully, but these errors were encountered: