Multipath TCP vs Single-Path TCP: Why One Connection Refuses to Pick a Lane
For decades, a TCP connection has been defined by four numbers: the two addresses and the two ports at either end. Change one of them and the connection is over. That definition was reasonable when a machine had one network interface and stayed put; it is less reasonable when a phone walks out of a cafe, loses Wi-Fi, and acquires a cellular address in the space of a second. A single-path TCP…
In the evolving world of technology, traditional TCP connections are defined by four numbers representing the two addresses and two ports at each end. This works fine when devices stay in one place, but it becomes less practical when a device like a phone moves between networks. Multipath TCP (MP-TCP) addresses this issue by providing a connection identity that persists even as subflows change beneath it.
Unlike traditional TCP, MP-TCP maintains a single sequence space, congestion window, and path. If the primary route is lost, applications handle the situation at higher layers by retrying the download, reconnecting a video call, or beginning a file upload from the last checkpoint. MP-TCP introduces a connection-level layer above ordinary TCP subflows, enabling a handshake using the MP_CAPABLE option to establish a connection token.
Subflows are added with the MP_JOIN option, addresses can be advertised with ADD_ADDR, and a data sequence number carried in the DSS option maps bytes from the connection stream onto the appropriate subflow.
The key advantage of MP-TCP lies in its ability to aggregate bandwidth and maintain continuity. Multiple subflows can utilize the available bandwidth more efficiently, potentially achieving speeds close to the sum of the individual connections. Furthermore, MP-TCP provides continuity by allowing a device to seamlessly switch between networks (e.g., moving from Wi-Fi to cellular) without dropping the existing connection.
This eliminates the need for new TCP handshakes, TLS resumption, or application retries, resulting in substantial bandwidth savings for long transfers.
However, the deployment of MP-TCP faces several challenges. Both endpoints must support the extension, and while mobile operating systems have provided client support for years, many applications do not enable it, and servers may not accept it. Middleboxes, such as NATs and firewalls, often struggle to handle the additional TCP options required for MP-TCP, leading to a failure in establishing subflows.
Additionally, application developers often do not prioritize MP-TCP adoption, as the fallback to ordinary TCP works well enough.
Congestion and ordering pose further complexities for MP-TCP. Multiple subflows sharing the same bottleneck can lead to a fairness problem, as each subflow occupies a portion of the bandwidth. Coupled congestion control algorithms help manage this issue by adjusting the congestion windows of all subflows together. However, ordering becomes more challenging as packets arriving out of order need to be buffered until the connection-level sequence catches up.
This situation can lead to head-of-line blocking, where a slow path holds up delivery of bytes that arrived quickly on a faster subflow. Despite these challenges, MP-TCP remains a mature, specified, and implemented protocol in mainstream kernels, with the potential to significantly improve bandwidth utilization and maintain continuity for mobile devices.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to