[quicwg/base-drafts] Use a "stream" for transmitting CIDs (#1826)

Kazuho Oku <notifications@github.com> Tue, 02 October 2018 18:47 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5BF34131057 for <quic-issues@ietfa.amsl.com>; Tue, 2 Oct 2018 11:47:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.456
X-Spam-Level:
X-Spam-Status: No, score=-3.456 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.456, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 GzIW0tkyZ-vJ for <quic-issues@ietfa.amsl.com>; Tue, 2 Oct 2018 11:47:13 -0700 (PDT)
Received: from o5.sgmail.github.com (o5.sgmail.github.com [192.254.113.10]) (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 CAC5A131047 for <quic-issues@ietf.org>; Tue, 2 Oct 2018 11:47:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=NqCp3F7TAik9fQhT8E+2m0CCraQ=; b=BTCjbOXnSOkV8eRY /cV7PhUZCnPoIfArblpEEnsIB+4y2P7grZx6lMY2mcu3kf7DIu229SWzHaZNlfS6 sJLHHvvlD0QOL2Ut5YafV5P0IODu8rx21ftcRk3xLhwJto0t1AnXpTing66BxX1q 99b1Gf8Bv96/VJ1c1ihPG7+/tvk=
Received: by filter1382p1mdw1.sendgrid.net with SMTP id filter1382p1mdw1-25779-5BB3BD2F-E 2018-10-02 18:47:11.394085882 +0000 UTC m=+607020.866069814
Received: from github-lowworker-e51511d.cp1-iad.github.net (unknown [192.30.252.34]) by ismtpd0010p1iad1.sendgrid.net (SG) with ESMTP id kHEzWv90SeyOpcv08JQWVw for <quic-issues@ietf.org>; Tue, 02 Oct 2018 18:47:11.572 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-e51511d.cp1-iad.github.net (Postfix) with ESMTP id 8900880A3B for <quic-issues@ietf.org>; Tue, 2 Oct 2018 11:47:11 -0700 (PDT)
Date: Tue, 02 Oct 2018 18:47:11 +0000
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abd6aa632cbe53cb8438a640e867b9ff3ba178660492cf0000000117cb7f2f92a169ce15d12f59@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1826@github.com>
Subject: [quicwg/base-drafts] Use a "stream" for transmitting CIDs (#1826)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5bb3bd2f6c3ed_18523f7fbd0d45b8187971"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazuho
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak1wjJgN5mxh1YKDj1VVhwE5PBGWt2rXuHmeGh WU+3oP6XyUlHnvmuYG++gYaiFkubKzWccbgwp3fxd52jlQYb5d2ZP4r9W8uggszyojMzHb1u/SKpAo yvrvR2j61Ru71YwFMIv/GPJDfXNCs83T0gXc50B+6/TiXRADAGYO0kepsbiQDCezIByQG79iR8CSiy 0=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/EbnY3mzb2sZA7Uo_AUZwZ2fnKos>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Oct 2018 18:47:15 -0000

Transmission of new and retired CIDs is something that do not need low latency, but it seems like it is going to have lot of code specific to the purpose.

Looking at #1799, I am starting to wonder if we could use a "stream" to carry the new and retiring CIDs (sorry for suggesting to change the approach at a late moment).

**The proposed design**

Like the CRYPTO frame that carries the TLS messages, We will have a CID frame that carries the CID messages. This is essentially a "CID stream" much like the "CRYPTO stream."

The format of a CID frame will be equivalent to the CRYPTO frame.

A CID message has the following structure. Type is either NEW_CID (0) or RETIRE_CID (1).

```
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type (8)   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Length (i)                         ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       CONNECTION ID (*)                     ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```

Instead of flow-control based on octets, the number of CIDs given to the peer by the use of the NEW_CID messages will be governed by a MAX_NEW_CID frame that is equivalent to the MAX_STREAM_ID frame, except for the fact that it carries the number of CIDs.

**The Upsides**

Code reuse _and_ design reuse.

We can reuse a lot of code. Basically, we only need glue code and codec for the CID messages. All the code that relates to retransmission and back-pressure can be reused. We are also reusing a design that we are familiar with.

These aspects lead to less issues.

**The Downsides**

Head-of-line blocking in the delivery of CIDs. But I do not think that is an issue in practice.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1826