Re: Exercising Version Negotiation

Ryan Hamilton <rch@google.com> Mon, 26 March 2018 22:32 UTC

Return-Path: <rch@google.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 D0122128954 for <quic@ietfa.amsl.com>; Mon, 26 Mar 2018 15:32:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.71
X-Spam-Level:
X-Spam-Status: No, score=-2.71 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, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 SqulJ-66kVb0 for <quic@ietfa.amsl.com>; Mon, 26 Mar 2018 15:32:18 -0700 (PDT)
Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (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 DFC37127AD4 for <quic@ietf.org>; Mon, 26 Mar 2018 15:32:17 -0700 (PDT)
Received: by mail-yw0-x22e.google.com with SMTP id r29so6639100ywa.12 for <quic@ietf.org>; Mon, 26 Mar 2018 15:32:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zXmxETPOkC66LekeEpBE/Iq7Vtr/SMDLfgxDLQM32Ag=; b=srUj5Ol+bTib6iWPL6gfMxycEkxRZcq8J6r6WKnpQYLTb/xNEgK3rZzHq+dWGyR74C 6J7l8R6D3nv2SJR2YvsGOsY8+nJcF+G0W8pykyRo6jwuvFZ5uLaGxazQU5e5PyPQ0m5g OsrhN63EdYvxNf+JNLfloeKEJhEd1lP2mWsFoI82kIFpaqEqM3nPXg70+vViOkDOZtPm j688k1oia0xj5k+BFvl9quRzRwGFSarskxa9rxsc2g1ZR4+IDL4Hw2SxJm6+52ZomPmZ osFATbvFatgQO3b/5+b4k93vu6iKKNPH0xxJNuhh+ECd3MPLfuqAtbJCAXq+vYw2OmbN 7ulg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zXmxETPOkC66LekeEpBE/Iq7Vtr/SMDLfgxDLQM32Ag=; b=ZdEqRWmC7HtdzaglOnIkdE5GBmtY4kbkwgV28R0WYGU4OCPhRi5fT0zSrbJrsDe90W Lxlz2n+xByHFpiy6nCHc4vrwG9cMTQ4CmWlSRUcWbteqY/190cCmVWXAkblFdg9N9ZfM KWUPpDO1swG/uPPhlgz3fGUBTUxgiRGdYTqxJieNeMtT06PI+CJHTXenqds93rqy2lRS GLI+cAJ7II8QUlSiQbfSe5SGFaL4T+Sn2V5r6t6a31qHd4YlGZWKseRn0+A6r074IS+P k4PfClFYSyD4GZffM4uIWWT7truKzSPblqLIkDttbY/0/8zbEWTOQlvBJbnduUGq1WKB oonQ==
X-Gm-Message-State: AElRT7FH1lxidb4T4cNkHKJoPeJuwCV+OLvwDLpGCPkqImzyEv0NW0Od f/aQlJWGPhELz0ya9Oq3PNHsmDF4JYlJzWPeKzu/Pw==
X-Google-Smtp-Source: AIpwx49xkxF2y9w8XB+ySCcbIE3qKORV2B091tQHAV2uLEtmZ9JR9qjq9ETsKmTMSjjO8CoSD+4buocK1HkzXesgfkI=
X-Received: by 10.129.172.80 with SMTP id z16mr5862540ywj.179.1522103536460; Mon, 26 Mar 2018 15:32:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a25:98c5:0:0:0:0:0 with HTTP; Mon, 26 Mar 2018 15:32:15 -0700 (PDT)
In-Reply-To: <3CD5DE02-61DE-4201-873E-D682AD7345F2@fb.com>
References: <CABcZeBMv5BqZOtgVA2wfqaaGCd94gcNPB9bTXkrvNXXRveU8wA@mail.gmail.com> <CAJ_4DfQ6zqVeUUF7XcoT110kVcP1BJFEtqVR-+FN5XD2UuRMMA@mail.gmail.com> <CABcZeBMVNy151rFntLutSPtctPsd2Ei3Qy-ChuEXVMVpz4pgdQ@mail.gmail.com> <SN1PR08MB1854DD71FDCB9FBA48DD26E9DAA90@SN1PR08MB1854.namprd08.prod.outlook.com> <CAJ_4DfQxcxNGNP9CW3poPqnFgUsrNy269dO2Lf0dvWBFKKsSHg@mail.gmail.com> <CABcZeBNfw6MjjgeqQct11g6Kf=4xy+zVZiBRMwwzhtKB2rWHZg@mail.gmail.com> <CAJ_4DfRCNRHajNfFdedg6O54mjydWt+ooRESJZQ5L0sZmcwmXg@mail.gmail.com> <9A92D490-1F4F-457D-9209-C19E154E4881@fb.com> <CAJ_4DfSNA0wMnvzxSy1bHU5VTdKujP6oZAtwn8DUNwnX97yLDQ@mail.gmail.com> <BY2PR15MB0775C6A8859735FF359A2974CDA80@BY2PR15MB0775.namprd15.prod.outlook.com> <CAJ_4DfStVJ7kY8V-LLFHL8cJejP8BtWW2+Gjbgc-WRhRfMP6yg@mail.gmail.com> <5302B914-3586-4C94-83B3-09309F630C98@fb.com> <CAJ_4DfRm6wTuJLuX2CT6Fdu-LGakaxLKeqhyp5oj5iuouDLm+A@mail.gmail.com> <3CD5DE02-61DE-4201-873E-D682AD7345F2@fb.com>
From: Ryan Hamilton <rch@google.com>
Date: Mon, 26 Mar 2018 15:32:15 -0700
Message-ID: <CAJ_4DfSdchMJdo=7wa7zpUyuA1CHOF-vL_3wnTbw-fiPbo1bZw@mail.gmail.com>
Subject: Re: Exercising Version Negotiation
To: Roberto Peon <fenix@fb.com>
Cc: Ryan Hamilton <rch=40google.com@dmarc.ietf.org>, Eric Rescorla <ekr@rtfm.com>, IETF QUIC WG <quic@ietf.org>, Mike Bishop <mbishop@evequefou.be>
Content-Type: multipart/alternative; boundary="f403045efcbe9b086f05685858e1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/viZrhgPCXkJRDSW0pkhWUnBtn14>
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: Mon, 26 Mar 2018 22:32:22 -0000

I think that ekr's proposal was directed only at 2b.  Namely:

It would exercise the former.

-Ekr

On Thu, Mar 22, 2018 at 2:10 PM, Ryan Hamilton <rch@google.com> wrote:

> When you say Version Negotiation, do you mean the process of sending an
> receiving a version negotiation packet, or simply the act of speaking two
> different versions? Your proposal seems to be the latter but I don't think
> I follow how it would exercise the former, though maybe that's intentional?
>

​So while #1 and #2a are interesting, I'm specifically trying to understand
the case ekr originally proposed, namely sending and receiving a version
negotiation packet (aka #2b). If servers use Alt-Svc and, as you say, that
prevents on the wire version negotiation (2b) then it doesn't sound like
we're achieving the objective initially proposed, are we?

On Mon, Mar 26, 2018 at 3:04 PM, Roberto Peon <fenix@fb.com> wrote:

> There are two sets of entities that we’re greasing.
>
>    1. Middleboxes
>    2. Implementation endpoints.
>
>
>
> #1 is greased whenever multiple versions are spoken by any set of
> clients/servers
>
> #2 is greased whenever the client/server use multiple versions
> simultaneously. There is a subset of the problems space which is
> negotiation. Within negotiation there are two subsets:
>
>    1. Negotiation where the client picks something it likes
>    2. Negotiation where the client must throw away old state and use
>    something new.
>
>
>
> Users incur a hit only when 2b happens. <bad joke> 2b or not 2b, that is
> the question. </bad joke>
> How often we pick 2b is the question. If we’re slowly rotating between
> versions, then how often depends on which path the client uses to know it
> should do QUIC.
> If it is being told to use a version via alt-svc, then we’re unlikely to
> see the QUIC version negotiation happen on the wire.
>
> If it is not told via alt-svc, then, once a week or so (if following my
> example), the client will learn that its version is no longer the version
> the server wishes to speak. It will incur that penalty once per week per
> connection per ip.
>
>
>
> -=R
>
>
>
> *From: *QUIC <quic-bounces@ietf.org> on behalf of Ryan Hamilton <rch=
> 40google.com@dmarc.ietf.org>
> *Date: *Monday, March 26, 2018 at 1:05 PM
> *To: *Roberto Peon <fenix@fb.com>
> *Cc: *Eric Rescorla <ekr@rtfm.com>, IETF QUIC WG <quic@ietf.org>, Mike
> Bishop <mbishop@evequefou.be>
> *Subject: *Re: Exercising Version Negotiation
>
>
>
> So if a client sees Alt-Svc v+, and the server supports v+, then there
> will be no version negotiation. Same for:
>
>   Alt-Svc v- Server supports v-
>
>   Alt-Svc v+, v- Server supports v+, v-
>
> I think we'll only get version negotiation when the client attempts to
> speak a version of QUIC that the server does not support. But the client
> will only attempt to speak a version of QUIC that the server advertises. So
> to get negotiation we need one of:
>
>   Alt-Svc v+,v- Server supports v- (client prefers v+)
>
> ​  ​
>
> Alt-Svc v-
>
> ​, v+​
>
> Server supports v
>
> ​+​ (client prefers v-)
>
> ​If this is the setup, I think that every connection the client makes to
> the server will incur a version negotiation 1-RTT hit. I don't think it
> will be only a single hit per day. Can you explain how this setup will only
> impact the client once per day (for connections to this server?)
>
>
>
> Cheers,
>
>
>
> Ryan
>
>
>
> On Mon, Mar 26, 2018 at 12:18 PM, Roberto Peon <fenix@fb.com> wrote:
>
> I was thinking that you’d advertise different versions based on the client
> IP and day, including the alt-svc stuff, thus (as you point out) the QUIC
> version negotiation logic would match up with the alt-svc logic.
> This depends to some extent on how we actually advertise QUIC in alt-svc
> (e..g. do we advertise all versions, or just say ‘quic’, and let the client
> sort it out?).
>
>
> I’d imagine that 33% of the time, a particular IP will see ALT-SVC: v+,
> and QUIC will negotiate v+. 33% of the time, that IP will see ALT-SVC: v+,
> v- and QUIC will negotiate either, etc.
> I suspect that there are better proposals which could exercise more of the
> state space (v-, v+ advertised instead of v+, v-, etc.), but the overall
> mechanism would be the same—a particular client sees the world as a slowly
> changing rainbow of version combinations.
>
>
>
> -=R
>
>
>
> *From: *Ryan Hamilton <rch@google.com>
> *Date: *Monday, March 26, 2018 at 11:38 AM
> *To: *Roberto Peon <fenix@fb.com>
> *Cc: *Eric Rescorla <ekr@rtfm.com>, IETF QUIC WG <quic@ietf.org>, Mike
> Bishop <mbishop@evequefou.be>
>
>
> *Subject: *Re: Exercising Version Negotiation
>
>
>
> Mixing day as well as client IP into the experiment group function makes
> sense, but it's not clear to me how this only ends up impacted 1 connection
> per day, because of Alt-Svc. Is it your vision that the server will
> advertise v- and v+ for all users, or will the QUIC version negotiation
> logic match up with the Alt-Svc advertisement logic? I ask because if the
> server keeps advertising v- and v+, and the client prefers, say v+, I would
> imagine that the client would attempt to use v+ on each new connection
> attempt.
>
>
>
> On Fri, Mar 23, 2018 at 3:35 PM, Roberto Peon <fenix@fb.com> wrote:
>
> This is roughly what I'm thinking:
>
> auto versions = std::vector<std::string>();
>
> int day = date_as_unix_epoch_in_ms() / ms_in_day;
>
> int day_mod = (day + hash(client_ip)) % 3;
>
> switch (day_mod) {
>
>   case 0:
>
>     versions.push_back("v+");
>
>     break;
>
>   case 1:
>
>     versions.push_back("v-");
>
>     break;
>
>   case 2:
>
>     versions.push_back("v+");
>
>     versions.push_back("v-");
>
>     break;
> }
>
> With such a scheme, the client would incur an extra RTT on a new
> connection once a day.
>
> -=R
> ------------------------------
>
> *From:* QUIC <quic-bounces@ietf.org> on behalf of Ryan Hamilton <rch=
> 40google.com@dmarc.ietf.org>
> *Sent:* Friday, March 23, 2018 3:26:59 PM
> *To:* Roberto Peon
> *Cc:* Eric Rescorla; IETF QUIC WG; Mike Bishop
> *Subject:* Re: Exercising Version Negotiation
>
>
>
> Maybe. :) I'm just trying to get my arms around a concrete proposal. For
> example, if the server always advertises both versions, but only supports 1
> version based on hash(client IP), and those client typically prefer the
> other version, then they'll incur an extra RTT on every connection, which
> seems undesirable. But I'm not sure if that's the proposal.
>
>
>
> On Fri, Mar 23, 2018 at 2:00 PM, Roberto Peon <fenix@fb.com> wrote:
>
> Wouldn’t it be best to do all 3 combinations? ☺
>
> -=R
>
>
>
> *From: *QUIC <quic-bounces@ietf.org> on behalf of Ryan Hamilton <rch=
> 40google.com@dmarc.ietf.org>
> *Date: *Friday, March 23, 2018 at 1:20 PM
> *To: *Eric Rescorla <ekr@rtfm.com>
> *Cc: *IETF QUIC WG <quic@ietf.org>, Mike Bishop <mbishop@evequefou.be>
> *Subject: *Re: Exercising Version Negotiation
>
>
>
> On Fri, Mar 23, 2018 at 1:48 AM, Eric Rescorla <ekr@rtfm.com> wrote:
>
> On Thu, Mar 22, 2018 at 8:53 PM, Ryan Hamilton <rch@google.com> wrote:
>
> Agreed. As specified, I don't see how the server would be induced to send
> a version negotiation packet in this case. Ekr, perhaps you can provide
> some sample flows. If the server supports versions A and B, and the client
> supports versions A and B, then it doesn't matter which version the client
> prefers. In either case, the server supports the version the client is
> attempting to speak and will not send a version negotiation packet.
>
>
>
> I'm not suggesting that you flip the preferences, but rather that the each
> side configure itself with one version for a given connection. This is
> obviously trivial for a client. For the server, you can just hash the
> client's IP address to get a stable choice.
>
>
>
> ​Ah, I misunderstood what you meant by, "We would then suggest to people
> that they somewhat randomize their preferences (e.g., 99% of the time
> prefer v1+i, 1% of the time prefer v1-i)."
>
>
>
> How would you envision this working with Alt-Svc advertisements? Would the
> server advertise support for both versions but only support a single one,
> or would it advertise only the single version?
>
>
>
>
>
>
>