Re: partially unreliable quic streams

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Tue, 19 September 2017 18:09 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 B1DE11342CA for <quic@ietfa.amsl.com>; Tue, 19 Sep 2017 11:09:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.697
X-Spam-Level:
X-Spam-Status: No, score=-2.697 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_LOW=-0.7, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=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 f6KN4VZCK-Yw for <quic@ietfa.amsl.com>; Tue, 19 Sep 2017 11:09:45 -0700 (PDT)
Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 0288B134296 for <quic@ietf.org>; Tue, 19 Sep 2017 11:09:44 -0700 (PDT)
Received: by mail-it0-x235.google.com with SMTP id g18so476986itg.5 for <quic@ietf.org>; Tue, 19 Sep 2017 11:09:44 -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=yaeuXN3qp3VulVfehgy34QWNUyTN/W2cjVVSJoSqXCo=; b=Hl6SVBsJLKAnEMyVPwLf1rmhhqEgGBjuMjxLdDy0NKR9kcH7z7TfHlQ2DLA0dBdsah B1cpcnyA17oxNt3CWa8pMYvl6SWPU0gUdk2orTrWBjgRUn8sk8H7trXiZtia6EX/0dO7 h7cfWBgX8LzTbUuVFfTH8k1G2UfTJsT6RbTkRCPdUCZI0AMz3gcC2MhYEJDazfqvtuYM LobBYAYyx+ExJD+E25v2cDhVVrDmMBAGFwxVMKOBrpiF3zeGXmTs9K4tNeBKIg+hh0j1 ai/Ns6XImZDJ9cEJcWb1qR8TsOqUxBH7TsdL9TGQe//UkFuYnsAmFYeuDl5eECxvqKZy 6DSw==
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=yaeuXN3qp3VulVfehgy34QWNUyTN/W2cjVVSJoSqXCo=; b=Guh7YEdgwJFisweFXuAFzIT6OjJZ8loLauamh0ESc49pgRAyCCASA0OSQsS6Ws1KuL FvQSD6Q1MmxxyiQPmVqSrcZL4U4vgUCd3Ir7TdX7f6jQsmRZBas1rZr30Wev/kxqnrCt H7feQQ/F2QE/90CMR8gehwHM2jMylR35gUu6BTV9/k0/wsuAylpaUqt79/s+/ML1jHM8 7q4Wrsa2oDBgaRzT8F15avwEpdc+kVh+vDypWnwEO1qQGNmNFnXKLiX0GuUaSDlhBxV3 w8RbZI3K8AgRhVaNaatkNI2waBurhPNXS5879XZqVdQ6Ht/j60e6dw0VnXCyrixCPYiy 8R6w==
X-Gm-Message-State: AHPjjUiA8RBl5jzCnB+qsQOM6v+7ahVOi2Lt3v3QfkbKGofWHpH6gCN2 RNTtfN5SsGR2+ph8UhHIqwSS6dCi6yUjuhTXnqDCABj1
X-Google-Smtp-Source: AOwi7QC6fqg4FEGWxHLLICqQG1+6AVXUivwhLLIE98WlC0k/oeakii2TifNSHDhpzolDC7VXWcqRrNqoge1GdH1ZuKs=
X-Received: by 10.36.94.5 with SMTP id h5mr3075134itb.100.1505844584216; Tue, 19 Sep 2017 11:09:44 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Tue, 19 Sep 2017 20:09:43 +0200
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
In-Reply-To: <F051F0EF-D93A-4F5E-A19F-3BFD545143F8@in-panik.de>
References: <CAN1APddnAmjc2LuMReCHXMSABD1_6nHkn47_BD1KcmD8Z4ENUw@mail.gmail.com> <F051F0EF-D93A-4F5E-A19F-3BFD545143F8@in-panik.de>
X-Mailer: Airmail (420)
MIME-Version: 1.0
Date: Tue, 19 Sep 2017 20:09:43 +0200
Message-ID: <CAN1APdf8vFYQUpDebg8GFOk1GH9iqj1Vemou1rZJ7vBkDbXqxg@mail.gmail.com>
Subject: Re: partially unreliable quic streams
To: "Philipp S. Tiesel" <phils@in-panik.de>
Cc: Balakrishnan Chandrasekaran <balac@inet.tu-berlin.de>, Joerg Ott <ott@in.tum.de>, QUIC WG <quic@ietf.org>, Mirko Palmer <mirko@inet.tu-berlin.de>, Anja Feldmann <anja@inet.tu-berlin.de>
Content-Type: multipart/alternative; boundary="001a114489a6878fab05598ec3e0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/qeIsQuRGwTYB5dKgNuIOv6UllIE>
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, 19 Sep 2017 18:09:48 -0000

Hi Philipp, thanks for getting back - I’m not really criticising nor am I
an official representative of the QUIC design body, I was just asking where
this was fitting into the QUIC context.

Just one clarification on message abstraction:

The intention is not inherently to provide messages over streams as much as
points where it makes sense to create holes as you mention (though this is
also useful).  However, dealing with holes in a stream, is more complicated
than consider a stream broken up by messages, notably “virtual streams”
where each true stream is a message in the virtual, or partially reliable
stream.

I earlier made some design proposals on how to frame partial reliability.
However, with the new unidirectional stream proposal, the same can be
achieved much simpler by viewing streams as messages - where a message can
be a video frame or whatever. This very transparently allows low-level
machinery to deal with what is delivered and skipped because boundaries are
communicated efficiently via separate streams.

On the retransmission part of the message abstraction - this is definitely
something that require additional protocol support to prevent zombies, as
you say.

The earlier design notes I added in comments can be found in these closed
issues

https://github.com/quicwg/base-drafts/issues/489
https://github.com/quicwg/base-drafts/issues/433

However, here each frame has a bit to indicate where a boundary in the
stream begins, i.e. where a hole is permitted - the API becomes more
complicated due to friction of concepts.

I’m not saying what is the ideal solution - just that the message
abstraction came out very naturally once Martin Thomson provided the
unidirectional proposal. Ian Sweet hat earlier argued for similar use of
light weight streams in bidi streams, but in my opinion they were to heavy
weight because a sender must wait for the receiver to close the other end -
with uni streams state can be purged must faster make the concept feasible
at high frequencies.


Kind Regards,
Mikkel Fahnøe Jørgensen


On 19 September 2017 at 19.49.31, Philipp S. Tiesel (phils@in-panik.de)
wrote:

Hi Mikkel,

as I wrote most of the draft, I’ll to answer your questions and clarify
some details.

> On 19. Sep 2017, at 09:21, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
wrote:
>
> Hi Anja und Jörg
>
>
> Regarding
https://tools.ietf.org/html/draft-tiesel-quic-unreliable-streams-00
>
> I’m not sure where this draft fits into to the QUIC design process
process since my understanding is that unreliable streams is for a later
charter in the design process.

I understand your criticism, but we decided to go forward and publish our
observations about unreliable streams. The QUIC WG was chartered to exclude
reliable streams from the first release to speed up the design process.
That does not mean unreliable streams are explicitly out of scope for later
releases. Therefore, I think that documenting how unreliable streams fit
into the current QUIC drafts are useful feedback for the design process.

As already stated in the draft announcement, the primary feedback is:
a) unreliable streams can be added to QUIC as drafted so far
=> No action required, current design is fine for that aspect
b) one more flag bit in the stream header makes unreliable streams much
easier to implement
=> As the problem also arose for other desirable features, reserving a few
bits in the stream frame header sounds like a good idea.



> A quick read through the draft makes me wonder if you considering some
partial reliable ideas that have emerged out of the currently unfinished
concept of unidirectional streams and if you can incorporate these ideas
into your draft?
>
> Essentially the idea is each stream is sequence of messages which are
reliable but suffer head of line blocking when each message is separated by
an application specific message header. In the simplest form the stream is
just one message.
>
> For unreliable streams, the concept is inverted: each stream is a single
message which starts an application specific unreliable stream identifier
embedded in the stream/message. The ordering of messages is given by the
QUIC level stream id which always increases (effectively a message id in
this context) but there is no head of line blocking nor any delivery
ordering because each message is independent.
>
> Thus the space consumed is the same for the two concepts but the
interpretation is different.

I see unreliable streams and “stream as a message abstraction” as
orthogonal concepts.

In QUIC, streams are byte streams, not message streams.
Thus, their content are completely oblivious to the transport layer.
If you want a message abstraction on top of QUIC, you either send exactly
one message per stream or use your own framing.

Whether the bytes of a stream are delivered reliable or not does not change
the head of line blocking problem when waiting for the message delimiter.
If the message delimiter is in “a hole" of the unreliable stream, you
either have to discard both messages or wait for retransmission (which can
still be done if the sender decides to).
But with unreliable streams, you could search for complete messages in the
received parts after "a hole” .


> An implementation can further cooperate by not retransmitting
sufficiently old or otherwise outdate messages. Currently QUIC has no way
to explicitly configure this and dropping retransmission of frames might
affect congestion control. Therefore in its current form QUIC cannot
properly unreliable streams, only prevent head of line blocking.

The draft exactly discusses the design space for such a mechanism.
It concludes that a mechanism to control retransmits, when
sender-controled, requires only few considerations at the wire-protocol
(e.g., requires not loosing FINs), but has much impact on the API used by
the application.

I don’t see how dropping retransmissions effects congestion control as the
only inputs to CC are acked/lost packets and bytes send.



> It is worth noting that with once message per stream there can be many
messages per packet which can significantly increase the messages per
second rate and therefore also requires efficiently management of stream
state - such as discarding send state immediately after sending FIN (except
retransmission machinery).

This definitely is an issue of the “stream as a message abstraction”.
It gets more ugly if combined with reliable streams as the “FIN” of
unreliable streams needs to be retransmitted to prevent stale state (or
“zombie-streams”, as we call in in the draft).
As the recovery draft does not tell you how to retransmit the
retransmitable contents of a lost packet, closing a unreliable stream by
(re)transmitting the FIN only (as an empty stream frame with final offset
and FIN set) is fine.


AVE!
Philipp S. Tiesel