draft-ietf-taps-arch-06.txt   draft-ietf-taps-arch-07.txt 
TAPS Working Group T. Pauly, Ed. TAPS Working Group T. Pauly, Ed.
Internet-Draft Apple Inc. Internet-Draft Apple Inc.
Intended status: Standards Track B. Trammell, Ed. Intended status: Standards Track B. Trammell, Ed.
Expires: 25 June 2020 Google Expires: 10 September 2020 Google
A. Brunstrom A. Brunstrom
Karlstad University Karlstad University
G. Fairhurst G. Fairhurst
University of Aberdeen University of Aberdeen
C. Perkins C. Perkins
University of Glasgow University of Glasgow
P. Tiesel P. Tiesel
TU Berlin TU Berlin
C. Wood C. Wood
Apple Inc. Apple Inc.
23 December 2019 9 March 2020
An Architecture for Transport Services An Architecture for Transport Services
draft-ietf-taps-arch-06 draft-ietf-taps-arch-07
Abstract Abstract
This document describes an architecture for exposing transport This document describes an architecture for exposing transport
protocol features to applications for network communication, the protocol features to applications for network communication, the
Transport Services architecture. The Transport Services Application Transport Services architecture. The Transport Services Application
Programming Interface (API) is based on an asynchronous, event-driven Programming Interface (API) is based on an asynchronous, event-driven
interaction pattern. It uses messages for representing data transfer interaction pattern. It uses messages for representing data transfer
to applications, and it assumes an implementation that can use to applications, and it assumes an implementation that can use
multiple IP addresses, multiple protocols, and multiple paths, and multiple IP addresses, multiple protocols, and multiple paths, and
skipping to change at page 2, line 4 skipping to change at page 2, line 4
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 25 June 2020. This Internet-Draft will expire on 10 September 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
skipping to change at page 2, line 41 skipping to change at page 2, line 41
3.1. Common APIs for Common Features . . . . . . . . . . . . . 9 3.1. Common APIs for Common Features . . . . . . . . . . . . . 9
3.2. Access to Specialized Features . . . . . . . . . . . . . 9 3.2. Access to Specialized Features . . . . . . . . . . . . . 9
3.3. Scope for API and Implementation Definitions . . . . . . 10 3.3. Scope for API and Implementation Definitions . . . . . . 10
4. Transport Services Architecture and Concepts . . . . . . . . 11 4. Transport Services Architecture and Concepts . . . . . . . . 11
4.1. Transport Services API Concepts . . . . . . . . . . . . . 12 4.1. Transport Services API Concepts . . . . . . . . . . . . . 12
4.1.1. Connections and Related Objects . . . . . . . . . . . 14 4.1.1. Connections and Related Objects . . . . . . . . . . . 14
4.1.2. Pre-Establishment . . . . . . . . . . . . . . . . . . 15 4.1.2. Pre-Establishment . . . . . . . . . . . . . . . . . . 15
4.1.3. Establishment Actions . . . . . . . . . . . . . . . . 16 4.1.3. Establishment Actions . . . . . . . . . . . . . . . . 16
4.1.4. Data Transfer Objects and Actions . . . . . . . . . . 17 4.1.4. Data Transfer Objects and Actions . . . . . . . . . . 17
4.1.5. Event Handling . . . . . . . . . . . . . . . . . . . 18 4.1.5. Event Handling . . . . . . . . . . . . . . . . . . . 18
4.1.6. Termination Actions . . . . . . . . . . . . . . . . . 18 4.1.6. Termination Actions . . . . . . . . . . . . . . . . . 19
4.2. Transport System Implementation Concepts . . . . . . . . 19 4.1.7. Connection Groups . . . . . . . . . . . . . . . . . . 19
4.2. Transport Services Implementation Concepts . . . . . . . 19
4.2.1. Candidate Gathering . . . . . . . . . . . . . . . . . 20 4.2.1. Candidate Gathering . . . . . . . . . . . . . . . . . 20
4.2.2. Candidate Racing . . . . . . . . . . . . . . . . . . 20 4.2.2. Candidate Racing . . . . . . . . . . . . . . . . . . 21
4.2.3. Protocol Stack Equivalence . . . . . . . . . . . . . 21 4.2.3. Protocol Stack Equivalence . . . . . . . . . . . . . 21
4.2.4. Separating Connection Groups . . . . . . . . . . . . 22 4.2.4. Separating Connection Groups . . . . . . . . . . . . 23
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23
6. Security Considerations . . . . . . . . . . . . . . . . . . . 23 6. Security Considerations . . . . . . . . . . . . . . . . . . . 24
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 24 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 24
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 24 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.1. Normative References . . . . . . . . . . . . . . . . . . 24 8.1. Normative References . . . . . . . . . . . . . . . . . . 25
8.2. Informative References . . . . . . . . . . . . . . . . . 24 8.2. Informative References . . . . . . . . . . . . . . . . . 25
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction 1. Introduction
Many application programming interfaces (APIs) to perform transport Many application programming interfaces (APIs) to perform transport
networking have been deployed, perhaps the most widely known and networking have been deployed, perhaps the most widely known and
imitated being the BSD Socket [POSIX] interface. The naming of imitated being the BSD Socket [POSIX] interface (Socket API). The
objects and functions across these APIs is not consistent, and varies naming of objects and functions across these APIs is not consistent,
depending on the protocol being used. For example, sending and and varies depending on the protocol being used. For example,
receiving streams of data is conceptually the same for both an sending and receiving streams of data is conceptually the same for
unencrypted Transmission Control Protocol (TCP) stream and operating both an unencrypted Transmission Control Protocol (TCP) stream and
on an encrypted Transport Layer Security (TLS) [RFC8446] stream over operating on an encrypted Transport Layer Security (TLS) [RFC8446]
TCP, but applications cannot use the same socket "send()" and stream over TCP, but applications cannot use the same socket "send()"
"recv()" calls on top of both kinds of connections. Similarly, and "recv()" calls on top of both kinds of connections. Similarly,
terminology for the implementation of transport protocols varies terminology for the implementation of transport protocols varies
based on the context of the protocols themselves: terms such as based on the context of the protocols themselves: terms such as
"flow", "stream", "message", and "connection" can take on many "flow", "stream", "message", and "connection" can take on many
different meanings. This variety can lead to confusion when trying different meanings. This variety can lead to confusion when trying
to understand the similarities and differences between protocols, and to understand the similarities and differences between protocols, and
how applications can use them effectively. how applications can use them effectively.
The goal of the Transport Services architecture is to provide a The goal of the Transport Services architecture is to provide a
common, flexible, and reusable interface for transport protocols. As common, flexible, and reusable interface for transport protocols. As
applications adopt this interface, they will benefit from a wide set applications adopt this interface, they will benefit from a wide set
skipping to change at page 4, line 17 skipping to change at page 4, line 17
The Transport Services architecture is based on the survey of The Transport Services architecture is based on the survey of
services provided by IETF transport protocols and congestion control services provided by IETF transport protocols and congestion control
mechanisms [RFC8095], and the distilled minimal set of the features mechanisms [RFC8095], and the distilled minimal set of the features
offered by transport protocols [I-D.ietf-taps-minset]. These offered by transport protocols [I-D.ietf-taps-minset]. These
documents identified common features and patterns across all documents identified common features and patterns across all
transport protocols developed thus far in the IETF. transport protocols developed thus far in the IETF.
Since transport security is an increasingly relevant aspect of using Since transport security is an increasingly relevant aspect of using
transport protocols on the Internet, this architecture also considers transport protocols on the Internet, this architecture also considers
the impact of transport security protocols on the feature-set exposed the impact of transport security protocols on the feature-set exposed
by transport services [I-D.ietf-taps-transport-security]. by Transport Services [I-D.ietf-taps-transport-security].
One of the key insights to come from identifying the minimal set of One of the key insights to come from identifying the minimal set of
features provided by transport protocols [I-D.ietf-taps-minset] was features provided by transport protocols [I-D.ietf-taps-minset] was
that features either require application interaction and guidance that features either require application interaction and guidance
(referred to in that document as Functional or Optimizing Features), (referred to in that document as Functional or Optimizing Features),
or else can be handled automatically by a system implementing or else can be handled automatically by a system implementing
Transport Services (referred to as Automatable Features). Among the Transport Services (referred to as Automatable Features). Among the
Functional and Optimizing Features, some were common across all or Functional and Optimizing Features, some were common across all or
nearly all transport protocols, while others could be seen as nearly all transport protocols, while others could be seen as
features that, if specified, would only be useful with a subset of features that, if specified, would only be useful with a subset of
skipping to change at page 4, line 43 skipping to change at page 4, line 43
would be undesirable in many cases. would be undesirable in many cases.
1.2. Overview 1.2. Overview
This document describes the Transport Services architecture in three This document describes the Transport Services architecture in three
sections: sections:
* Section 2 describes how the API model of Transport Services * Section 2 describes how the API model of Transport Services
differs from traditional socket-based APIs. Specifically, it differs from traditional socket-based APIs. Specifically, it
offers asynchronous event-driven interaction, the use of messages offers asynchronous event-driven interaction, the use of messages
for data transfer, and the ability to easily adopt different for data transfer, and the flexibility to use different transport
transport protocols. protocols and paths without requiring major changes to the
application.
* Section 3 explains the design principles behind the Transport * Section 3 explains the design principles behind the Transport
Services API. These principles are intended to make sure that Services API. These principles are intended to make sure that
transport protocols can continue to be enhanced and evolve without transport protocols can continue to be enhanced and evolve without
requiring too many changes by application developers. requiring too many changes by application developers.
* Section 4 presents the Transport Services architecture diagram and * Section 4 presents the Transport Services architecture diagram and
defines the concepts that are used by both the API and defines the concepts that are used by both the API and
implementation documents. The Preconnection allows applications implementation documents. The Preconnection allows applications
to configure connection properties, and the Connection represents to configure Connection Properties, and the Connection represents
an object that can be used to send and receive Messages. an object that can be used to send and receive Messages.
1.3. Specification of Requirements 1.3. Specification of Requirements
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
skipping to change at page 5, line 50 skipping to change at page 6, line 4
| resolver | +------------+ +--------------+ | resolver | +------------+ +--------------+
+------------+ | | +------------+ | |
+---------------------------------+ +---------------------------------+
| TCP UDP | | TCP UDP |
| Kernel Networking Stack | | Kernel Networking Stack |
+---------------------------------+ +---------------------------------+
| |
+-----------------------------------------------------+ +-----------------------------------------------------+
| Network Layer Interface | | Network Layer Interface |
+-----------------------------------------------------+ +-----------------------------------------------------+
Figure 1: Socket API Model Figure 1: Socket API Model
The Transport Services architecture evolves this general model of The Transport Services architecture evolves this general model of
interaction, aiming to both modernize the API surface presented to interaction, aiming to both modernize the API surface presented to
applications by the transport layer and enrich the capabilities of applications by the transport layer and enrich the capabilities of
the transport system implementation. It combines interfaces for the Transport Services implementation. It combines interfaces for
multiple interaction patterns into a unified whole. By combining multiple interaction patterns into a unified whole. By combining
name resolution with connection establishment and data transfer in a name resolution with connection establishment and data transfer in a
single API, it allows for more flexible implementations to provide single API, it allows for more flexible implementations to provide
path and transport protocol agility on the application's behalf. path and transport protocol agility on the application's behalf.
+-----------------------------------------------------+ +-----------------------------------------------------+
| Application | | Application |
+-----------------------------------------------------+ +-----------------------------------------------------+
| |
+-----------------------------------------------------+ +-----------------------------------------------------+
| Transport Services API | | Transport Services API |
+-----------------------------------------------------+ +-----------------------------------------------------+
| |
+-----------------------------------------------------+ +-----------------------------------------------------+
| Transport System Implementation | | Transport Services Implementation |
| (Using: DNS, UDP, TCP, SCTP, DCCP, TLS, QUIC, etc) | | (Using: DNS, UDP, TCP, SCTP, DCCP, TLS, QUIC, etc) |
+-----------------------------------------------------+ +-----------------------------------------------------+
| |
+-----------------------------------------------------+ +-----------------------------------------------------+
| Network Layer Interface | | Network Layer Interface |
+-----------------------------------------------------+ +-----------------------------------------------------+
Figure 2: Transport Services API Model Figure 2: Transport Services API Model
The Transport Services API [I-D.ietf-taps-interface] defines the The Transport Services API [I-D.ietf-taps-interface] defines the
mechanism for an application to create network connections and mechanism for an application to create network connections and
transfer data. The implementation [I-D.ietf-taps-impl] is transfer data. The implementation [I-D.ietf-taps-impl] is
responsible for mapping the API to the various available transport responsible for mapping the API to the various available transport
protocols and managing the available network interfaces and paths. protocols and managing the available network interfaces and paths.
There are key differences between the architecture of the Transport There are key differences between the architecture of the Transport
Services system and the architecture of the sockets API: the Services system and the architecture of the Socket API: the Transport
Transport Services API is asynchronous and event-driven; it uses Services API is asynchronous and event-driven; it uses messages for
messages for representing data transfer to applications, and it representing data transfer to applications; and it assumes an
assumes an implementation that can use multiple IP addresses, implementation that can use multiple IP addresses, multiple
multiple protocols, multiple paths, and provide multiple application protocols, multiple paths, and provide multiple application streams.
streams.
2.1. Event-Driven API 2.1. Event-Driven API
Originally, sockets presented a blocking interface for establishing Originally, sockets presented a blocking interface for establishing
connections and transferring data. However, most modern applications connections and transferring data. However, most modern applications
interact with the network asynchronously. Emulation of an interact with the network asynchronously. Emulation of an
asynchronous interface using sockets generally uses a try-and-fail asynchronous interface using sockets generally uses a try-and-fail
model. If the application wants to read, but data has not yet been model. If the application wants to read, but data has not yet been
received from the peer, the call to read will fail. The application received from the peer, the call to read will fail. The application
then waits and can try again later. then waits and can try again later.
skipping to change at page 8, line 13 skipping to change at page 8, line 13
a message-based abstraction provides many benefits, such as: a message-based abstraction provides many benefits, such as:
* the ability to associate deadlines with messages, for applications * the ability to associate deadlines with messages, for applications
that care about timing; that care about timing;
* the ability to provide control of reliability, choosing which * the ability to provide control of reliability, choosing which
messages to retransmit when there is packet loss, and how best to messages to retransmit when there is packet loss, and how best to
make use of the data that arrived; make use of the data that arrived;
* the ability to manage dependencies between messages, when the * the ability to manage dependencies between messages, when the
transport system could decide to not deliver a message, either Transport Services system could decide to not deliver a message,
following packet loss or because it has missed a deadline. In either following packet loss or because it has missed a deadline.
particular, this can avoid (re-)sending data that relies on a In particular, this can avoid (re-)sending data that relies on a
previous transmission that was never received. previous transmission that was never received.
* the ability to automatically assign messages and connections to * the ability to automatically assign messages and connections to
underlying transport connections to utilize multi-streaming and underlying transport connections to utilize multi-streaming and
pooled connections. pooled connections.
Allowing applications to interact with messages is backwards- Allowing applications to interact with messages is backwards-
compatible with existings protocols and APIs, as it does not change compatible with existings protocols and APIs, as it does not change
the wire format of any protocol. Instead, it gives the protocol the wire format of any protocol. Instead, it gives the protocol
stack additional information to allow it to make better use of modern stack additional information to allow it to make better use of modern
skipping to change at page 8, line 47 skipping to change at page 8, line 47
model. The Transport Services architecture is designed to handle model. The Transport Services architecture is designed to handle
multiple candidate endpoints, protocols, and paths; and support multiple candidate endpoints, protocols, and paths; and support
multipath and multistreaming protocols. multipath and multistreaming protocols.
Transport Services implementations are meant to be flexible at Transport Services implementations are meant to be flexible at
connection establishment time, considering many different options and connection establishment time, considering many different options and
trying to select the most optimal combinations (Section 4.2.1 and trying to select the most optimal combinations (Section 4.2.1 and
Section 4.2.2). This requires applications to provide higher-level Section 4.2.2). This requires applications to provide higher-level
endpoints than IP addresses, such as hostnames and URLs, which are endpoints than IP addresses, such as hostnames and URLs, which are
used by a Transport Services implementation for resolution, path used by a Transport Services implementation for resolution, path
selection, and racing. selection, and racing. Transport services implementations can
further implement fallback mechanisms if connection establishment of
one protocol fails or performance is detected to be unsatisfactory.
Flexibility after connection establishment is also important. Flexibility after connection establishment is also important.
Transport protocols that can migrate between multiple network-layer Transport protocols that can migrate between multiple network-layer
interfaces need to be able to process and react to interface changes. interfaces need to be able to process and react to interface changes.
Protocols that support multiple application-layer streams need to Protocols that support multiple application-layer streams need to
support initiating and receiving new streams using existing support initiating and receiving new streams using existing
connections. connections.
3. Design Principles 3. Design Principles
skipping to change at page 9, line 29 skipping to change at page 9, line 31
performance and functional characteristics; and it can communicate performance and functional characteristics; and it can communicate
with different remote systems to optimize performance, robustness to with different remote systems to optimize performance, robustness to
failure, or some other metric. Beyond these, if the API for the failure, or some other metric. Beyond these, if the API for the
system remains the same over time, new protocols and features could system remains the same over time, new protocols and features could
be added to the system's implementation without requiring changes in be added to the system's implementation without requiring changes in
applications for adoption. applications for adoption.
3.1. Common APIs for Common Features 3.1. Common APIs for Common Features
Functionality that is common across multiple transport protocols Functionality that is common across multiple transport protocols
SHOULD be accessible through a unified set of API calls. An ought to be accessible through a unified set of API calls. An
application ought to be able to implement logic for its basic use of application using a Transport Services API can implement logic for
transport networking (establishing the transport, and sending and its basic use of transport networking (establishing the transport,
receiving data) once, and expect that implementation to continue to and sending and receiving data) once, and expect that implementation
function as the transports change. to continue to function as the transports change.
Any Transport Services API is REQUIRED to allow access to the As a baseline, any Transport Services API needs to allow access to
distilled minimal set of features offered by transport protocols the distilled minimal set of features offered by transport protocols
[I-D.ietf-taps-minset]. [I-D.ietf-taps-minset].
3.2. Access to Specialized Features 3.2. Access to Specialized Features
There are applications that will need to control fine-grained details There are applications that will need to control fine-grained details
of transport protocols to optimize their behavior and ensure of transport protocols to optimize their behavior and ensure
compatibility with remote systems. A Transport Services system compatibility with remote systems. A Transport Services system
therefore SHOULD also permit more specialized protocol features to be therefore ought to also permit more specialized protocol features to
used. The interface for these specialized options ought to be be used. The interface for these specialized options ought to be
exposed differently from the common options to ensure flexibility. exposed differently from the common options to ensure flexibility.
A specialized feature could be required by an application only when A specialized feature could be required by an application only when
using a specific protocol, and not when using others. For example, using a specific protocol, and not when using others. For example,
if an application is using UDP, it could require control over the if an application is using TCP, it could require control over the
checksum or fragmentation behavior for UDP; if it used a protocol to User Timeout Option for TCP; these options would not take effect for
frame its data over a byte stream like TCP, it would not need these other transport protocols. In such cases, the API ought to expose
options. In such cases, the API ought to expose the features in such the features in such a way that they take effect when a particular
a way that they take effect when a particular protocol is selected, protocol is selected, but do not imply that only that protocol could
but do not imply that only that protocol could be used. For example, be used. For example, if the API allows an application to specify a
if the API allows an application to specify a preference to use a preference to use the User Timeout Option, communication would not
partial checksum, communication would not fail when a protocol such fail when a protocol such as QUIC is selected.
as TCP is selected, which uses a checksum covering the entire
payload.
Other specialized features, however, could be strictly required by an Other specialized features, however, could be strictly required by an
application and thus constrain the set of protocols that can be used. application and thus constrain the set of protocols that can be used.
For example, if an application requires support for automatic For example, if an application requires support for automatic
handover or failover for a Connection, only protocol stacks that handover or failover for a connection, only protocol stacks that
provide this feature are eligible to be used, e.g., protocol stacks provide this feature are eligible to be used, e.g., protocol stacks
that include a multipath protocol or a protocol that supports that include a multipath protocol or a protocol that supports
connection migration. A Transport Services API MUST allow connection migration. A Transport Services API needs to allow
applications to define such requirements and constrain the system's applications to define such requirements and constrain the system's
options. Since such options are not part of the core/common options. Since such options are not part of the core/common
features, it will generally be simple for an application to modify features, it will generally be simple for an application to modify
its set of constraints and change the set of allowable protocol its set of constraints and change the set of allowable protocol
features without changing the core implementation. features without changing the core implementation.
3.3. Scope for API and Implementation Definitions 3.3. Scope for API and Implementation Definitions
The Transport Services API is envisioned as the abstract model for a The Transport Services API is envisioned as the abstract model for a
family of APIs that share a common way to expose transport features family of APIs that share a common way to expose transport features
and encourage flexibility. The abstract API definition and encourage flexibility. The abstract API definition
[I-D.ietf-taps-interface] describes this interface and how it can be [I-D.ietf-taps-interface] describes this interface and how it can be
exposed to application developers. exposed to application developers.
Implementations that provide the Transport Services API Implementations that provide the Transport Services API
[I-D.ietf-taps-impl] will vary due to system-specific support and the [I-D.ietf-taps-impl] will vary due to system-specific support and the
needs of the deployment scenario. It is expected that all needs of the deployment scenario. It is expected that all
implementations of Transport Services will offer the entire mandatory implementations of Transport Services will offer the entire mandatory
API. All implementations are REQUIRED to offer an API that is API. All implementations are expected to offer an API that is
sufficient to use the distilled minimal set of features offered by sufficient to use the distilled minimal set of features offered by
transport protocols [I-D.ietf-taps-minset], including API support for transport protocols [I-D.ietf-taps-minset], including API support for
TCP and UDP transport. However, some features provided by this API TCP and UDP transport. However, some features provided by this API
will not be functional in certain implementations. For example, it will not be functional in certain implementations. For example, it
is possible that some very constrained devices might not have a full is possible that some very constrained devices might not have a full
TCP implementation beneath the API. TCP implementation beneath the API.
To preserve flexibility and compatibility with future protocols, top- To preserve flexibility and compatibility with future protocols, top-
level features in the Transport Services API SHOULD avoid referencing level features in the Transport Services API ought to avoid
particular transport protocols. The mappings of these API features referencing particular transport protocols. The mappings of these
to specific implementations of each feature is explained in the API features to specific implementations of each feature is explained
[I-D.ietf-taps-impl] along with the implications of the feature on in the [I-D.ietf-taps-impl] along with the implications of the
existing protocols. It is expected that [I-D.ietf-taps-interface] feature on existing protocols. It is expected that
will be updated and supplemented as new protocols and protocol
features are developed. [I-D.ietf-taps-interface] will be updated and supplemented as new
protocols and protocol features are developed.
It is important to note that neither the Transport Services API It is important to note that neither the Transport Services API
[I-D.ietf-taps-interface] nor the Implementation document [I-D.ietf-taps-interface] nor the Implementation document
[I-D.ietf-taps-impl] define new protocols or protocol capabilities [I-D.ietf-taps-impl] define new protocols or protocol capabilities
that affect what is communicated across the network: this implies that affect what is communicated across the network. Use of a
that a Transport Services system MUST be deployable on only one side Transport Services system does not require that a peer on the other
of a connection. A Transport Services system acting as a connection side of a connection uses the same API or implementation. A
initiator can communicate with any existing system that implements Transport Services system acting as a connection initiator can
the transport protocol(s) selected by the Transport Services system. communicate with any existing system that implements the transport
Similarly, a Transport Services system acting as a listener can protocol(s) selected by the Transport Services system. Similarly, a
receive connections for any protocol that is supported by the system, Transport Services system acting as a listener can receive
from existing initiators. connections for any protocol that is supported by the system from
existing initiators that implement the protocol, independent of
whether the initiator uses Transport Services as well or not.
4. Transport Services Architecture and Concepts 4. Transport Services Architecture and Concepts
The concepts defined in this document are intended primarily for use The concepts defined in this document are intended primarily for use
in the documents and specifications that describe the Transport in the documents and specifications that describe the Transport
Services architecture and API. While the specific terminology can be Services architecture and API. While the specific terminology can be
used in some implementations, it is expected that there will remain a used in some implementations, it is expected that there will remain a
variety of terms used by running code. variety of terms used by running code.
The architecture divides the concepts for Transport Services into two The architecture divides the concepts for Transport Services into two
skipping to change at page 12, line 17 skipping to change at page 12, line 17
+-+----------------+------^-------+--------^----------+ +-+----------------+------^-------+--------^----------+
| | | | | | | | | |
pre- | data | events pre- | data | events
establishment | transfer | | establishment | transfer | |
| establishment | termination | | establishment | termination |
| | | | | | | | | |
| +--v------v-------v+ | | +--v------v-------v+ |
+-v-------------+ Connection(s) +-------+----------+ +-v-------------+ Connection(s) +-------+----------+
| Transport +--------+---------+ | | Transport +--------+---------+ |
| Services | | | Services | |
| API | | | API | +-------------+ |
+------------------------|----------------------------+ +------------------------+--+ Framer(s) |-----------+
| | +-------------+
+------------------------|----------------------------+ +------------------------|----------------------------+
| Transport | | | Transport | |
| System | +-----------------+ | | System | +-----------------+ |
| Implementation | | Cached | | | Implementation | | Cached | |
| | | State | | | | | State | |
| (Candidate Gathering) | +-----------------+ | | (Candidate Gathering) | +-----------------+ |
| | | | | |
| (Candidate Racing) | +-----------------+ | | (Candidate Racing) | +-----------------+ |
| | | System | | | | | System | |
| | | Policy | | | | | Policy | |
skipping to change at page 12, line 48 skipping to change at page 12, line 48
Architecture Architecture
4.1. Transport Services API Concepts 4.1. Transport Services API Concepts
Fundamentally, a Transport Services API needs to provide connection Fundamentally, a Transport Services API needs to provide connection
objects (Section 4.1.1) that allow applications to establish objects (Section 4.1.1) that allow applications to establish
communication, and then send and receive data. These could be communication, and then send and receive data. These could be
exposed as handles or referenced objects, depending on the language. exposed as handles or referenced objects, depending on the language.
Beyond the connection objects, there are several high-level groups of Beyond the connection objects, there are several high-level groups of
actions that any Transport Services API implementing this actions that any Transport Services API needs to provide:
specification MUST provide:
* Pre-Establishment (Section 4.1.2) encompasses the properties that * Pre-Establishment (Section 4.1.2) encompasses the properties that
an application can pass to describe its intent, requirements, an application can pass to describe its intent, requirements,
prohibitions, and preferences for its networking operations. For prohibitions, and preferences for its networking operations.
any system that provides generic Transport Services, these
properties SHOULD apply to multiple transport protocols. These properties apply to multiple transport protocols, unless
Properties specified during Pre-Establishment can have a large otherwise specified. Properties specified during Pre-
impact on the rest of the interface: they modify how establishment Establishment can have a large impact on the rest of the
occurs, they influence the expectations around data transfer, and interface: they modify how establishment occurs, they influence
they determine the set of events that will be supported. the expectations around data transfer, and they determine the set
of events that will be supported.
* Establishment (Section 4.1.3) focuses on the actions that an * Establishment (Section 4.1.3) focuses on the actions that an
application takes on the connection objects to prepare for data application takes on the connection objects to prepare for data
transfer. transfer.
* Data Transfer (Section 4.1.4) consists of how an application * Data Transfer (Section 4.1.4) consists of how an application
represents the data to be sent and received, the functions represents the data to be sent and received, the functions
required to send and receive that data, and how the application is required to send and receive that data, and how the application is
notified of the status of its data transfer. notified of the status of its data transfer.
* Event Handling (Section 4.1.5) defines categories of notifications * Event Handling (Section 4.1.5) defines categories of notifications
which an application can receive during the lifetime of transport which an application can receive during the lifetime of transport
objects. Events MAY also provide opportunities for the objects. Events also provide opportunities for the application to
application to interact with the underlying transport by querying interact with the underlying transport by querying state or
state or updating maintenance options. updating maintenance options.
* Termination (Section 4.1.6) focuses on the methods by which data * Termination (Section 4.1.6) focuses on the methods by which data
transmission is stopped, and state is torn down in the transport. transmission is stopped, and state is torn down in the transport.
The diagram below provides a high-level view of the actions and The diagram below provides a high-level view of the actions and
events during the lifetime of a connection. Note that some actions events during the lifetime of a Connection object. Note that some
are alternatives (e.g., whether to initiate a connection or to listen actions are alternatives (e.g., whether to initiate a connection or
for incoming connections), while others are optional (e.g., setting to listen for incoming connections), while others are optional (e.g.,
Connection and Message Properties in Pre-Establishment) or have been setting Connection and Message Properties in Pre-Establishment) or
omitted for brevity. have been omitted for brevity and simplicity.
Pre-Establishment : Established : Termination Pre-Establishment : Established : Termination
----------------- : ----------- : ----------- ----------------- : ----------- : -----------
: : : :
+-- Local Endpoint : Message : +-- Local Endpoint : Message :
+-- Remote Endpoint : Receive() | : +-- Remote Endpoint : Receive() | :
+-- Transport Properties : Send() | : +-- Transport Properties : Send() | :
| : | Close() : +-- Security Parameters : | :
| +---------------+ Initiate() +-----+------+ Abort() : | : | :
| InitiateWithSend() | Close() :
| +---------------+ Initiate() +-----+------+ Abort() :
+---+ Preconnection |------------->| Connection |-----------> Closed +---+ Preconnection |------------->| Connection |-----------> Closed
+---------------+ Rendezvous() +------------+ Conn. : +---------------+ Rendezvous() +------------+ :
| : ^ | Finished :
Listen() | : | | : Listen() | : | | :
| : | v : | : | v :
v : | Connection : v : | Connection :
+----------+ : | Ready : +----------+ : | Ready :
| Listener |----------------------+ : | Listener |----------------------+ :
+----------+ Connection Received : +----------+ Connection Received :
: : : :
Figure 4: The lifetime of a connection Figure 4: The lifetime of a Connection object
4.1.1. Connections and Related Objects 4.1.1. Connections and Related Objects
* Preconnection: A Preconnection object is a representation of a * Preconnection: A Preconnection object is a representation of a
potential connection. It has state that describes parameters of a potential Connection. It has state that describes parameters of a
Connection that might exist in the future: the Local Endpoint from Connection that might exist in the future: the Local Endpoint from
which that Connection will be established, the Remote Endpoint which that Connection will be established, the Remote Endpoint
(Section 4.1.2) to which it will connect, and Transport Properties (Section 4.1.2) to which it will connect, and Transport Properties
that influence the paths and protocols a Connection will use. A that influence the paths and protocols a Connection will use. A
Preconnection can be fully specified such that it represents a Preconnection can be fully specified such that it represents a
single possible Connection, or it can be partially specified such single possible Connection, or it can be partially specified such
that it represents a family of possible Connections. The Local that it represents a family of possible Connections. The Local
Endpoint (Section 4.1.2) MUST be specified if the Preconnection is Endpoint (Section 4.1.2) is required if the Preconnection is used
used to Listen for incoming connections. The Local Endpoint is to Listen for incoming Connections. The Local Endpoint is
OPTIONAL if it is used to Initiate connections. The Remote optional if it is used to Initiate Connections. The Remote
Endpoint MUST be specified in the Preconnection that is used to Endpoint is required in the Preconnection that is used to Initiate
Initiate connections. The Remote Endpoint is OPTIONAL if it is Connections. The Remote Endpoint is optional if it is used to
used to Listen for incoming connections. The Local Endpoint and Listen for incoming Connections. The Local Endpoint and the
the Remote Endpoint MUST both be specified if a peer-to-peer Remote Endpoint are both required if a peer-to-peer Rendezvous is
Rendezvous is to occur based on the Preconnection. to occur based on the Preconnection.
* Transport Properties: Transport Properties allow the application * Transport Properties: Transport Properties allow the application
to express their requirements, prohibitions, and preferences and to express their requirements, prohibitions, and preferences and
configure the Transport System. There are three kinds of configure the Transport Services system. There are three kinds of
Transport Properties: Transport Properties:
- Selection Properties (Section 4.1.2) that can only be specified - Selection Properties (Section 4.1.2) that can only be specified
on a Preconnection. on a Preconnection.
- Connection Properties (Section 4.1.2) that can be specified on - Connection Properties (Section 4.1.2) that can be specified on
a Preconnection and changed on the Connection. a Preconnection and changed on the Connection.
- Message Properties (Section 4.1.4) that can be specified as - Message Properties (Section 4.1.4) that can be specified as
defaults on a Preconnection or a Connection, and can also be defaults on a Preconnection or a Connection, and can also be
specified during data transfer to affect specific Messages. specified during data transfer to affect specific Messages.
* Connection: A Connection object represents one or more active * Connection: A Connection object represents one or more active
transport protocol instances that can send and/or receive Messages transport protocol instances that can send and/or receive Messages
between local and remote systems. It holds state pertaining to between local and remote systems. It holds state pertaining to
the underlying transport protocol instances and any ongoing data the underlying transport protocol instances and any ongoing data
transfers. This represents, for example, an active connection in transfers. This represents, for example, an active Connection in
a connection-oriented protocol such as TCP, or a fully-specified a connection-oriented protocol such as TCP, or a fully-specified
5-tuple for a connectionless protocol such as UDP. It can also 5-tuple for a connectionless protocol such as UDP. It can also
represent a pool of transport protocol instances, e.g., a set of represent a pool of transport protocol instances, e.g., a set of
TCP and QUIC connections to equivalent endpoints, or a stream of a TCP and QUIC connections to equivalent endpoints, or a stream of a
multi-streaming transport protocol instance. Connections can be multi-streaming transport protocol instance. Connections can be
created from a Preconnection or by a Listener. created from a Preconnection or by a Listener.
* Listener: A Listener object accepts incoming transport protocol * Listener: A Listener object accepts incoming transport protocol
connections from remote systems and generates corresponding connections from remote systems and generates corresponding
Connection objects. It is created from a Preconnection object Connection objects. It is created from a Preconnection object
that specifies the type of incoming connections it will accept. that specifies the type of incoming Connections it will accept.
4.1.2. Pre-Establishment 4.1.2. Pre-Establishment
* Endpoint: An Endpoint represents an identifier for one side of a * Endpoint: An Endpoint represents an identifier for one side of a
transport connection. Endpoints can be Local Endpoints or Remote transport connection. Endpoints can be Local Endpoints or Remote
Endpoints, and respectively represent an identity that the Endpoints, and respectively represent an identity that the
application uses for the source or destination of a connection. application uses for the source or destination of a connection.
An Endpoint can be specified at various levels of abstraction, and An Endpoint can be specified at various levels of abstraction, and
an Endpoint at a higher level of abstraction (such as a hostname) an Endpoint at a higher level of abstraction (such as a hostname)
can be resolved to more concrete identities (such as IP can be resolved to more concrete identities (such as IP
skipping to change at page 16, line 8 skipping to change at page 16, line 13
example, a local IP address and port. example, a local IP address and port.
* Selection Properties: The Selection Properties consist of the * Selection Properties: The Selection Properties consist of the
options that an application can set to influence the selection of options that an application can set to influence the selection of
paths between the local and remote systems, to influence the paths between the local and remote systems, to influence the
selection of transport protocols, or to configure the behavior of selection of transport protocols, or to configure the behavior of
generic transport protocol features. These options can take the generic transport protocol features. These options can take the
form of requirements, prohibitions, or preferences. Examples of form of requirements, prohibitions, or preferences. Examples of
options that influence path selection include the interface type options that influence path selection include the interface type
(such as a Wi-Fi connection, or a Cellular LTE connection), (such as a Wi-Fi connection, or a Cellular LTE connection),
requirements around the Maximum Transmission Unit (MTU) or path requirements around the largest Message that can be sent, or
MTU (PMTU), or preferences for throughput and latency properties. preferences for throughput and latency properties. Examples of
Examples of options that influence protocol selection and options that influence protocol selection and configuration of
configuration of transport protocol features include reliability, transport protocol features include reliability, multipath
service class, multipath support, and fast open support. support, and fast open support.
* Connection Properties: The Connection Properties are used to * Connection Properties: The Connection Properties are used to
configure protocol-specific options and control per-connection configure protocol-specific options and control per-connection
behavior of the Transport System; for example, a protocol-specific behavior of the Transport Services system; for example, a
Connection Property can express that if UDP is used, the protocol-specific Connection Property can express that if TCP is
implementation ought to use checksums. Note that the presence of used, the implementation ought to use the User Timeout Option.
such a property does not require that a specific protocol will be Note that the presence of such a property does not require that a
used. In general, these properties do not explicitly determine specific protocol will be used. In general, these properties do
the selection of paths or protocols, but can be used in this way not explicitly determine the selection of paths or protocols, but
by an implementation during connection establishment. Connection can be used in this way by an implementation during connection
Properties are specified on a Preconnection prior to Connection establishment. Connection Properties are specified on a
establishment, and can be modified on the Connection later. Preconnection prior to Connection establishment, and can be
Changes made to Connection Properties after Connection modified on the Connection later. Changes made to Connection
establishment take effect on a best-effort basis. Properties after Connection establishment take effect on a best-
effort basis.
* Security Parameters: Security Parameters define an application's
requirements for authentication and encryption on a Connection.
They are used by Transport Security protocols (such as those
described in [I-D.ietf-taps-transport-security]) to establish
secure Connections. Examples of parameters that can be set
include local identities, private keys, supported cryptographic
algorithms, and requirements for validating trust of remote
identities. Security Parameters are primarily associated with a
Preconnection object, but properties related to identities can be
associated directly with Endpoints.
4.1.3. Establishment Actions 4.1.3. Establishment Actions
* Initiate: The primary action that an application can take to * Initiate: The primary action that an application can take to
create a Connection to a Remote Endpoint, and prepare any required create a Connection to a Remote Endpoint, and prepare any required
local or remote state to enable the transmission of Messages. For local or remote state to enable the transmission of Messages. For
some protocols, this will initiate a client-to-server style some protocols, this will initiate a client-to-server style
handshake; for other protocols, this will just establish local handshake; for other protocols, this will just establish local
state (e.g., with connectionless protocols such as UDP). The state (e.g., with connectionless protocols such as UDP). The
process of identifying options for connecting, such as resolution process of identifying options for connecting, such as resolution
skipping to change at page 17, line 4 skipping to change at page 17, line 20
register with multiple paths, protocols, and local endpoints, register with multiple paths, protocols, and local endpoints,
unless constrained by Selection Properties and/or the specified unless constrained by Selection Properties and/or the specified
Local Endpoint(s). Connections can be accepted on any of the Local Endpoint(s). Connections can be accepted on any of the
available paths or endpoints. available paths or endpoints.
* Rendezvous: The action of establishing a peer-to-peer connection * Rendezvous: The action of establishing a peer-to-peer connection
with a Remote Endpoint. It simultaneously attempts to initiate a with a Remote Endpoint. It simultaneously attempts to initiate a
connection to a Remote Endpoint while listening for an incoming connection to a Remote Endpoint while listening for an incoming
connection from that endpoint. The process of identifying options connection from that endpoint. The process of identifying options
for the connection, such as resolution of the Remote Endpoint, for the connection, such as resolution of the Remote Endpoint,
occurs during the Rendezvous call. As with Listeners, the set of occurs in response to the Rendezvous call. As with Listeners, the
local paths and endpoints is constrained by Selection Properties. set of local paths and endpoints is constrained by Selection
If successful, the Rendezvous call returns a Connection object to Properties. If successful, the Rendezvous call returns a
represent the established peer-to-peer connection. The processes Connection object to represent the established peer-to-peer
by which connections are initiated during a Rendezvous action will connection. The processes by which connections are initiated
depend on the set of Local and Remote Endpoints configured on the during a Rendezvous action will depend on the set of Local and
Preconnection. For example, if the Local and Remote Endpoints are Remote Endpoints configured on the Preconnection. For example, if
TCP host candidates, then a TCP simultaneous open [RFC0793] will the Local and Remote Endpoints are TCP host candidates, then a TCP
be performed. However, if the set of Local Endpoints includes simultaneous open [RFC0793] will be performed. However, if the
server reflexive candidates, such as those provided by STUN, a set of Local Endpoints includes server reflexive candidates, such
Rendezvous action will race candidates in the style of the ICE as those provided by STUN, a Rendezvous action will race
algorithm [RFC8445] to perform NAT binding discovery and initiate candidates in the style of the ICE algorithm [RFC8445] to perform
a peer-to-peer connection. NAT binding discovery and initiate a peer-to-peer connection.
4.1.4. Data Transfer Objects and Actions 4.1.4. Data Transfer Objects and Actions
* Message: A Message object is a unit of data that can be * Message: A Message object is a unit of data that can be
represented as bytes that can be transferred between two systems represented as bytes that can be transferred between two systems
over a transport connection. The bytes within a Message are over a transport connection. The bytes within a Message are
assumed to be ordered within the Message. If an application does assumed to be ordered. If an application does not care about the
not care about the order in which a peer receives two distinct order in which a peer receives two distinct spans of bytes, those
spans of bytes, those spans of bytes are considered independent spans of bytes are considered independent Messages.
Messages.
* Message Properties: Message Properties are used to specify details * Message Properties: Message Properties are used to specify details
about Message transmission. They can be specified directly on about Message transmission. They can be specified directly on
individual Messages, or can be set on a Preconnection or individual Messages, or can be set on a Preconnection or
Connection as defaults. These properties might only apply to how Connection as defaults. These properties might only apply to how
a Message is sent (such as how the transport will treat a Message is sent (such as how the transport will treat
prioritization and reliability), but can also include properties prioritization and reliability), but can also include properties
that specific protocols encode and communicate to the Remote that specific protocols encode and communicate to the Remote
Endpoint. When receiving Messages, Message Properties can contain Endpoint. When receiving Messages, Message Properties can contain
information about the received Message, such as metadata generated information about the received Message, such as metadata generated
at the receiver and information signalled by the remote endpoint. at the receiver and information signalled by the remote endpoint.
For example, a Message can be marked with a Message Property
indicating that it is the final message on a connection if the
peer sent a TCP FIN.
* Send: The action to transmit a Message over a Connection to the * Send: The action to transmit a Message over a Connection to the
remote system. The interface to Send MAY include Message remote system. The interface to Send can accept Message
Properties specific to how the Message content is to be sent. The Properties specific to how the Message content is to be sent. The
status of the Send operation MUST be delivered back to the sending status of the Send operation is delivered back to the sending
application in an event (Section 4.1.5). application in an event (Section 4.1.5).
* Receive: An action that indicates that the application is ready to * Receive: An action that indicates that the application is ready to
asynchronously accept a Message over a Connection from a remote asynchronously accept a Message over a Connection from a remote
system, while the Message content itself will be delivered in an system, while the Message content itself will be delivered in an
event (Section 4.1.5). The interface to Receive MAY include event (Section 4.1.5). The interface to Receive can include
Message Properties specific to the Message that is to be delivered Message Properties specific to the Message that is to be delivered
to the application. to the application.
* Framer: A Framer is a data translation layer that can be added to * Framer: A Framer is a data translation layer that can be added to
a Connection to define how application-layer Messages are a Connection to define how application-layer Messages are
transmitted over a transport protocol. This is particularly transmitted over a transport protocol. This is particularly
relevant for protocols that otherwise present unstructured relevant for protocols that otherwise present unstructured
streams, such as TCP. streams, such as TCP.
4.1.5. Event Handling 4.1.5. Event Handling
The following categories of events can be delivered to an The following categories of events can be delivered to an
application: application:
* Connection Ready: Signals to an application that a given * Connection Ready: Signals to an application that a given
Connection is ready to send and/or receive Messages. If the Connection is ready to send and/or receive Messages. If the
Connection relies on handshakes to establish state between peers, Connection relies on handshakes to establish state between peers,
then it is assumed that these steps have been taken. then it is assumed that these steps have been taken.
* Connection Finished: Signals to an application that a given * Connection Closed: Signals to an application that a given
Connection is no longer usable for sending or receiving Messages. Connection is no longer usable for sending or receiving Messages.
The event SHOULD deliver a reason or error to the application that The event delivers a reason or error to the application that
describes the nature of the termination. describes the nature of the termination.
* Connection Received: Signals to an application that a given * Connection Received: Signals to an application that a given
Listener has received a Connection. Listener has received a Connection.
* Message Received: Delivers received Message content to the * Message Received: Delivers received Message content to the
application, based on a Receive action. This MAY include an error application, based on a Receive action. This can include an error
if the Receive action cannot be satisfied due to the Connection if the Receive action cannot be satisfied due to the Connection
being closed. being closed.
* Message Sent: Notifies the application of the status of its Send * Message Sent: Notifies the application of the status of its Send
action. This might indicate a failure if the Message cannot be action. This might indicate a failure if the Message cannot be
sent, or an indication that Message has been processed by the sent, or an indication that the Message has been processed by the
protocol stack. protocol stack.
* Path Properties Changed: Notifies the application that some * Path Properties Changed: Notifies the application that some
property of the Connection has changed that might influence how property of the Connection has changed that might influence how
and where data is sent and/or received. and where data is sent and/or received.
4.1.6. Termination Actions 4.1.6. Termination Actions
* Close: The action an application takes on a Connection to indicate * Close: The action an application takes on a Connection to indicate
that it no longer intends to send data, is no longer willing to that it no longer intends to send data, is no longer willing to
receive data, and that the protocol SHOULD signal this state to receive data, and that the protocol should signal this state to
the remote system if the transport protocol allows this. (Note the remote system if the transport protocol allows this. (Note
that this is distinct from the concept of "half-closing" a that this is distinct from the concept of "half-closing" a
bidirectional connection, such as when a FIN is sent in one bidirectional connection, such as when a FIN is sent in one
direction of a TCP connection. Indicating the end of a stream in direction of a TCP connection. Indicating the end of a stream in
the Transport Services architecture is possible using Message the Transport Services architecture is possible using Message
Properties when sending.) Properties when sending.)
* Abort: The action the application takes on a Connection to * Abort: The action the application takes on a Connection to
indicate a Close and also indicate that the transport system indicate a Close and also indicate that the Transport Services
SHOULD NOT attempt to deliver any outstanding data. This is system should not attempt to deliver any outstanding data. This
intended for immediate termination of a connection, without is intended for immediate termination of a connection, without
cleaning up state. cleaning up state.
4.2. Transport System Implementation Concepts 4.1.7. Connection Groups
A Connection Group is a set of Connections that share properties and
caches. For multiplexing transport protocols, only Connections
within the same Connection Group are allowed to be multiplexed
together. An application can explicitly define Connection Groups to
control caching boundaries, as discussed in Section 4.2.4.
4.2. Transport Services Implementation Concepts
This section defines the set of objects used internally to a system This section defines the set of objects used internally to a system
or library to implement the functionality needed to provide a or library to implement the functionality needed to provide a
transport service across a network, as required by the abstract transport service across a network, as required by the abstract
interface. interface.
* Connection Group: A set of Connections that share properties and
caches. For multiplexing transport protocols, only Connections
within the same Connection Group are allowed to be multiplexed
together. An application can explicitly define Connection Groups
to control caching boundaries, as discussed in Section 4.2.4.
* Path: Represents an available set of properties that a local * Path: Represents an available set of properties that a local
system can use to communicate with a remote system, such as system can use to communicate with a remote system, such as
routes, addresses, and physical and virtual network interfaces. routes, addresses, and physical and virtual network interfaces.
* Protocol Instance: A single instance of one protocol, including * Protocol Instance: A single instance of one protocol, including
any state necessary to establish connectivity or send and receive any state necessary to establish connectivity or send and receive
Messages. Messages.
* Protocol Stack: A set of Protocol Instances (including relevant * Protocol Stack: A set of Protocol Instances (including relevant
application, security, transport, or Internet protocols) that are application, security, transport, or Internet protocols) that are
used together to establish connectivity or send and receive used together to establish connectivity or send and receive
Messages. A single stack can be simple (a single transport Messages. A single stack can be simple (a single transport
protocol instance over IP), or complex (multiple application protocol instance over IP), or it can be complex (multiple
protocol streams going through a single security and transport application protocol streams going through a single security and
protocol, over IP; or, a multi-path transport protocol over transport protocol, over IP; or, a multi-path transport protocol
multiple transport sub-flows). over multiple transport sub-flows).
* Candidate Path: One path that is available to an application and * Candidate Path: One path that is available to an application and
conforms to the Selection Properties and System Policy. Candidate conforms to the Selection Properties and System Policy, of which
Paths are identified during the gathering phase (Section 4.2.1) there can be several. Candidate Paths are identified during the
and can be used during the racing phase (Section 4.2.2). gathering phase (Section 4.2.1) and can be used during the racing
phase (Section 4.2.2).
* Candidate Protocol Stack: One protocol stack that can be used by * Candidate Protocol Stack: One Protocol Stack that can be used by
an application for a connection, of which there can be several. an application for a connection, of which there can be several.
Candidate Protocol Stacks are identified during the gathering Candidate Protocol Stacks are identified during the gathering
phase (Section 4.2.1) and are started during the racing phase phase (Section 4.2.1) and are started during the racing phase
(Section 4.2.2). (Section 4.2.2).
* System Policy: Represents the input from an operating system or * System Policy: Represents the input from an operating system or
other global preferences that can constrain or influence how an other global preferences that can constrain or influence how an
implementation will gather candidate paths and protocol stacks implementation will gather candidate paths and Protocol Stacks
(Section 4.2.1) and race the candidates during establishment (Section 4.2.1) and race the candidates during establishment
(Section 4.2.2). Specific aspects of the System Policy either (Section 4.2.2). Specific aspects of the System Policy either
apply to all Connections or only certain ones, depending on the apply to all Connections or only certain ones, depending on the
runtime context and properties of the Connection. runtime context and properties of the Connection.
* Cached State: The state and history that the implementation keeps * Cached State: The state and history that the implementation keeps
for each set of associated Endpoints that have been used for each set of associated Endpoints that have been used
previously. This can include DNS results, TLS session state, previously. This can include DNS results, TLS session state,
previous success and quality of transport protocols over certain previous success and quality of transport protocols over certain
paths. paths, as well as other information.
4.2.1. Candidate Gathering 4.2.1. Candidate Gathering
* Candidate Path Selection: Candidate Path Selection represents the * Candidate Path Selection: Candidate Path Selection represents the
act of choosing one or more paths that are available to use based act of choosing one or more paths that are available to use based
on the Selection Properties and any available Local and Remote on the Selection Properties and any available Local and Remote
Endpoints provided by the application, as well as the policies and Endpoints provided by the application, as well as the policies and
heuristics of a Transport Services system. heuristics of a Transport Services system.
* Candidate Protocol Selection: Candidate Protocol Selection * Candidate Protocol Selection: Candidate Protocol Selection
represents the act of choosing one or more sets of protocol stacks represents the act of choosing one or more sets of Protocol Stacks
that are available to use based on the Transport Properties that are available to use based on the Transport Properties
provided by the application, and the heuristics or policies within provided by the application, and the heuristics or policies within
the Transport Services system. the Transport Services system.
4.2.2. Candidate Racing 4.2.2. Candidate Racing
Connection establishment attempts for a set of candidates may be Connection establishment attempts for a set of candidates may be
performed simultaneously, synchronously, serially, or some performed simultaneously, synchronously, serially, or some
combination of all of these. We refer to this process as racing, combination of all of these. We refer to this process as racing,
borrowing terminology from Happy Eyeballs [RFC8305]. borrowing terminology from Happy Eyeballs [RFC8305].
skipping to change at page 21, line 10 skipping to change at page 21, line 31
scheduling attempts to establish, multiple Protocol Stacks that scheduling attempts to establish, multiple Protocol Stacks that
differ based on a selection from the available Paths. Since differ based on a selection from the available Paths. Since
different Paths will have distinct configurations for local different Paths will have distinct configurations for local
addresses and DNS servers, attempts across different Paths will addresses and DNS servers, attempts across different Paths will
perform separate DNS resolution steps, which can lead to further perform separate DNS resolution steps, which can lead to further
racing of the resolved Remote Endpoints. racing of the resolved Remote Endpoints.
* Remote Endpoint Racing: Remote Endpoint Racing is the act of * Remote Endpoint Racing: Remote Endpoint Racing is the act of
attempting to establish, or scheduling attempts to establish, attempting to establish, or scheduling attempts to establish,
multiple Protocol Stacks that differ based on the specific multiple Protocol Stacks that differ based on the specific
representation of the Remote Endpoint, such as IP addresses representation of the Remote Endpoint, such as a particular IP
resolved from a DNS hostname. address that was resolved from a DNS hostname.
4.2.3. Protocol Stack Equivalence 4.2.3. Protocol Stack Equivalence
The Transport Services architecture defines a mechanism that allows The Transport Services architecture defines a mechanism that allows
applications to easily use different network paths and Protocol applications to easily make use of various network paths and Protocol
Stacks. In some cases, changing which Protocol Stacks or network Stacks without requiring major changes in application logic. In some
paths are used will require updating the preferences expressed by the cases, changing which Protocol Stacks or network paths are used will
application that uses the Transport Services system. For example, an require updating the preferences expressed by the application that
application can enable the use of a multipath or multistreaming uses the Transport Services system. For example, an application can
transport protocol by modifying the properties in its Pre-Connection enable the use of a multipath or multistreaming transport protocol by
configuration. In some cases, however, the Transport Services system modifying the properties in its Pre-Connection configuration. In
will be able to automatically change Protocol Stacks without an some cases, however, the Transport Services system will be able to
update to the application, either by selecting a new stack entirely, automatically change Protocol Stacks without an update to the
or by racing multiple candidate Protocol Stacks during connection application, either by selecting a new stack entirely, or by racing
establishment. This functionality in the API can be a powerful multiple candidate Protocol Stacks during connection establishment.
driver of new protocol adoption, but needs to be constrained This functionality in the API can be a powerful driver of new
carefully to avoid unexpected behavior that can lead to functional or protocol adoption, but needs to be constrained carefully to avoid
security problems. unexpected behavior that can lead to functional or security problems.
If two different Protocol Stacks can be safely swapped, or raced in If two different Protocol Stacks can be safely swapped, or raced in
parallel (see Section 4.2.2), then they are considered to be parallel (see Section 4.2.2), then they are considered to be
"equivalent". Equivalent Protocol Stacks need to meet the following "equivalent". Equivalent Protocol Stacks need to meet the following
criteria: criteria:
1. Both stacks MUST offer the interface requested by the application 1. Both stacks MUST offer the interface requested by the application
for connection establishment and data transmission. For example, for connection establishment and data transmission. For example,
if an application requires preservation of message boundaries, a if an application requires preservation of message boundaries, a
Protocol Stack that runs UDP as the top-level interface to the Protocol Stack that runs UDP as the top-level interface to the
skipping to change at page 22, line 20 skipping to change at page 22, line 42
requested by the application [I-D.ietf-taps-transport-security]. requested by the application [I-D.ietf-taps-transport-security].
Security features and properties, such as cryptographic Security features and properties, such as cryptographic
algorithms, peer authentication, and identity privacy vary across algorithms, peer authentication, and identity privacy vary across
security protocols, and across versions of security protocols. security protocols, and across versions of security protocols.
Protocol equivalence ought not to be assumed for different Protocol equivalence ought not to be assumed for different
protocols or protocol versions, even if they offer similar protocols or protocol versions, even if they offer similar
application configuration options. To ensure that security application configuration options. To ensure that security
protocols are not incorrectly swapped, Transport Services systems protocols are not incorrectly swapped, Transport Services systems
SHOULD only automatically generate equivalent Protocol Stacks SHOULD only automatically generate equivalent Protocol Stacks
when the transport security protocols within the stacks are when the transport security protocols within the stacks are
identical. Specifically, a transport system would consider identical. Specifically, a Transport Services system would
protocols identical only if they are of the same type and consider protocols identical only if they are of the same type
version. For example, the same version of TLS running over two and version. For example, the same version of TLS running over
different transport protocol stacks are considered equivalent, two different transport Protocol Stacks are considered
whereas TLS 1.2 and TLS 1.3 [RFC8446] are not considered equivalent, whereas TLS 1.2 and TLS 1.3 [RFC8446] are not
equivalent. However, Transport Services systems MAY allow considered equivalent. However, Transport Services systems MAY
applications to indicate that they consider two different allow applications to indicate that they consider two different
transport protocols equivalent, e.g., to allow fallback to TLS transport protocols equivalent, e.g., to allow fallback to TLS
1.2 if TLS 1.3 is not available. 1.2 if TLS 1.3 is not available.
4.2.4. Separating Connection Groups 4.2.4. Separating Connection Groups
By default, stored properties of the implementation, such as cached By default, stored properties of the implementation, such as cached
protocol state, cached path state, and heuristics, may be shared protocol state, cached path state, and heuristics, may be shared
(e.g. across multiple connections in an application). This provides (e.g. across multiple connections in an application). This provides
efficiency and convenience for the application, since the Transport efficiency and convenience for the application, since the Transport
System implementation can automatically optimize behavior. Services implementation can automatically optimize behavior.
There are several reasons, however, that an application might want to There are several reasons, however, that an application might want to
explicitly isolate some Connections. These reasons include: explicitly isolate some Connections. These reasons include:
* Privacy concerns about re-using cached protocol state that can * Privacy concerns about re-using cached protocol state that can
lead to linkability. Sensitive state may include TLS session lead to linkability. Sensitive state may include TLS session
state [RFC8446] and HTTP cookies [RFC6265]. state [RFC8446] and HTTP cookies [RFC6265].
* Privacy concerns about allowing Connections to multiplex together, * Privacy concerns about allowing Connections to multiplex together,
which can tell a Remote Endpoint that all of the Connections are which can tell a Remote Endpoint that all of the Connections are
coming from the same application (for example, when Connections coming from the same application (for example, when Connections
are multiplexed HTTP/2 or QUIC streams). are multiplexed HTTP/2 or QUIC streams).
* Performance concerns about Connections introducing head-of-line * Performance concerns about Connections introducing head-of-line
blocking due to multiplexing or needing to share state on a single blocking due to multiplexing or needing to share state on a single
thread. thread.
The Transport Services API SHOULD allow applications to explicitly The Transport Services API can allow applications to explicitly
define Connection Groups that force separation of Cached State and define Connection Groups that force separation of Cached State and
Protocol Stacks. For example, a web browser application might use Protocol Stacks. For example, a web browser application might use
Connection Groups with separate caches for different tabs in the Connection Groups with separate caches for different tabs in the
browser to decrease linkability. browser to decrease linkability.
The interface to specify these groups MAY expose fine-grained tuning The interface to specify a Connection Group can expose fine-grained
for which properties and cached state is allowed to be shared with tuning for which properties and cached state is allowed to be shared
other Connections. For example, an application might want to allow with other Connections. For example, an application might want to
sharing TCP Fast Open cookies across groups, but not TLS session allow sharing TCP Fast Open cookies across groups, but not TLS
state. session state.
5. IANA Considerations 5. IANA Considerations
RFC-EDITOR: Please remove this section before publication. RFC-EDITOR: Please remove this section before publication.
This document has no actions for IANA. This document has no actions for IANA.
6. Security Considerations 6. Security Considerations
The Transport Services architecture does not recommend use of The Transport Services architecture does not recommend use of
specific security protocols or algorithms. Its goal is to offer ease specific security protocols or algorithms. Its goal is to offer ease
of use for existing protocols by providing a generic security-related of use for existing protocols by providing a generic security-related
interface. Each provided interface translates to an existing interface. Each provided interface translates to an existing
protocol-specific interface provided by supported security protocols. protocol-specific interface provided by supported security protocols.
For example, trust verification callbacks are common parts of TLS For example, trust verification callbacks are common parts of TLS
APIs. Transport Services APIs will expose similar functionality APIs. Transport Services APIs will expose similar functionality
[I-D.ietf-taps-transport-security]. [I-D.ietf-taps-transport-security].
As described above in Section 4.2.3, if a Transport Services system As described above in Section 4.2.3, if a Transport Services system
races between two different Protocol Stacks, both MUST use the same races between two different Protocol Stacks, both SHOULD use the same
security protocols and options. security protocols and options. However, a Transport Services system
MAY race different security protocols, e.g., if the application
explicitly specifies that it considers them equivalent.
Applications need to ensure that they use security APIs Applications need to ensure that they use security APIs
appropriately. In cases where applications use an interface to appropriately. In cases where applications use an interface to
provide sensitive keying material, e.g., access to private keys or provide sensitive keying material, e.g., access to private keys or
copies of pre-shared keys (PSKs), key use needs to be validated. For copies of pre-shared keys (PSKs), key use needs to be validated. For
example, applications ought not to use PSK material created for the example, applications ought not to use PSK material created for the
Encapsulating Security Protocol (ESP, part of IPsec) [RFC4303] with Encapsulating Security Protocol (ESP, part of IPsec) [RFC4303] with
QUIC, and applications ought not to use private keys intended for QUIC, and applications ought not to use private keys intended for
server authentication as keys for client authentication. server authentication as keys for client authentication.
Moreover, Transport Services systems MUST NOT automatically fall back Moreover, Transport Services systems MUST NOT automatically fall back
from secure protocols to insecure protocols, or to weaker versions of from secure protocols to insecure protocols, or to weaker versions of
secure protocols. For example, if an application requests TLS, but secure protocols. For example, if an application requests a specific
the desired version of TLS is not available, its connection will version of TLS, but the desired version of TLS is not available, its
fail. Applications are thus responsible for implementing security connection will fail. Applications are thus responsible for
protocol fallback or version fallback by creating multiple Transport implementing security protocol fallback or version fallback by
Services Connections, if so desired. creating multiple Transport Services Connections, if so desired.
Alternatively, a Transport Services system MAY allow applications to
specify that fallback to a specific other version of a protocol is
allowed.
7. Acknowledgements 7. Acknowledgements
This work has received funding from the European Union's Horizon 2020 This work has received funding from the European Union's Horizon 2020
research and innovation programme under grant agreements No. 644334 research and innovation programme under grant agreements No. 644334
(NEAT) and No. 688421 (MAMI). (NEAT) and No. 688421 (MAMI).
This work has been supported by Leibniz Prize project funds of DFG - This work has been supported by Leibniz Prize project funds of DFG -
German Research Foundation: Gottfried Wilhelm Leibniz-Preis 2011 (FKZ German Research Foundation: Gottfried Wilhelm Leibniz-Preis 2011 (FKZ
FE 570/4-1). FE 570/4-1).
This work has been supported by the UK Engineering and Physical This work has been supported by the UK Engineering and Physical
Sciences Research Council under grant EP/R04144X/1. Sciences Research Council under grant EP/R04144X/1.
Thanks to Stuart Cheshire, Josh Graessley, David Schinazi, and Eric Thanks to Theresa Enghardt, Max Franke, Mirja Kuehlewind, Jonathan
Kinnear for their implementation and design efforts, including Happy Lennox, and Michael Welzl for the discussions and feedback that
Eyeballs, that heavily influenced this work. helped shape the architecture described here. Thanks as well to
Stuart Cheshire, Josh Graessley, David Schinazi, and Eric Kinnear for
their implementation and design efforts, including Happy Eyeballs,
that heavily influenced this work.
8. References 8. References
8.1. Normative References 8.1. Normative References
[I-D.ietf-taps-interface] [I-D.ietf-taps-interface]
Trammell, B., Welzl, M., Enghardt, T., Fairhurst, G., Trammell, B., Welzl, M., Enghardt, T., Fairhurst, G.,
Kuehlewind, M., Perkins, C., Tiesel, P., Wood, C., and T. Kuehlewind, M., Perkins, C., Tiesel, P., Wood, C., and T.
Pauly, "An Abstract Application Layer Interface to Pauly, "An Abstract Application Layer Interface to
Transport Services", Work in Progress, Internet-Draft, Transport Services", Work in Progress, Internet-Draft,
skipping to change at page 25, line 21 skipping to change at page 26, line 9
Welzl, M. and S. Gjessing, "A Minimal Set of Transport Welzl, M. and S. Gjessing, "A Minimal Set of Transport
Services for End Systems", Work in Progress, Internet- Services for End Systems", Work in Progress, Internet-
Draft, draft-ietf-taps-minset-11, 27 September 2018, Draft, draft-ietf-taps-minset-11, 27 September 2018,
<http://www.ietf.org/internet-drafts/draft-ietf-taps- <http://www.ietf.org/internet-drafts/draft-ietf-taps-
minset-11.txt>. minset-11.txt>.
[I-D.ietf-taps-transport-security] [I-D.ietf-taps-transport-security]
Enghardt, T., Pauly, T., Perkins, C., Rose, K., and C. Enghardt, T., Pauly, T., Perkins, C., Rose, K., and C.
Wood, "A Survey of the Interaction Between Security Wood, "A Survey of the Interaction Between Security
Protocols and Transport Services", Work in Progress, Protocols and Transport Services", Work in Progress,
Internet-Draft, draft-ietf-taps-transport-security-10, 17 Internet-Draft, draft-ietf-taps-transport-security-11, 5
November 2019, <http://www.ietf.org/internet-drafts/draft- March 2020, <http://www.ietf.org/internet-drafts/draft-
ietf-taps-transport-security-10.txt>. ietf-taps-transport-security-11.txt>.
[POSIX] "IEEE Std. 1003.1-2008 Standard for Information Technology [POSIX] "IEEE Std. 1003.1-2008 Standard for Information Technology
-- Portable Operating System Interface (POSIX). Open -- Portable Operating System Interface (POSIX). Open
group Technical Standard: Base Specifications, Issue 7", group Technical Standard: Base Specifications, Issue 7",
2008. 2008.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, DOI 10.17487/RFC0793, September 1981, RFC 793, DOI 10.17487/RFC0793, September 1981,
<https://www.rfc-editor.org/info/rfc793>. <https://www.rfc-editor.org/info/rfc793>.
 End of changes. 74 change blocks. 
218 lines changed or deleted 247 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/