RFC 6556

Testing Eyeball Happiness

πŸ“… published April 2012, from ietf

RFC 6556: Testing Eyeball Happiness πŸ¦‹

okay bestie, this one is from the IETF and it's Informational, so it's not a standards-track spec, it's published for info πŸ’…. It's by F. Baker from Cisco Systems, dated April 2012, and it's part of the ISSN 2070-1721 series. It doesn't list anything it obsoletes or updates, so it's standing on its own 🌸. It's giving "here's a test you can run" energy, not "here's a new protocol" energy ✨.

Abstract

okay so the amount of time it takes to set up a session with the usual transport APIs is a real barrier to IPv6 deployment 😭. This happens in dual-stack networks, and in networks with filtering like the kind proposed in BCP 38 πŸ™ˆ. This note describes a test you can use to check whether an application can reliably set up sessions quickly in messy environments, like dual-stack (IPv4+IPv6) or IPv6 with multiple prefixes and upstream ingress filtering 🧚. The test isn't checking a specific algorithm. It treats the system as a black box and looks at its external behavior, so any algorithm with the intended external behavior passes πŸ’–.

Status of This Memo

this document is not an Internet Standards Track spec, it's published for informational purposes πŸŽ€.

It is a product of the Internet Engineering Task Force (IETF) and represents the consensus of the IETF community 🫢. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). Not every IESG-approved document is a candidate for any level of Internet Standard, so check Section 2 of RFC 5741 if you're curious πŸ€“.

For current status, errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc6556 πŸ”₯.

Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved πŸ’œ.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they describe your rights and restrictions for this document πŸ“œ. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they're provided without warranty as described in the Simplified BSD License 🌈.

Table of Contents

1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
  1.1.  Requirements . . . . . . . . . . . . . . . . . . . . . . .  3
2.  Measuring Eyeball Happiness  . . . . . . . . . . . . . . . . .  3
  2.1.  Happy Eyeballs Test-Bed Configuration  . . . . . . . . . .  4
  2.2.  Happy Eyeballs Test Procedure  . . . . . . . . . . . . . .  5
  2.3.  Metrics for Happy Eyeballs . . . . . . . . . . . . . . . .  7
    2.3.1.  Metric: Session Setup Interval . . . . . . . . . . . .  7
    2.3.2.  Metric: Maximum Session Setup Interval . . . . . . . .  8
    2.3.3.  Metric: Minimum Session Setup Interval . . . . . . . .  8
    2.3.4.  Descriptive Metric: Attempt Pattern  . . . . . . . . .  9
3.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
4.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .  9
5.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  5.1.  Normative References . . . . . . . . . . . . . . . . . . .  9
  5.2.  Informative References . . . . . . . . . . . . . . . . . . 10

1. Introduction

okay so the Happy Eyeballs [RFC6555] spec calls out a problem in deployed multi-prefix IPv6-only and dual-stack networks and proposes a fix πŸ¦‹. [RFC5461] looks at how TCP reacts to so-called "soft errors" (ICMP host and network unreachable messages), points out an issue, and lists some possible solutions πŸ’….

In a dual-stack network (one with both IPv4 [RFC0791] and IPv6 [RFC2460] prefixes and routes), or in an IPv6-only network using multiple prefixes from upstream providers that do BCP 38 ingress filtering [RFC2827], the fact that two hosts use the same address architecture doesn't mean the network has usable routes between them 😭. It also doesn't mean those addresses are useful to the apps involved πŸ™ˆ. Plus, the sockets API [RFC3493] usually describes setting up a session as grabbing a list of possible peer addresses (normally both IPv4 and IPv6) with getaddrinfo() and trying them in order until one works or they all fail 🧚. This naive approach, if you implement it exactly as described, makes the worst-case delay to set up a session way longer than human patience can handle πŸ’€.

This ends up discouraging users from turning on IPv6 in their gear, and it discourages content providers from offering AAAA records for their services πŸ₯².

This note describes a test for how quickly an application can reliably open sessions in messy environments, like dual-stack (IPv4+IPv6) or IPv6 with multiple prefixes and upstream ingress filtering ✨. It's not a test of one specific algorithm. It measures the external behavior of the application and its host system as a black box πŸŽ€. The big "happy eyeballs" question is: how long does it take an app to open a session with a server or peer, under best-case and worst-case conditions? πŸ‘€

The methods here assume that the initial setup of many apps can be summed up by measuring the DNS query/response and the transport-layer handshaking, since no application-layer communication happens without those steps 🌸.

The methods and metrics in this note are ideal for lab work, because you get the most control to change configs fast and get consistent results πŸ§ͺ.

But! If the device under test is run by a single user with limited query and stream generation, there's no worry about overloading production network devices with one "set of eyeballs" πŸ‘οΈ. So these procedures and metrics MAY be applicable to a production network application, as long as the injected traffic matches a single user's typical traffic load, and the testers follow the precautions of that network for reconfiguring devices in production 🫢.

1.1. Requirements

Okay bestie, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] πŸ“œβœ¨.

2. Measuring Eyeball Happiness

this measurement figures out how long an application takes to set up a session with a peer when there's at least one IPv4 prefix and multiple IPv6 prefixes, plus a bunch of different network behaviors 🌈. ISPs are reporting that hosts (Mac OS X, Windows, Linux, FreeBSD, etc.) with more than one address (an IPv4 and an IPv6 address, or two global IPv6 addresses, etc.) may try addresses one at a time, letting each TCP setup time out, which takes several seconds per attempt 😩. People have reported super long session setup times, depending on the app and OS combo, anywhere from multiple seconds to half an hour πŸ’€. The time needed to establish communication between two entities should be roughly the same no matter which type of address gets picked or whether routing works in that specific network πŸ’–. Users expect this time to match what they're used to, or else, happiness is at risk 😭🫢.

2.1. Happy Eyeballs Test-Bed Configuration

okay so here's how the equipment and apps are set up, as shown in Figure 1 πŸ¦‹.

          +--------+ |                      |198.51.100.0/24
          |Protocol| |192.0.2.0/24          |2001:db8:0:2::/64
          |Analyzer+-+2001:db8:1:0::/64     |2001:db8:1:4::/64
          +--------+ |2001:db8:0:1::/64     |2001:db8:2:4::/64
                     |                      |
             +-----+ |                      | +-----+
             |Alice+-+                      +-+ Bob |
             +-----+ | +-------+  +-------+ | +-----+
                     +-+Router1|  |Router2+-+
             +-----+ | +-----+-+  +-+-----+ |
             | DNS +-+       |      |       |
             +-----+ |      -+------+-      |
                     |    203.0.113.0/24    |
                     |    2001:db8:0:3::/64 |

Figure 1: Generic Test Environment

Alice is the unit being measured, the computer running the process that sets up a session with Bob for the app in question πŸŽ€. DNS is shown as a separate system in the diagram, and so is the protocol analyzer that watches Alice's traffic πŸ‘€. This isn't strictly required. If one computer can run tcpdump and a DNS server process, and for that matter can also cover the routers, that's totally fine 🌸. The units are split up in the test just to keep things clear ✨.

On each test run, Router 1 gets configured to allow only one route to work πŸ’…. There are a bunch of ways to do this, including but not limited to installing:

  • a filter that drops datagrams to Bob, resulting in an ICMP "administratively prohibited",
  • a filter that silently drops datagrams to Bob,
  • a null route or removing the route to one of Bob's prefixes, resulting in an ICMP "destination unreachable", and
  • a middleware program that responds with a TCP RST.
  • Path MTU issues

okay the Path MTU Discovery [RFC1191] [RFC1981] thing needs a little explaining 🧚. With IPv6, and with IPv4 when "Do Not Fragment" is set, a router with a message too large for an interface throws it away and replies with an ICMPv4 "Destination Unreachable: Datagram Too Big" or an ICMPv6 "Packet Too Big" 😭. If that packet gets lost, the source doesn't know what size to fragment to and has no sign that fragmentation is needed πŸ’€. For this scenario, you'd set the MTU on 203.0.113.0/24 or 2001:db8:0:3::/64 to the smallest value the address family allows (576 or 1280), and turn off generation of the matching ICMP message πŸ™ˆ. Note that [RFC4821] is meant to fix these issues 🫢.

The tester should try different methods to see whether changes in this config make a difference in the test πŸ”₯. For example, an app might respond differently to a TCP RST than to a silent packet loss πŸ‘€. Each of these scenarios should be tested. If that's too difficult, the most important one is silent packet loss, because it's the worst case πŸ’œ.

2.2. Happy Eyeballs Test Procedure πŸ’…

Okay so picture the network from Section 2.1 πŸŽ€. Alice and Bob each have one or more IPv4 addresses and two or more IPv6 addresses. Bob's addresses are in DNS so Alice can find them 🫢. Alice's and everyone else's might be in there too, but they're not relevant to the test, so we can ignore them. Routers 1 and 2 are configured to route the relevant prefixes 🚦.

Each measurement trial revises an access list or null route in Router 1 so that traffic from Alice to Bob is blocked for every address except one. If Bob has N addresses in total, we run the measurement at least N times, and each time exactly one address gets to enjoy end-to-end communication πŸ¦‹. If the DNS service randomizes the order of the addresses, this might not give us a test where Alice connects to all of them. In that case, the test has to be repeated until, in at least one instance, a TCP SYN (or its equivalent) is seen for each relevant address 😭. The tester either should flush the resolver cache between iterations to force repeated DNS resolution, or should wait for at least the DNS RR TTL on each resource record. If the tester waits, they should also check that DNS re-resolves. If it doesn't, the application isn't using DNS correctly πŸ’€.

This specification assumes common LAN technology with no competing traffic and nominal propagation delays, so those delays aren't a factor in the measurement 🌸.

The goal is to measure how long it takes to establish a session ⏱️. This covers the time from Alice's first DNS request, through one or more attempts to establish a session, until the session is established, as seen in the LAN trace. The simplest way to measure this is to put a traffic analyzer on Alice's point of attachment and capture the messages Alice exchanges.

 DNS Server                   Alice                    Bob
     |                          |                       |
 1.  |<--www.example.com A------|                       |
 2.  |<--www.example.com AAAA---|                       |
 3.  |---198.51.100.1---------->|                       |
 4.  |---2001:db8:0:2::1------->|                       |
 5.  |                          |                       |
 6.  |                          |--TCP SYN, IPv6--->X   |<***********
 7.  |                          |--TCP SYN, IPv6--->X   |     |
 8.  |                          |--TCP SYN, IPv6--->X   | TCP 3wHS
 9.  |                          |                       |   Time
10.  |                          |--TCP SYN, IPv4------->|(any family)
11.  |                          |<-TCP SYN+ACK, IPv4----|     |
12.  |                          |--TCP ACK, IPv4------->|<***********

                  Figure 2: Message Flow Using TCP

In a TCP-based application (Figure 2), the measurement runs from the DNS request (line 1) through the first completed TCP three-way handshake (line 12), which is abbreviated "3wHS" above 🧠.

 DNS Server                   Alice                    Bob
      |                          |                       |
  1.  |<--www.example.com A------|                       |
  2.  |<--www.example.com AAAA---|                       |
  3.  |---198.51.100.1---------->|                       |
  4.  |---2001:db8:0:2::1------->|                       |
  5.  |                          |                       |
  6.  |                          |--UDP Request, IPv6-->X|<---------
  7.  |                          |--UDP Request, IPv6-->X|  first
  8.  |                          |--UDP Request, IPv6-->X|  request/
  9.  |                          |                       |  response
 10.  |                          |--UDP Request, IPv4--->|  success
 11.  |                          |<-UDP Response, IPv4---|<---------

                  Figure 3: Message Flow Using UDP

In a UDP-based application (Figure 3), the measurement runs from the DNS request (line 1) through one or more UDP Requests (lines 6-10) until a UDP Response is seen (line 11) πŸ“¨.

When other transports are used, the methodology has to be specified in context. It should measure the same event ✨.

2.3. Metrics for Happy Eyeballs πŸ“Š

The measurements are the duration from the initial DNS request until the session is seen to be established, as described in Section 2.2 ⏳. We care most about the shortest and longest durations. These will most likely be the ones that send one SYN and succeed, and the ones that send a SYN to each possible address before one attempt succeeds 🏁. We also care about the pattern of attempts sent to different addresses. That pattern might be as simple as sending an attempt every <time interval>, or it might be more complex, so this part is partly descriptive 🎨.

ALL measurement events on the sending and receiving of messages SHALL be observed at Alice's attachment point, and timestamps SHOULD be applied upon reception of the last bit of the IP information field πŸ“. If an alternate timing reference is used, that SHALL be noted πŸ“.

2.3.1. Metric: Session Setup Interval πŸŽ€

Name: Session Setup Interval

Description: The session setup interval MUST be the time beginning with the first DNS query sent (observed at Alice's attachment) and ending with successful transport connection establishment (as indicated in line 12 of Figure 2 and line 11 of Figure 3). This interval is defined as the session setup interval πŸ’–.

This test will be run several times, once for each possible combination of destination address (configured on Bob) and failure mode (configured on Router 1) πŸ”.

Methodology: In the LAN analyzer trace, note the times of the initial DNS request and the confirmation that the session is open, as described in Section 2.2. If the session isn't successfully opened, possibly because Alice aborted the attempt, the Session Setup Interval is considered to be infinite ♾️.

Units: Session setup time is measured in milliseconds.

Measurement Point(s): The measurement point is at Alice's LAN interface, both sending and receiving. It's observed using a program such as tcpdump running on Alice, or an external analyzer πŸ”.

Timing: The measurement program or external analyzer MUST run for a duration sufficient to capture the entire message flow described in Section 2.2. Measurement precision MUST be sufficient to maintain no more than 0.1 ms error over a 60-second interval. 1 part per million (ppm) precision would suffice 🎯.

2.3.2. Metric: Maximum Session Setup Interval πŸ‘‘

Name: Maximum Session Setup Interval

Description: The maximum session setup interval is the longest period of time observed for establishing a session, as described in Section 2.3.1 πŸ”οΈ.

Methodology: See Session Setup Interval.

Units: Session setup time is measured in milliseconds.

Measurement Point(s): See Session Setup Interval.

Timing: The measurement program or external analyzer MUST run for a duration sufficient to capture the entire message flow described in Section 2.2. Measurement precision MUST be sufficient to maintain no more than 0.1 ms error over a 60-second interval. 1 ppm precision would suffice πŸ’….

2.3.3. Metric: Minimum Session Setup Interval πŸ¦‹

Name: Minimum Session Setup Interval

Description: The minimum session setup interval is the shortest period of time observed for establishing a session πŸƒβ€β™€οΈ.

Methodology: See Session Setup Interval.

Units: Session setup time is measured in milliseconds.

Measurement Point(s): See Session Setup Interval.

Timing: The measurement program or external analyzer MUST run for a duration sufficient to capture the entire message flow described in Section 2.2. Measurement precision MUST be sufficient to maintain no more than 0.1 ms error over a 60-second interval. 1 ppm precision would suffice 🌈.

2.3.4. Descriptive Metric: Attempt Pattern 🧚

Name: Attempt pattern

Description: The attempt pattern describes the observed pattern of attempts to establish the session. In simple cases, it might be something like "Initial TCP SYNs to a new address were observed every <so many> milliseconds". In more complex cases, it might be something like "Initial TCP SYNs in IPv6 were observed every <so many> milliseconds, and other TCP SYNs using IPv4 were observed every <so many> milliseconds, but the two sequences were independent." It can also comment on retransmission patterns if they're observed πŸ‘€.

Methodology: The traffic trace is analyzed to determine the pattern of initiation πŸ•΅οΈβ€β™€οΈ.

Units: milliseconds.

Measurement Point(s): The measurement point is at Alice's LAN interface, observed using a program such as tcpdump running on Alice, or an external analyzer.

Timing: The measurement program or external analyzer MUST run for a duration sufficient to capture the entire message flow described in Section 2.2. Measurement precision MUST be sufficient to maintain no more than 0.1 ms error over a 60-second interval. 1 ppm precision would suffice 🫧.

3. Security Considerations πŸ”

This note doesn't address security-related issues. Yes, really πŸ’€. Anyone implementing or deploying these measurements should keep that in mind.

4. Acknowledgements 🫢

This note was discussed with Dan Wing, Andrew Yourtchenko, and Fernando Gont. In the Benchmark Methodology Working Group, Al Morton, David Newman, Sarah Banks, and Tore Anderson made comments. Thank you all, you're literally the best πŸ’–.

5. References πŸ“š

5.1. Normative References

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC6555]  Wing, D. and A. Yourtchenko, "Happy Eyeballs: Success with
           Dual-Stack Hosts", RFC 6555, April 2012.

5.2. Informative References

[RFC0791]  Postel, J., "Internet Protocol", STD 5, RFC 791,
           September 1981.

[RFC1191]  Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191,
           November 1990.

[RFC1981]  McCann, J., Deering, S., and J. Mogul, "Path MTU Discovery
           for IP version 6", RFC 1981, August 1996.

[RFC2460]  Deering, S. and R. Hinden, "Internet Protocol, Version 6
           (IPv6) Specification", RFC 2460, December 1998.

[RFC2827]  Ferguson, P. and D. Senie, "Network Ingress Filtering:
           Defeating Denial of Service Attacks which employ IP Source
           Address Spoofing", BCP 38, RFC 2827, May 2000.

[RFC3493]  Gilligan, R., Thomson, S., Bound, J., McCann, J., and W.
           Stevens, "Basic Socket Interface Extensions for IPv6",
           RFC 3493, February 2003.

[RFC4821]  Mathis, M. and J. Heffner, "Packetization Layer Path MTU
           Discovery", RFC 4821, March 2007.

[RFC5461]  Gont, F., "TCP's Reaction to Soft Errors", RFC 5461,
           February 2009.

Author's Address 🧚

Fred Baker
Cisco Systems
Santa Barbara, California  93117
USA

EMail: fred@cisco.com
πŸ“¦ where this page comes from