RE: draft-lubashev-quic-partial-reliability

"Lubashev, Igor" <ilubashe@akamai.com> Tue, 19 December 2017 19:02 UTC

Return-Path: <ilubashe@akamai.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 1E3F51289B0 for <quic@ietfa.amsl.com>; Tue, 19 Dec 2017 11:02:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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=akamai.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 5zaDDVxTvyxw for <quic@ietfa.amsl.com>; Tue, 19 Dec 2017 11:02:45 -0800 (PST)
Received: from mx0a-00190b01.pphosted.com (mx0a-00190b01.pphosted.com [IPv6:2620:100:9001:583::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4DA151200F1 for <quic@ietf.org>; Tue, 19 Dec 2017 11:02:45 -0800 (PST)
Received: from pps.filterd (m0122332.ppops.net [127.0.0.1]) by mx0a-00190b01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vBJJ2IDc008962; Tue, 19 Dec 2017 19:02:40 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=jan2016.eng; bh=6EKcFamdOq6sLhzalhlZxTGscRiGaSwxebtwtX+08+o=; b=SoWyRXmCZREVgb6za2O3aGIatyWiSar8spN2N8Z2rFoIUd4LlvoRUtT+L0ADNf7lCNNK KYp1OEpF18yMCcc4Ai8hyE2319ZJcVaYnEWXQjZHSWd8RNnwRHS7ikWG0iK9ROwo95VF Ml8qjabejgFicFdC5pCfCi/1ktpXYThzheX+vwCon6PLOgoNE2j41dSF+bYOwIqH3kUO jmcSKNoU2x5MClu2uJpNvbE4NatRJdwC1IywcIU/2zqWrtn5k0ExK0FSl8Q9TdkMg3tL GsA2X7SGFcVEr2ntdU2KswM4scA4G4+81OuaQAEJhuke31l1o/ibmteB0u98Gp9MO6tE Jg==
Received: from prod-mail-ppoint3 ([96.6.114.86]) by mx0a-00190b01.pphosted.com with ESMTP id 2evvdkt2mm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2017 19:02:39 +0000
Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.21/8.16.0.21) with SMTP id vBJJ0sV6025013; Tue, 19 Dec 2017 14:02:38 -0500
Received: from email.msg.corp.akamai.com ([172.27.123.31]) by prod-mail-ppoint3.akamai.com with ESMTP id 2evyq10d7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2017 14:02:38 -0500
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com (172.27.123.105) by usma1ex-dag1mb1.msg.corp.akamai.com (172.27.123.101) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 19 Dec 2017 14:02:35 -0500
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com ([172.27.123.105]) by usma1ex-dag1mb5.msg.corp.akamai.com ([172.27.123.105]) with mapi id 15.00.1263.000; Tue, 19 Dec 2017 14:02:35 -0500
From: "Lubashev, Igor" <ilubashe@akamai.com>
To: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, Lucas Pardue <lucas.pardue@bbc.co.uk>, "quic@ietf.org" <quic@ietf.org>
Subject: RE: draft-lubashev-quic-partial-reliability
Thread-Topic: draft-lubashev-quic-partial-reliability
Thread-Index: AdN4eekQTxka84DaTqiLnO0Um5bpqQAMOJHZAAgTzPAAAesSEAARBPyAAAhDLtA=
Date: Tue, 19 Dec 2017 19:02:34 +0000
Message-ID: <49797640bd7444f39b51a7595ee53c72@usma1ex-dag1mb5.msg.corp.akamai.com>
References: <c1f5a6d8d21f423a93003f7b69dae882@usma1ex-dag1mb5.msg.corp.akamai.com> <7CF7F94CB496BF4FAB1676F375F9666A3BAB1A4A@bgb01xud1012> <85d7dc28d3bb40a38873f4d32a16fd71@usma1ex-dag1mb5.msg.corp.akamai.com> <7CF7F94CB496BF4FAB1676F375F9666A3BAB1B01@bgb01xud1012> <CAN1APddU53Jzfy998NtOqVZC8ZdXYGEZf042VKw7yMGCixq-bg@mail.gmail.com>
In-Reply-To: <CAN1APddU53Jzfy998NtOqVZC8ZdXYGEZf042VKw7yMGCixq-bg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [172.19.35.55]
Content-Type: multipart/alternative; boundary="_000_49797640bd7444f39b51a7595ee53c72usma1exdag1mb5msgcorpak_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-19_10:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712190272
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-19_10:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712190272
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/1R61d9FEFIqwUVQ8u6ZDsW-Neu0>
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 Dec 2017 19:02:48 -0000

  *   Another concern is time-based partial reliability. If data is old, don’t retransmit regardless. But an application protocol can handle this

Yes, this is an application concern, since only the application can know what “old” means.  Also, since MIN_FRAME_DATA  frame is emitted ONLY if some expired stream data is lost (not ACKed), you would not expect to see many such frames on the wire, even if messages keep expiring all the time.



  *   My main concern is that sending MIN_FRAME_DATA [sic: MIN_STREAM_DATA] can generate A LOT of traffic with lots of tiny messages where you only care about, say, the last three 1 byte messages sent (hoping at least one gets through). The MIN_FRAME_DATA could be much larger than the messages

This is the most expensive case for MIN_STREAM_DATA – many partially-reliable streams, each carrying 1-byte messages, with each new message expiring all earlier messages, over a high-loss connection.  In this case, the cost of MIN_STREAM_DATA could approach 50% of the cost of the other frames (9 bytes for STREAM + some ACKs vs 5 bytes for MIN_STREAM_DATA frames).

You remove any of the conditions above, and MIN_STREAM_DATA cost drop off rapidly:

  *   Few partially-reliable streams: either multiple messages get consolidated into a single STREAM frame (requiring a single M_S_D frame to expire) or the overhead of the QUIC packet itself (MAC+IP+UDP+QUIC headers) starts to dominate dramatically.
  *   Multi-byte messages: STREAM frames are larger, so M_S_D frame’s proportion is smaller
  *   New messages expiring NOT all earlier messages: more chance for the network to retransmit lost messages, reducing how often M_S_D is sent.
  *   Low-loss connection: few packets are lost, so few M_S_D frames need sending.

“Partially reliable” is not “unreliable”.  The transport still provides message atomicity and ordering guarantees, in addition to retransmission of “still current” data.

If you want completely unreliable (like UDP), you may want something slightly different.  For example, we may decide that is the first STREAM has OFF=1 and Offset=0, this introduces a “completely unreliable” stream.  No retransmissions are expected at all.  However, you still want to do something for flow control (you need to periodically synchronize your stream and connection flow control).  Maybe, if your unreliable stream went idle with the last transmission unacknowledged, you could send a STREAM frame with LEN=1, Length=0, and OFF=1, Offset=current_stream_offset.

If you like this, I can write this in a draft.


  *   Igor


From: Mikkel Fahnøe Jørgensen [mailto:mikkelfj@gmail.com]
Sent: Tuesday, December 19, 2017 12:15 PM
To: Lucas Pardue <lucas.pardue@bbc.co.uk>; Lubashev, Igor <ilubashe@akamai.com>; quic@ietf.org
Subject: RE: draft-lubashev-quic-partial-reliability

I think this proposal largely makes good sense.

Be default no MIN_STREAM_DATA frame is sent which is then the current stream behaviour.
Any application protocol can define its own rules about which streams can behave partially reliable.

A counter argument is that QUIC explicitly distinguishes between uni- and bi-directional streams, so why not between partial- and fully reliable streams? The answer might be that uni- streams can close state early, while there is no similar concern for partial reliability.

Another concern is time-based partial reliability. If data is old, don’t retransmit regardless. But an application protocol can handle this.

My main concern is that sending MIN_FRAME_DATA can generate A LOT of traffic with lots of tiny messages where you only care about, say, the last three 1 byte messages sent (hoping at least one gets through). The MIN_FRAME_DATA could be much larger than the messages forcing less frequent traffic. Of course, locally you can have you own rules, and just periodically update MIN_FRAME_DATA, but this is a bit odd.

A variation of the concept could be sending MIN_FRAME_DATA as a delta to most recent: never expect more than X bytes older than most recently seen, but that also has it issues when messages are variable length.


As to client vs server asymmetri: It strongly suggest not to make a distinction here because there are many symmetric peer to peer use cases and also opposite cases: server to client with partially reliable video, client to server with partially reliable game state, server to server with partially reliable gossip protocol to statistically advance a common state (e.g. "I have processed so many bytes now, how about you?”).


Kind Regards,
Mikkel Fahnøe Jørgensen


On 19 December 2017 at 16.47.08, Lucas Pardue (lucas.pardue@bbc.co.uk<mailto:lucas.pardue@bbc.co.uk>) wrote:
Igor wrote:

The bookkeeping is simple enough and the runtime resources required is just one uint64_t per steam, so I do not see a problem for constrained devices.
Ultimately, partial reliability is a feature that an application either needs or does not. If an application needs it, it most likely requires it. In any case, an application can do its own negotiation if it desires to do so. For example, it can use stream 1 for that.
Now I understand this is connection-wide, I generally agree. However, for something like conventional HTTP/QUIC, the reliable guarantee assurances are required by the mapping. If partial reliability is default enabled transport feature, applications like HTTP/QUIC must restrict or disable it – I’m not sure if the editors/drafts have broached that subject yet (I’ve certainly had some feedback on my draft about such restrictions).

I did not fully understand the last question. Are you asking whether it is possible for the connection to negotiate just a single stream (in each direction) that would be partially reliable and, therefore, not send a stream id with MIN_STREAM_DATA? I could actually think of a version of MIN_STREAM_DATA that has an implied stream id -- the stream id of a prior/following STREAM frame in the same packet. That would be an optimization that I am happy to add, if there is enough support for it.

Apologies, I hadn’t drunk any coffee when first replying and got myself confused. All QUIC frames of this nature should normally include a Stream ID, which identifies the stream it is sent on. I think your suggestion relies on serial ordering/processing (even inside a packet), which might be a hard sell.

Separately, in terms of asymmetry, I was thinking that you might always want (as a policy) clients to transmit with full reliability but provide data to them with partial reliability. I think this is again an application mapping concern.

Regards,
Lucas