Re: [quicwg/base-drafts] SETTINGS synchronization (#75)

Mike Bishop <notifications@github.com> Mon, 12 December 2016 18:19 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 BA8B91294B1 for <quic-issues@ietfa.amsl.com>; Mon, 12 Dec 2016 10:19:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.897
X-Spam-Level:
X-Spam-Status: No, score=-4.897 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-2.896, 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 qmjicySiJWGp for <quic-issues@ietfa.amsl.com>; Mon, 12 Dec 2016 10:19:40 -0800 (PST)
Received: from o7.sgmail.github.com (o7.sgmail.github.com [167.89.101.198]) (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 C9E27129484 for <quic-issues@ietf.org>; Mon, 12 Dec 2016 10:19:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=github.com; h=from:reply-to:to:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=3eEA41tu98wU/2JDn6rWb4AFSCY=; b=t9TpRjMIVj1iKZJ4 EvyG5UwmMjtECWIazA2Bk8uFggteI5VdS1nftj23sIb0leRF+Zej7Uk3luvpE7/J 1XvEuFesRtrQccyeyuuHxQGJwW4adrMOdegMwleApLN3JYSG2aENqbe7ullk3lKj 1d7aisIUIGQbR4KnNJePtMnsTCA=
Received: by filter0828p1mdw1.sendgrid.net with SMTP id filter0828p1mdw1-24629-584EEA35-72 2016-12-12 18:19:33.86725972 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id Sz4SPCZ4TTG29YkuFqtVOQ for <quic-issues@ietf.org>; Mon, 12 Dec 2016 18:19:33.833 +0000 (UTC)
Date: Mon, 12 Dec 2016 10:19:33 -0800
From: Mike Bishop <notifications@github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/75/266508254@github.com>
In-Reply-To: <quicwg/base-drafts/issues/75@github.com>
References: <quicwg/base-drafts/issues/75@github.com>
Subject: Re: [quicwg/base-drafts] SETTINGS synchronization (#75)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_584eea35abc9b_f8b3fc4518711305469d"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: MikeBishop
X-GitHub-Recipient: quic-issues
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak3OFGeZeFNqkB99x0AcD52tGnRzlnT0V9g/7k 5x+3742I1tlm72eVo76WdcMtMUny8y5Ih4K/pHMqRAHBEZTWKZLR1El06mFWDn4aUg1xIBnwUumZ4c P6Ff+SbaFy5/yqC4qOeti00J3jIVojWWIOInXW8Jo6SKoDoGHcLJPx8wj3raD8IKpLPuE3MTZjiRcJ I=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/Vw0vC0QpRMOM4ZTdOolil_Ukzqs>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.17
Reply-To: quicwg/base-drafts <reply+0166e4ab1c6c71d92036331fb2abbdff2fdfd9efb12a394392cf000000011466ac3592a169ce0b8a677a@reply.github.com>
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: Mon, 12 Dec 2016 18:19:43 -0000

I think I have a solution, but it's a little ugly.  Upon receipt of a SETTINGS frame, every stream will be either already closed, open, or still idle.  The sender of the SETTINGS frame needs to know, for each stream, which state applied so it can enforce the new settings appropriately.

If the receiver sends:

- On stream 3, a SETTINGS_ACK frame containing the highest open stream number in each direction (tells the sender which streams weren't open yet and have the new settings from the start)
- On every open (control) stream, an empty SETTINGS_ACK frame as a time marker

The sender of the SETTINGS frame can then require that it receive the master ACK *and* that every stream below the highest-open either closes or ACKs before the timeout expires. This is resilient to reordering between the streams, but will unfortunately require spitting out as many frames as you have open streams, making the request for an ACK potentially expensive.

> **Corner case:** If the frames opening streams have been reordered, the receiver of the SETTINGS frame might find itself required to ACK on a stream that, from its perspective, is still idle.  Permit it to open a stream in the "wrong direction," or does it need to wait until the frame has been received?  It can anticipate that the frame is already in flight, so this wouldn't appear to be an ordering violation to the other peer.

On the plus side, #80 makes the ACK optional (i.e. sender-requested) rather than requiring it for every SETTINGS frame, so we're hopefully going to do this less often.  Only a few settings actually require a timing synchronization point (mostly flow control, which is gone, and HPACK).

More elegant solutions eagerly solicited.

-- 
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/75#issuecomment-266508254