Re: [v6ops] An Update to Happy Eyeballs

Stuart Cheshire <cheshire@apple.com> Thu, 16 March 2017 20:09 UTC

Return-Path: <cheshire@apple.com>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 81150129A47 for <v6ops@ietfa.amsl.com>; Thu, 16 Mar 2017 13:09:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.302
X-Spam-Level:
X-Spam-Status: No, score=-4.302 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.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 TQBLHOeiC1g6 for <v6ops@ietfa.amsl.com>; Thu, 16 Mar 2017 13:09:04 -0700 (PDT)
Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (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 F3848129A41 for <v6ops@ietf.org>; Thu, 16 Mar 2017 13:09:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1489694943; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IMfslgQJpCp4Apjd10tFzi1YCvbAl1Cup43xp2EbRD4=; b=XZE2459dqFIRnZl3rToN6TBCsQVjrzdp1a3aCIkxlofNcpDh2LsCHrNLytaA20CY mXR3keAMQth9glUIw74jSSxjtauWR5TnA7U84MKQGDGtfMC8nMTnpaWVmQLIhovc ffY8Xya/ogF9ueV8Ihy1mSGVe8JgmoM7xK9QrQ70LuZecOCeqMEkq7CcOF+LhCKC +NPVPi3+1GB5J3iJ1J/U6L4jQJqN4o341cCX1IM6BKs386TZmSJa5xL5KPWlku7d sqZAKKbgS2yR/NdUlPZOoV5VXWbXsYvZaJuntusf8dYTG4Aezi63Lfjj40torhCz Pz5h1wtfZMOYdQSc3x260w==;
Received: from relay3.apple.com (relay3.apple.com [17.128.113.83]) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id 70.61.10350.FD0FAC85; Thu, 16 Mar 2017 13:09:03 -0700 (PDT)
X-AuditID: 11973e13-20aae9a00000286e-32-58caf0df6929
Received: from jimbu (jimbu.apple.com [17.151.62.37]) by relay3.apple.com (Apple SCV relay) with SMTP id 1C.54.01494.FD0FAC85; Thu, 16 Mar 2017 13:09:03 -0700 (PDT)
MIME-version: 1.0
Content-type: text/plain; charset="utf-8"
Received: from [17.226.23.37] (unknown [17.226.23.37]) by jimbu.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OMX00EV5BZ3W140@jimbu.apple.com>; Thu, 16 Mar 2017 13:09:03 -0700 (PDT)
Sender: cheshire@apple.com
From: Stuart Cheshire <cheshire@apple.com>
In-reply-to: <CAJE_bqfrBpZ48bNqCpFApHCq-+vjXesE1ig60gO=JXy1Z_3DRw@mail.gmail.com>
Date: Thu, 16 Mar 2017 13:09:57 -0700
Cc: David Schinazi <dschinazi@apple.com>, IPv6 Operations <v6ops@ietf.org>
Content-transfer-encoding: quoted-printable
Message-id: <FFB7DE88-FC6E-45FD-8CDB-1C009F57E778@apple.com>
References: <148899860042.20118.391380898590855642.idtracker@ietfa.amsl.com> <A609BABB-BDF2-4CCB-8452-F489C019748C@apple.com> <m1clvfj-0000FCC@stereo.hq.phicoh.net> <ABE752F6-895B-431C-9E94-E0CD2FDDB2E3@apple.com> <m1cmTQX-0000IcC@stereo.hq.phicoh.net> <92EEB875-288D-4CF9-B81F-3B5C8EA49F53@apple.com> <CAJE_bqfrBpZ48bNqCpFApHCq-+vjXesE1ig60gO=JXy1Z_3DRw@mail.gmail.com>
To: 神明達哉 <jinmei@wide.ad.jp>
X-Mailer: Apple Mail (2.3124)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsUi2FAYrHv/w6kIg3WXjC0W7T7AZnH62F5m ByaPJUt+MnnsfXqMLYApissmJTUnsyy1SN8ugSvjyYqtTAVzJCr6F7cyNzC+FOpi5OSQEDCR aFjwj72LkYtDSGAvo8SWifNYYRJ/Z9xkhUgsY5S4fK8TLMErICjxY/I9li5GDg5mAXWJKVNy IWr+Mkocm9PJBlIjLCAl8WrlZ2aQGmEBA4mf9zNBwmwCWhIvPl8BK+EUCJZYuqmFEcRmEVCV ODVrGwuIzSzgJXH6zFomCFtb4sm7C1BrbSQ630yGuucfk8TVmY/BbhABOnTTAyeIm2Ulnpxc xAJSIyHQyCbx/fA9tgmMwrOQnD0L4exZSFYsYGRexSiUm5iZo5uZZ6qXWFCQk6qXnJ+7iREU 2NPthHcwnl5ldYhRgINRiYdXYP6pCCHWxLLiytxDjNIcLErivNyLT0QICaQnlqRmp6YWpBbF F5XmpBYfYmTi4JRqYFypl/qwu8T869JPy022m+4R3HnLyjz05ZlqDi0B13MVnwvkVQqtjVP/ zNrCaOdYZvp2wSXhFNZW15JvAWmzKp50FV/u2bdlWpPD8odMe46ENvi/v2sdecrfIGqah9pm lblB7Z+j3szOcvVx99R5fIJ1/u3qpEx7A7+J/98FRv1hP3zv9d4vKUosxRmJhlrMRcWJANZE Qc5NAgAA
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsUiON1OVff+h1MRBjtnaFgs2n2AzeL0sb3M DkweS5b8ZPLY+/QYWwBTFJdNSmpOZllqkb5dAlfGkxVbmQrmSFT0L25lbmB8KdTFyMkhIWAi 8XfGTdYuRi4OIYFljBKX73WygiR4BQQlfky+x9LFyMHBLKAuMWVKLkTNX0aJY3M62UBqhAWk JF6t/MwMUiMsYCDx834mSJhNQEvixecrYCWcAsESSze1MILYLAKqEqdmbWMBsZkFvCROn1nL BGFrSzx5dwFqrY1E55vJUPf8Y5K4OvMx2A0iQIdueuAEcbOsxJOTi1gmMArMQnLpLIRLZyGZ uoCReRWjQFFqTmKlsV5iQUFOql5yfu4mRlAgNhQG72D8s8zqEKMAB6MSD2/GwlMRQqyJZcWV uYcYJTiYlUR4wx8AhXhTEiurUovy44tKc1KLDzFKc7AoifP+0joZISSQnliSmp2aWpBaBJNl 4uCUamB042bVe2L4eGnUug9+b9P998gdeG29weLQTLdzjRsedWV87oy8GM4Vscx5arm1xsHP 72oumU1KumurdO0GR9A815o3JpOvqJW7bJ8zpUv//9FjfzLiUxg5NC3+qV8Jy5/hWiJ0JnuG /APJHUkarro6zi5iAY8N7A7+luV7snXyTYNN7wVmZq9VYinOSDTUYi4qTgQAYmWfnkACAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/v6ops/SfE-e91Ku6KS3daggRokuTeakxc>
Subject: Re: [v6ops] An Update to Happy Eyeballs
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/v6ops/>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Mar 2017 20:09:05 -0000

On 15 Mar 2017, at 17:00, 神明達哉 <jinmei@wide.ad.jp> wrote:

> I have one quick (and minor) question about the 01 version: in Section
> 6 it states
> 
>   If, during the course of connection establishment, the DNS answers
>   change either by adding resolved addresses, or removing previously
>   resolved addresses (for example, due to expiry of the TTL on that DNS
>   record), the client should react based on its current progress.
> 
> Specifically what kind of scenario does this intend to imply?  For
> example, consider the following scenario:
> 
> 1. start a AAAA query for a destination name
> 2. start an A query for the same name almost at the same time
> 3. get a response to the AAAA query (set of IPv6 addresses)
> 4. start establishing a connection for one of the IPv6 addresses
> 5. get a response to the A query (set of IPv4 addresses)
> 
> At step 5, DNS resolution is fully completed.

No, DNS resolution is not fully completed at step 5. In this asynchronous model (as used in Apple products for many years) DNS resolution is an ongoing process, which continues until the client has successfully made a connection, and only stops when the client tells the DNS engine that it can stop.

Many web sites use DNS records with fairly short TTLs, which allows them to update answers fairly rapidly.

If a server is down or overloaded, they can remove that address from the answer set, and substitute another. Thus the set of answers changes over time. The Apple DNS APIs take this passage of time into account, and notify clients as the set of answers changes, via “add” and “remove” events. If a client has been trying to connect for some time, unsuccessfully, and then another IP address becomes available, that address is added to the set of candidates, and may be the one that actually works.

You can easily see this for yourself, e.g., using www.google.com, or www.microsoft.com.

Here are two examples (using IPv4 only, for readability).

You will see that at 12:47:10 the IP address 172.217.6.68 for Google was withdrawn, and replaced by 216.58.194.164.

At 12:47:16 the IP address 104.82.49.139 for Microsoft was withdrawn, and replaced by 173.222.250.151.

% dns-sd -G v4 www.google.com
DATE: ---Thu 16 Mar 2017---
12:47:02.843  ...STARTING...
Timestamp     A/R Flags if Hostname                     Address
12:47:02.845  Add     2  0 www.google.com.              172.217.6.68
12:47:10.854  Rmv     1  0 www.google.com.              172.217.6.68
12:47:10.855  Add     2  0 www.google.com.              216.58.194.164

% dns-sd -G v4 www.microsoft.com
DATE: ---Thu 16 Mar 2017---
12:46:41.253  ...STARTING...
Timestamp     A/R Flags if Hostname                     Address
12:46:41.256  Add     2  0 e1863.dspb.akamaiedge.net.   104.82.49.139
12:47:16.139  Rmv     1  0 e1863.dspb.akamaiedge.net.   104.82.49.139
12:47:16.139  Add     2  0 e1863.dspb.akamaiedge.net.   173.222.250.151

Stuart Cheshire