Re: Clarification on HTTP/QUIC Unidirectional Streams

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Wed, 17 October 2018 17:42 UTC

Return-Path: <mikkelfj@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9D860130E19 for <quic@ietfa.amsl.com>; Wed, 17 Oct 2018 10:42:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m4a8vvXlHOc7 for <quic@ietfa.amsl.com>; Wed, 17 Oct 2018 10:42:26 -0700 (PDT)
Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2CB4C130E02 for <quic@ietf.org>; Wed, 17 Oct 2018 10:42:26 -0700 (PDT)
Received: by mail-ot1-x32a.google.com with SMTP id c23so25260337otl.9 for <quic@ietf.org>; Wed, 17 Oct 2018 10:42:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=Oun8scUL55sifzB9xK0d7AskPDWCnkOBnTA5Rnl7kpE=; b=i/gwbHzXRjkwx1sumPcT8YIyspUD8orFU9UoSDxBe7toItIys/c2TLlDpSPD67C6LV keo9zCEV64nxG1nbBnsv3doDieAkHMnM7QXhyD94rOFQ/+mjcbEC+oZ02wKUeScHz2Vr 6vGZZrbmQ6IFJrtAiX5auqzlWfCme0eszNx4LjSg0GaLKzYPzYrki+HrJpT410w4saHX VMkuRomMjzHgcbG4ixFjhhVK3rLDS4MjN3SglD/GZg+HygR7JIEIC4d5zJji5z8nSj2H mr2WdoBsX9/pQ4LBjp2sFYU3Js47dns4OOWHAiUOelARhOC7b2c7jOshQh+2J74mfb6x qbSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=Oun8scUL55sifzB9xK0d7AskPDWCnkOBnTA5Rnl7kpE=; b=SzLybmmviewhl6HAnnaYGwiBHKTlvgsNl2ZhS6Y4bmQ5rJOMqle+iaGVO4aAIODaZe OhWue/v/5ojiS77ydKb9bGvo0rOLdqUleBkACRnv38OkdkZBoqRRvqgBgQLdaREVEdRm d6iBKSpRTJ0D9u58GIqRybRosszze4f7GYbmG7roNu+Cwtnm32QphA+Jx3DrsLw2I8xv KWCVybNuUiSpk2RqLeElXHQKWvJ3XK3WmkYyEVSV6UmMoWa83Kos2zyYM+ejlodMRSNq J+PdxHUvfFhVrrW4f9VBQE5QI9y+PsqItBDW2jIbVVbtuVxY//dPcbdkuUOU/4rx8N3P LKRw==
X-Gm-Message-State: ABuFfoj210SwG/UX6nlkT9YW45qSivDGEh8o0c1BkfOpDHjamrbMiH5x szpEK3JyvASgqVuWSDHCdu6Ra6wHQfnDTWMxqIEhmg==
X-Google-Smtp-Source: ACcGV62fbFiKOXvJeDY5nPfooarlcjzvTO3bNI11hNlv0YS7AW4HG+CbWQmmlJbtVQp0flLtHiSYhWO+KO6PflA9z5w=
X-Received: by 2002:a9d:52a4:: with SMTP id f36mr18162738oth.186.1539798145231; Wed, 17 Oct 2018 10:42:25 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Wed, 17 Oct 2018 10:42:24 -0700
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
In-Reply-To: <272107b2-8136-48cc-f429-efcea1231d78@rd.bbc.co.uk>
References: <272107b2-8136-48cc-f429-efcea1231d78@rd.bbc.co.uk>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Wed, 17 Oct 2018 10:42:24 -0700
Message-ID: <CAN1APddZzF-Cr77r5rvrsnwAwY_tnBRhkzviC=190sDuWr1Xtw@mail.gmail.com>
Subject: Re: Clarification on HTTP/QUIC Unidirectional Streams
To: IETF QUIC WG <quic@ietf.org>, Samuel Hurst <samuelh@rd.bbc.co.uk>
Content-Type: multipart/alternative; boundary="00000000000078f2ab057870318f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/O6T7xE7hJ050h-i0ppdwA0sSTkQ>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Oct 2018 17:42:29 -0000

I’m not at all into all the details of HQ/QPACK

but you cannot assume anything about stream identifiers before you see them.

If stream 2 is an obvious control streams, some implementation will make
stream 8 the initial control stream because it will have some idea idea
about forcing the earlier streams open so the peer can do something evil to
them before it even begins sending data. Or they might just do it for the
heck of it to break applications making such assumptions (like ping of
death).

Some implementation could have fewer streams because they are
micro-controllers that do not want to use QPACK compression at all, so
assuming server push on stream 15 would possibly work most of the time at
best.

On 17 October 2018 at 18.23.57, Samuel Hurst (samuelh@rd.bbc.co.uk) wrote:

Hi All,


Apologies if this question has been asked before, but I'd just like to
check that my understanding of something is correct and searching back
through the list has not answered my question.

Given that HTTP/QUIC requires each peer in a connection to open a
unidirectional control stream when a connection begins, I think it's
safe to assume that streams 2 and 3 will be the control streams.

Now, a client will make a request on Stream 0, which will include some
QPACK HEADERS, and the odds are that some of those headers will be poked
into the dynamic table (I'm thinking of the User-Agent as a prime
candidate for this).

However, as I understand it, QPACK requires two unidirectional control
streams for the encode (type 'H') and decode (type 'h'). And this is per
encode-decode pair, so there will be another pair of unidirectional
control streams for the encode and decode of the server's response headers.

So in my head, the current state of streams in use is thus:

Stream 0 - Client Request
Stream 2 - Client Control Stream
Stream 3 - Server Control Stream
Stream 6 - Client Headers QPACK Encoder Stream
Stream 7 - Client Headers QPACK Decoder Stream
Stream 10 - Server Headers QPACK Decoder Stream
Stream 11 - Server Headers QPACK Encoder Stream

So, if as part of the request made in stream 0, the server decides to
send a PUSH_PROMISE frame, and then once acknowledged by the client the
server begins the server push immediately, is is a safe assumption to
make that the first server push stream will be on stream 15?

I also don't think there's anything to stop a server from sending a
PUSH_PROMISE frame before it's even sent a HEADERS frame back for the
initial request, so in that case would the server push end up on stream
11, the server headers encoder stream ends up on stream 15 and the
decoder stream stays on stream 10?

I'm just trying to get it into my head exactly what the expected lay of
the land will be during a running HTTP/QUIC session. It's been a while
since I last looked at the QUIC drafts and I'm jumping ahead through
several revisions so it's possible that I've missed something.


Best Regards,
Sam