Re: Unreliable Stream (was: Re: HTTP requests on one stream #692)

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Tue, 25 July 2017 19:11 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 9F381131CB4 for <quic@ietfa.amsl.com>; Tue, 25 Jul 2017 12:11:35 -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 jB-EFroaYYTc for <quic@ietfa.amsl.com>; Tue, 25 Jul 2017 12:11:33 -0700 (PDT)
Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::232]) (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 93D14131714 for <quic@ietf.org>; Tue, 25 Jul 2017 12:11:33 -0700 (PDT)
Received: by mail-ua0-x232.google.com with SMTP id w45so108749316uac.5 for <quic@ietf.org>; Tue, 25 Jul 2017 12:11:33 -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 :cc; bh=clIWrAGnz/92lyIjHA/QtLmUN+BZKCNMzbaOAsElxmo=; b=c5h89UN/9kmBoKpgzZXDZgkLq+2iRMQHJFwk8Cw5267wEnurFtFv9sPFOpxiKkSTeS 5+KazPSHxtmk4rLMAImk/XP6bD4OqZIdRjsZMKDKit/C5lWdsv3/TLd6FzRclPePoj2W ArqYrB4wwy7pSEwSPlRkkSxkvTdsP3qKNxCxEY8XU4z8C1Vid/tgeECD/UoaTWNoMDXp MQiAoAkEnUYOC98dKXwMM/Nn1O2+xVs5Z16VBUwIgo5icGK7qMIU7QiAowojZn4pl1WB iKLFaHYLvAMcjpWIIspdqfs9upJYodU89M5N3jAPbIdlRQKQvY9URwDdtTQGSNQhcuJf W8rg==
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:cc; bh=clIWrAGnz/92lyIjHA/QtLmUN+BZKCNMzbaOAsElxmo=; b=HYvdZO+rNmiijUff7+AueG7rYxuQVI6XrI+jaIHlsCQIdAXEpzNcbCnnaw3n9bI6B+ b1urbINsOiJLizdtsCUSj49hp+fXdINB2X4fwSk+K6J8JpGJiqI+ZhW2DouUw0DqFfYa EXTvQQwo+WpamxAKVTKLqrs6Zx17O8XvBkK+C9T81Q2T/8df6e0i19S4++UImKFWFRGh dAm/d9NV6Deg9RXktXaffLec31vmRBpre73Y0fm/ycKW08d1mkNQMafVUN1JYXEtZhRy 4sfl2HnQDlt4tXoEnKGh2WT7N9Zv7GrCDwiEMMIqk0lz7OKLBUHpB6lfJlCgsNq3XSdt tKZA==
X-Gm-Message-State: AIVw112n6xIyyz1iDCq0LSl86qd5R9jgJ31QLaMgRHAvxPhlGL3lQK68 gHbclPn01A7nZ+Gjmu/mp8jlfFl5PQ==
X-Received: by 10.176.91.19 with SMTP id u19mr13497492uae.152.1501009892717; Tue, 25 Jul 2017 12:11:32 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Jul 2017 21:11:31 +0200
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
In-Reply-To: <CAD3dRjqACu+oK=jhECsKHd27HEbHgjJkgNtQp3tdwnjo1QvjFQ@mail.gmail.com>
References: <7CF7F94CB496BF4FAB1676F375F9666A37748B7A@bgb01xud1012> <MWHPR21MB0141497D0A30342613752E0787A50@MWHPR21MB0141.namprd21.prod.outlook.com> <2B5E3522-750C-4697-A308-D8452E800D9F@in-panik.de> <CAKcm_gO8k+ZASF3M79QTrypa12pXGfp7=3P2XuOhHbxb04Rq4Q@mail.gmail.com> <DB5PR07MB1237D364086129C462AAC19D84BA0@DB5PR07MB1237.eurprd07.prod.outlook.com> <CAKcm_gMbQj8UKLfDmwv8K+XWHxB8xx4EG7uQGt95m3X40c1YXA@mail.gmail.com> <DB5PR07MB1237A77FC6F791C1A95239F784BA0@DB5PR07MB1237.eurprd07.prod.outlook.com> <CABkgnnVu5r-QQpO01LAeWHJvbxxBtpGvwpNpA2_vi7UgOJ9ThQ@mail.gmail.com> <MWHPR21MB0141C6AA46DFF0B005972F2287BB0@MWHPR21MB0141.namprd21.prod.outlook.com> <9914D466-6293-447C-B3FC-839CFFF9298B@in-panik.de> <CAD3dRjqACu+oK=jhECsKHd27HEbHgjJkgNtQp3tdwnjo1QvjFQ@mail.gmail.com>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Tue, 25 Jul 2017 21:11:31 +0200
Message-ID: <CAN1APdd+1O6BigtMqt+YuGVHd_LOLDCgSqQupLZ9bv5-NzkmCQ@mail.gmail.com>
Subject: Re: Unreliable Stream (was: Re: HTTP requests on one stream #692)
To: "Philipp S. Tiesel" <phils@in-panik.de>, Frank Kastenholz <fkastenholz@google.com>
Cc: Lucas Pardue <lucas.pardue@bbc.co.uk>, Mike Bishop <michael.bishop@microsoft.com>, IETF QUIC WG <quic@ietf.org>, Martin Thomson <martin.thomson@gmail.com>, Ian Swett <ianswett@google.com>, "Swindells, Thomas (Nokia - GB)" <thomas.swindells@nokia.com>
Content-Type: multipart/alternative; boundary="f403045f8b7475b9820555291922"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/9vnzXQNQyO6b65bN5lz3vmdeQCg>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 25 Jul 2017 19:11:35 -0000

I believe Franks description suits the view if unreliable streams being
very small unidirectional streams.

As to Phillips question:

An open question is question is how to present a stream with “holes” to the
application.

The size of holes may be tricky unless, but presenting logical streams with
holes is easy:

For reliable (logical) streams you have one transport stream with many
messages and no holes. These messages must be on the stream to ensure
ordering, and you therefore need an application level message frame.

For unreliable (logical) streams you only send one message in each QUIC
transport stream. Instead of a message frame you store a logical stream id.
The transport stream id will always increase so even if unreliable, you
still know about ordering. An internal sequence number could be added if
more details are needed.

Unreliable streams may be short so there can be many in a single UDP
packet. This can drain the stream ID space.

A sending application can easily tell QUIC transport to not retransmit
frames of unreliable streams (or have some timeout etc.).

The receiving QUIC transport might struggle with seeing only the second
half of an unreliable stream. The receiving application has not easy way to
tell transport to stop waiting even if both sending and receiving
applications have negotiated what they want. To solve this problem, QUIC
transport could have a flag on frames that mark them as unreliable -
perhaps two bits for different classes / timeouts etc. The application can
the tell transport how to manage such streams.

By and large, reliable and unreliable streams work exactly the same at the
transport layer.


Note that if streams are not unidirectional there is more overhead in
keeping stream state and terminating streams. With a uni-directional stream
a sender can immediately close all stream state after sending a single
frame message. At a deeper level there  may be frame retransmission, but
this is much more lightweight. Then if frames are marked unreliable they
can also bypass the retransmission queue.

So I would like unidirectional streams with a flag to mark frames as
unreliable, and longer stream identifiers (possibly compressed).

How this works at the HTTP level I have no clue because I am still not up
to speed on this part. But I can easily imagine that a single stream per
HTTP transaction will fall short of some of those can be unreliable.


Kind Regards,
Mikkel Fahnøe Jørgensen


On 25 July 2017 at 20.17.34, Frank Kastenholz (fkastenholz@google.com)
wrote:

An open question is question is how to present a stream with “holes” to the
application.