Many Application Programming Interfaces (APIs) to provide transport interfaces to networks have been deployed, perhaps the most widely known and imitated being the BSD Socket interface (Socket API) [POSIX].
The naming of objects and functions across these APIs is not consistent and varies, depending on the protocol being used.
For example, the concept of sending and receiving streams of data is the same for both an unencrypted Transmission Control Protocol (TCP) stream and operating on an encrypted Transport Layer Security (TLS) stream [RFC8446] over TCP, but applications cannot use the same socket send()
and recv()
calls on top of both kinds of connections.
Similarly, terminology for the implementation of transport protocols varies based on the context of the protocols themselves: terms such as "flow", "stream", "message", and "connection" can take on many different meanings.
This variety can lead to confusion when trying to understand the similarities and differences between protocols and how applications can use them effectively.¶
The goal of the Transport Services System architecture is to provide a flexible
and reusable system with a common interface for transport protocols.
An application uses the Transport Services System through an abstract Connection (we use capitalization to distinguish these from the underlying connections of, for example, TCP).
This provides
flexible connection establishment allowing an application to request or require a set of properties.¶
As applications adopt this interface, they will benefit from a wide set of transport features that can evolve over time
and will ensure that the system providing the interface can optimize its behavior based on the application requirements
and network conditions, without requiring changes to the applications. This flexibility enables faster deployment of new features and protocols.¶
This architecture can also support applications by offering racing mechanisms (attempting multiple IP addresses, protocols, or network paths in parallel), which otherwise need to be implemented in each application separately (see Section 4.2.2). Racing selects one or more candidates, each with equivalent Protocol Stacks that are used to identify
an optimal combination of a transport protocol instance such as TCP, UDP, or another transport, together with configuration of parameters and
interfaces.
A Connection represents an object that, once established, can be used to send and receive messages.
A Connection can also be created from another Connection, by cloning, and then forms a part of a Connection Group whose Connections share properties.¶
This document was developed in parallel with the specification of the Transport Services API [RFC9622] and implementation guidelines [RFC9623]. Although following the Transport Services architecture does not require all APIs and implementations to be identical, a common minimal set of features represented in a consistent fashion will enable applications to be easily ported from one implementation of the Transport Services System to another.¶
The architecture of the Transport Services System is based on the survey of services provided by IETF transport protocols and congestion control mechanisms [RFC8095] and the distilled minimal set of the features offered by transport protocols [RFC8923]. These documents identified common features and patterns across all transport protocols developed thus far in the IETF.¶
Since transport security is an increasingly relevant aspect of using transport protocols on the Internet, this document also considers the impact of transport security protocols on the feature set exposed by Transport Services [RFC8922].¶
One of the key insights to come from identifying the minimal set of features provided by transport protocols [RFC8923] was that features either (1) require application interaction and guidance (referred to in that document as Functional or Optimizing Features) or (2) can be handled automatically by an implementation of the Transport Services System (referred to as Automatable Features). Among the identified Functional and Optimizing Features, some are common across all or nearly all transport protocols, while others present features that, if specified, would only be useful with a subset of protocols, but would not harm the functionality of other protocols. For example, some protocols can deliver messages more quickly for applications that do not require messages to arrive in the order in which they were sent. This functionality needs to be explicitly allowed by the application, since reordering messages would be undesirable in many cases.¶
The following sections describe the Transport Services System:¶
-
Section 2 describes how the Transport Services API model differs from that of traditional socket-based APIs. Specifically, it offers asynchronous event-driven interaction, the use of messages for data transfer, and the flexibility to use different transport protocols and paths without requiring major changes to the application.¶
-
Section 3 explains the fundamental requirements for a Transport Services System. These principles are intended to make sure that transport protocols can continue to be enhanced and evolve without requiring significant changes by application developers.¶
-
Section 4 presents the Transport Services Implementation and defines the concepts that are used by the API [RFC9622] and described in the implementation guidelines [RFC9623]. This introduces the Preconnection, which allows applications to configure Connection Properties.¶
The key words "MUST", "MUST NOT",
"REQUIRED", "SHALL",
"SHALL NOT", "SHOULD",
"SHOULD NOT",
"RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document
are to be interpreted as described in BCP 14
[RFC2119] [RFC8174] when, and only
when, they appear in all capitals, as shown here.¶
This subsection provides a glossary of key terms related to the Transport Services architecture. It provides a short description of key terms that are defined later in this document.¶
- Application:
- An entity that uses the transport layer for end-to-end delivery of data across the network [RFC8095].¶
- Cached State:
- The state and history that the Transport Services Implementation keeps for each set of the associated Endpoints that have been used previously.¶
- Candidate Path:
- One path that is available to an application and conforms to the Selection Properties and System Policy during racing.¶
- Candidate Protocol Stack:
- One Protocol Stack that can be used by an application for a Connection during racing.¶
- Client:
- The peer responsible for initiating a Connection.¶
- Clone:
- A Connection that was created from another Connection and that forms a part of a Connection Group.¶
- Connection:
- Shared state of two or more Endpoints that persists across Messages that are transmitted and received between these Endpoints [RFC8303]. When this document and other Transport Services documents use the capitalized "Connection" term, it refers to a Connection object that is being offered by the Transport Services system, as opposed to more generic uses of the word "connection".¶
- Connection Context:
- A set of stored properties across Connections, such as cached protocol state, cached path state, and heuristics, which can include one or more Connection Groups.¶
- Connection Group:
- A set of Connections that share properties and caches.¶
- Connection Property:
- A Transport Property that controls per-Connection behavior of a Transport Services Implementation.¶
- Endpoint:
- An entity that communicates with one or more other endpoints using a transport protocol.¶
- Endpoint Identifier:
- An identifier that specifies one side of a Connection (local or remote), such as a hostname or URL.¶
- Equivalent Protocol Stacks:
- Protocol Stacks that can be safely swapped or raced in parallel during establishment of a Connection.¶
- Event:
- A primitive that is invoked by an Endpoint [RFC8303].¶
- Framer:
- A data translation layer that can be added to a Connection to define how application-layer Messages are transmitted over a Protocol Stack.¶
- Local Endpoint:
- The local Endpoint.¶
- Local Endpoint Identifier:
- A representation of the application's identifier for itself that it uses for a Connection.¶
- Message:
- A unit of data that can be transferred between two Endpoints over a Connection.¶
- Message Property:
- A property that can be used to specify details about Message transmission or obtain details about the transmission after receiving a Message.¶
- Parameter:
- A value passed between an application and a transport protocol by a primitive [RFC8303].¶
- Path:
- A representation of an available set of properties that a Local Endpoint can use to communicate with a Remote Endpoint.¶
- Peer:
- An Endpoint application party to a Connection.¶
- Preconnection:
- An object that represents a Connection that has not yet been established.¶
- Preference:
- A preference for prohibiting, avoiding, ignoring, preferring, or requiring a specific transport feature.¶
- Primitive:
- A function call that is used to locally communicate between an application and an Endpoint, which is related to one or more transport features [RFC8303].¶
- Protocol Instance:
- A single instance of one protocol, including any state necessary to establish connectivity or send and receive Messages.¶
- Protocol Stack:
- A set of Protocol Instances that are used together to establish connectivity or send and receive Messages.¶
- Racing:
- The attempt to select between multiple Protocol Stacks based on the Selection and Connection Properties communicated by the application, along with any Security Parameters.¶
- Remote Endpoint:
- The peer that a local Endpoint can communicate with when a Connection is established.¶
- Remote Endpoint Identifier:
- A representation of the application's identifier for a peer that can participate in establishing a Connection.¶
- Rendezvous:
- The action of establishing a peer-to-peer Connection with a Remote Endpoint.¶
- Security Parameters:
- Parameters that define an application's requirements for authentication and encryption on a Connection.¶
- Selection Property:
- A Transport Property that can be set to influence the selection of paths between the Local and Remote Endpoints.¶
- Server:
- The peer responsible for responding to a Connection initiation.¶
- Socket:
- The combination of a destination IP address and a destination port number [RFC8303].¶
- System Policy:
- The input from an operating system or other global preferences that can constrain or influence how an implementation will gather Candidate Paths and Protocol Stacks and race the candidates during establishment of a Connection.¶
- Transport Feature:
- A specific end-to-end feature that the transport layer provides to an application.¶
- Transport Property:
- A property that expresses requirements, prohibitions, and preferences [RFC8095].¶
- Transport Service:
- A set of transport features, not associated with any given framing protocol, that provides a complete service to an application.¶
- Transport Services Implementation:
- All objects and protocol instances used internally to a system or library to implement the functionality needed to provide a transport service across a network, as required by the abstract interface.¶
- Transport Services System:
- The Transport Services Implementation and the Transport Services API.¶