Re: [v6ops] An Update to Happy Eyeballs

Tommy Pauly <tpauly@apple.com> Fri, 10 March 2017 17:29 UTC

Return-Path: <tpauly@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 251171299A0 for <v6ops@ietfa.amsl.com>; Fri, 10 Mar 2017 09:29:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 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_NONE=-0.0001, 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 NOJHxtpVAdyp for <v6ops@ietfa.amsl.com>; Fri, 10 Mar 2017 09:29:57 -0800 (PST)
Received: from mail-in25.apple.com (mail-out25.apple.com [17.171.2.35]) (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 82F981296A3 for <v6ops@ietf.org>; Fri, 10 Mar 2017 09:29:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1489166996; 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=G1xQ1PHZ0JMCGOEwNswB8VUu8pwxvC3fWvy91Wz1omQ=; b=oKKiN0OrNvrDI/GeeTFCMsL1p566cIWYFRpXfyDUPnKapmVKqMdgm+JY5+OVB59E eFn3YC3vQLKH4AmJ2OchZ6CiUq0FaqOE/qsCGIQEdsd9SJLEnoeYF2pr0cS+QhbH sPp2/5SeecV/uD0Hw1qzyWj1GXgxuOkVlvmElIvIiVZ9ETUQZlOaKaYW4blpmqTm Q/jCV0MCKN0NPnNz+qSrSxtCJZRoHOcU7TmbyBlymCKv33LvPZTQ7aoZqoJ+pjQq rIvfT6B3epiT/Uog7tloYjadxBDD4ltFP6P6tcDW7s02BwbL43VTPN1YFzeWvP+z YQ4+pkpFbOwPYIxkjRDzXg==;
Received: from relay7.apple.com (relay7.apple.com [17.128.113.101]) by mail-in25.apple.com (Apple Secure Mail Relay) with SMTP id 3F.D7.01140.492E2C85; Fri, 10 Mar 2017 09:29:56 -0800 (PST)
X-AuditID: 11ab0219-e38b39a000000474-58-58c2e294f208
Received: from nwk-mmpp-sz11.apple.com (nwk-mmpp-sz11.apple.com [17.128.115.155]) by relay7.apple.com (Apple SCV relay) with SMTP id 22.1C.10079.492E2C85; Fri, 10 Mar 2017 09:29:56 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7bit
Content-type: text/plain; CHARSET="US-ASCII"
Received: from [17.226.23.61] (unknown [17.226.23.61]) by nwk-mmpp-sz11.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OMM00DD90LVAT00@nwk-mmpp-sz11.apple.com>; Fri, 10 Mar 2017 09:29:55 -0800 (PST)
Sender: tpauly@apple.com
From: Tommy Pauly <tpauly@apple.com>
In-reply-to: <m1clvfj-0000FCC@stereo.hq.phicoh.net>
Date: Fri, 10 Mar 2017 09:29:55 -0800
Message-id: <ABE752F6-895B-431C-9E94-E0CD2FDDB2E3@apple.com>
References: <148899860042.20118.391380898590855642.idtracker@ietfa.amsl.com> <A609BABB-BDF2-4CCB-8452-F489C019748C@apple.com> <m1clvfj-0000FCC@stereo.hq.phicoh.net>
To: Philip Homburg <pch-v6ops-6@u-1.phicoh.com>
X-Mailer: Apple Mail (2.3263)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJLMWRmVeSWpSXmKPExsUi2FCYqjvl0aEIg/dP9Cxuz7/AZHH62F5m ByaPJUt+Mnm82+QQwBTFZZOSmpNZllqkb5fAlbFv5SzGgkXiFct2tbM3MHYIdzFyckgImEgc 3LOGsYuRi0NIYD+jxJ5H75hhEvNmbWKFSBxilDi5+Qs7SIJXQFDix+R7LF2MHBzMAvISB8/L goSZBbQkvj9qZYGo72eSWPRlFjtIjbCAhMTmPYkQpoHEz/uZIOVsAioSx79tAFvFKWAsMe3w fmaQEhYBVYmmexoQE4UkFl/7zgix1Ebi6u+7TBDTVzBKzFz/hgUkISKgL9HyeAMrxMmyEt0L pzGDFEkILGGT2P1nH8sERuFZSK6ehXD1LCRXL2BkXsUonJuYmaObmWdkqpdYUJCTqpecn7uJ ERTWq5kkdzB+fW14iFGAg1GJh7dg/6EIIdbEsuLK3EOM0hwsSuK82fsPRggJpCeWpGanphak FsUXleakFh9iZOLglGpg5IrdlP7vpGzkAfaTv3R3friydJZpbOX9KAXDrWseGyw9JPNmZdpU ueyYtZVptaweRoIeEp6LP6lHzFqWqHU1WmnX0qXeax6KSpZ8fndT63hB2UGz12+4dDPq51S2 B/06fMN35TI+jayO8r1v1ppcWqIU5K2nm/ljW+/xOdbzrvrvk466vTxWRomlOCPRUIu5qDgR ANliwmVMAgAA
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42IRbCierTvl0aEIg5YVfBa3519gsjh9bC+z A5PHkiU/mTzebXIIYIrisklJzcksSy3St0vgyti3chZjwSLximW72tkbGDuEuxg5OSQETCTm zdrE2sXIxSEkcIhR4uTmL+wgCV4BQYkfk++xdDFycDALyEscPC8LEmYW0JL4/qiVBaK+n0li 0ZdZ7CA1wgISEpv3JEKYBhI/72eClLMJqEgc/7aBGcTmFDCWmHZ4PzNICYuAqkTTPQ2IiUIS i699Z4RYaiNx9fddJojpKxglZq5/wwKSEBHQl2h5vIEV4mRZie6F05gnMArMQnLoLIRDZyE5 dAEj8ypGgaLUnMRKc73EgoKcVL3k/NxNjOAgLEzdwdi43OoQowAHoxIPb8LGQxFCrIllxZW5 wJDgYFYS4d14HSjEm5JYWZValB9fVJqTWnyIsQro/onMUqLJ+cAIySuJNzQxMTAxNjYzNjY3 MaeKsJI4b9zrgxFCAumJJanZqakFqUUwy5k4OKUaGPdt1K+cMeWkdv2fRLbDAbIdFfW2ej3H yoW27Itzfq1edCpiQc7acice17UdhSoN2aua5ST3nqsX6LDS8uA4Kf/idk/xkaese+yvm15L Va5dUyl4ccoV5ragD6mldpte9j56+e/aFNnbgmo6/Trrs/b+2jE1adOvHeqCXjXvG7k+npq1 KGf+NSWW4oxEQy3mouJEAA4KgpudAgAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/v6ops/PR-tBkejTfYHbPkxQeV6GJu80JY>
Cc: v6ops@ietf.org
Subject: Re: [v6ops] An Update to Happy Eyeballs
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.17
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: Fri, 10 Mar 2017 17:29:59 -0000

Hi Philip,

As James mentioned, getaddrinfo isn't technically an IETF standardized API. There are many networking APIs that are based on asynchronously handling DNS responses. We can certainly soften some of the language to make it clear that if your system has no such option, you are not necessarily out of spec, but if such an option is available, we believe that it SHOULD indeed be used. This fits with the Happy Eyeballs paradigm: if I am waiting for one of the DNS responses to come back, I could have already made my connection in that time, getting the user the resource loaded more quickly.

To the point of how often this situation occurs, we have done a lot of measurements in our stack. The approach documented in this document is essentially the algorithm that we have implemented for Apple devices. We do observe that fairly often, when DNS results are not already cached, one result (AAAA) may be returned asynchronously, and the TCP connection can be fully established before the other result (A) is returned. Using this algorithm, even if it only helps in a small percentage of overall connections, is a big win.

For those who are interested, I'd like to also point to some work going on in TAPS that build upon Happy Eyeballs to do connection racing and use asynchronous APIs to get wins not just in IPv4-vs-IPv6, but between paths, interfaces, and other protocols (and hopefully make it easier to application developers to write their networking code in the process):
https://tools.ietf.org/html/draft-pauly-taps-guidelines-00
https://tools.ietf.org/html/draft-trammell-taps-post-sockets-00

Thanks,
Tommy

> On Mar 9, 2017, at 2:51 AM, Philip Homburg <pch-v6ops-6@u-1.phicoh.com> wrote:
> 
>> Tommy Pauly and myself have written up what we've learned
>> in the past few years maintaining and improving Apple's Happy Eyeballs stack,
>> and submitted it as draft-pauly-v6ops-happy-eyeballs-update.
> 
> The draft says: Intended status: Standards Track
> 
> With that in mind I would prefer splitting the DNS and the connection
> parts over two different drafts.
> 
> The reason is two fold:
> 1) The only API that we standardized (getaddrinfo) cannot support the required
>   behavior. So an application would have to choose between using a standard
>   API or implementing happy eyeballs.
> 2) In my experience, AAAA hardly ever times out. (I wanted to write 'fail',
>   but failure, as in not returning the correct AAAA can be close to 1%. But
>   as long as there is no delay, it doesn't matter for happy eyeballs).
> 
> I think setting up tcp connections in staggered fashion is highly useful. 
> Writing code that gets triggered by DNS responses coming is not supported by
> standard APIs and may make code needlessly complex. So we should not require
> such behavior.
> 
> 
> _______________________________________________
> v6ops mailing list
> v6ops@ietf.org
> https://www.ietf.org/mailman/listinfo/v6ops