- From: Andy Green <andy@warmcat.com>
- Date: Mon, 16 Oct 2017 12:06:09 +0800
- To: Martin Thomson <martin.thomson@gmail.com>
- Cc: Patrick McManus <pmcmanus@mozilla.com>, hybi <hybi@ietf.org>, Cory Benfield <cory@lukasa.co.uk>, Patrick McManus <mcmanus@ducksong.com>, HTTP Working Group <ietf-http-wg@w3.org>
On 10/16/2017 11:57 AM, Martin Thomson wrote: > On Mon, Oct 16, 2017 at 2:08 PM, Andy Green <andy@warmcat.com> wrote: >> I think you misunderstood something... as it is he has to wait for the >> SETTINGs to tell him it's possible, wait for the CONNECT and response and >> wait for the ws handshake to go through before he can send something. > > No, I'm just saying that if you proceed like the CONNECT will work, > then you can save an RTT over that. Given that you have a clear > indication that the server accepts WS, then you don't need to worry > about this. > > Keep in mind that you don't have to wait a round trip for the server > SETTINGS frame in TLS 1.3. That means that you aren't saving much > with any of these extra steps. > The sequence I gave for counting the RTT includes fetching the html with the script that wants to make the connection; until the client gets that he cannot start with the ws connection. This is the typical situation for ws connections and in the case the same h2 connection is providing everything, it will be the normal case there too. Client Server - SETTINGS - SETTINGS - GET /index.html - 200 HEADERS + DATA - :method CONNECT - 200 HEADERS - DATA ws handshake - DATA ws handshake final - DATA ... - DATA... So after the h2 link is up, he needs 3 x roundtrips to send some ws data. With an optional PUSH_PROMISE that the client feels he can use... - SETTINGS - SETTINGS - GET /index.html - 200 HEADERS + DATA - PUSH_PROMISE ws contains ws handshake final - WINDOW_UPDATE (see below) - DATA ... - DATA... What you are saying will save time I already assume is "for free" since it happens during the time the HTML is fetched. If I am missing the point, could you edit the above copied unchanged from my earlier mail to show me the point I am missing? -Andy
Received on Monday, 16 October 2017 04:07:12 UTC