Live data from Hacker News

MPTCP for Linux

mptcp.dev

21–30 of 31 posts

Re: MPTCP for Linux

#21
post #19

Earlier quoted context omitted.

SCTP has several fundamental design flaws, which are sufficient to discourage anyone from actually trying to make all the middleware support it.

What are those flaws? And are they inherent, or something that could be fixed with enhancements/revisions? TCP as originally specified had fundamental design flaws too, but the TCP of today has significant differences from the 1981 TCP standard (not the first version of TCP, but the first version to see significant production use).

Off the top of my head: stream count is static (an extension exists nowadays, but it's still usually unsupported), startup requires requires excessive round trips, and it's unfixably insecure (TCP actually shares this last flaw - you can only detect, not discard, injected packets - and this causes massive reliability problems in the real world). Some of the default tools were also horribly flawed even by 1990s standards (e.g. a shell script which uses $* instead of $@) last I checked.

Certainly there are things that could be done to improve the ecosystem - but why bother when you can just use a reliability layer on top of UDP instead? And these days there's a "standard" solution so you don't even need to compare choices or worry about design flaws affecting just your program: just use QUIC, everybody uses it and if something goes wrong the world will scream and the shared library will be upgraded by the distro.

Re: MPTCP for Linux

#22
If anyone is unaware:

MPTCP being enabled on a server is what makes clients running on Apple devices magically not time out when you walk out of Wi-Fi range or switch to LTE (and is behind the “Wi-Fi Assist” setting/feature). iOS and macOS have had it quietly on by default for years: at first just iCloud etc. used it under the hood but for instance WeChat started enabling it like a decade ago for the improved performance.

With MPTCP, the same TCP session hops networks mid-flight. Without it, these seamless handoffs are at best fast reconnects. It’s one of those Apple things that “just works”; on your Linux server you need to flip it on in `socket()` or look into `mptcpize` last I checked but it’s no big deal. I dont think it’s well supported as a client yet and who knows if Android will ever.

(the “Wi-Fi Assist” toggle in Settings doesn’t enable/disable MPTCP, it is on regardless, but it decides if iOS will spin up a cellular subflow when Wi-Fi starts flaking out. It will use some metered data, hence the user-facing toggle.)

Re: MPTCP for Linux

#24
post #5
post #4

Sort of related, I'm curious why SCTP did not take off more in this space? It might have had more telecom origins maybe but seemed to fill some of the same needs back in the day. https://docs.kernel.org/networking/sctp.html PS the kernel work goes back to 2003!

I believe it's because of firewalls. You need to be either UDP or TCP to work in the Internet at large. Though SCTP did find its place as a layer in WebRTC.

SCTP was (and probably still is) supported in many NAT devices, firewalls, and other middleboxes.

Re: MPTCP for Linux

#25

I've tried to get MPTCP support in Chrome (default OFF, with a knob to turn on in GUI) but the reason most often people gave was that there is how to handle support. Heck. I even tried to add it into git because i was having issues with reliable connectivity with WiFi and 5G (i was in a hotel at that time) while working on a project. So unless, if there is some reason why people kept giving reasons of not include it.…

z/OS has this interesting feature AT-TLS (Application Transparent TLS)-an app requesting a plaintext socket may silently get a TLS socket instead (with the TLS implemented in the OS), based on a policy defined by the system administrator.

Maybe the solution might be something similar… an app asks for a TCP socket, but (if the request matches a policy) it gets an MPTCP socket instead-so you could make apps use MPTCP even if they weren’t compiled to support it.

Maybe you could implement this using LD_PRELOAD/ptrace/eBPF/etc

Re: MPTCP for Linux

#26

I've tried to get MPTCP support in Chrome (default OFF, with a knob to turn on in GUI) but the reason most often people gave was that there is how to handle support. Heck. I even tried to add it into git because i was having issues with reliable connectivity with WiFi and 5G (i was in a hotel at that time) while working on a project. So unless, if there is some reason why people kept giving reasons of not include it.…

z/OS has this interesting feature AT-TLS (Application Transparent TLS)-an app requesting a plaintext socket may silently get a TLS socket instead (with the TLS implemented in the OS), based on a policy defined by the system administrator. Maybe the solution might be something similar… an app asks for a TCP socket, but (if the request matches a policy) it gets an MPTCP socket instead-so you could make apps use MPTCP e…

There are different ways to force an app to use MPTCP, where the most convenient method is 'mptcpize run ', see: https://www.mptcp.dev/setup.html#force-applications-to-use-m...

But the best is to let the app (and their users) controlling that, with a nice option. With Chrome/Firefox/..., we could enable MPTCP per domain for example.

Re: MPTCP for Linux

#27
post #22

If anyone is unaware: MPTCP being enabled on a server is what makes clients running on Apple devices magically not time out when you walk out of Wi-Fi range or switch to LTE (and is behind the “Wi-Fi Assist” setting/feature). iOS and macOS have had it quietly on by default for years: at first just iCloud etc. used it under the hood but for instance WeChat started enabling it like a decade ago for the improved perform…

More and more apps (mostly server apps) have a dedicated option to enable MPTCP. Some server apps have even decided to enable MPTCP support by default, which makes sense: if MPTCP is not requested, TCP is used like before. Note that server apps written in Go usually have MPTCP enabled by default (if supported by the OS/kernel). See: https://www.mptcp.dev/apps.html

mptcp.io monitors servers supporting MPTCP.

> I dont think it’s well supported as a client yet

It is: by default, NetworkManager will configure MPTCP endpoints, so app can use multiple interfaces (if any). See: https://www.mptcp.dev/pm.html

> who knows if Android will ever

Sadly, it is difficult to talk to people in charge there. A few years ago, they were interested in MPTCP, but it was not available in the official Linux kernel. Now it is, and easily accessible (especially for small actors)... but Google has enough resources to find and use alternatives they fully control.

Re: MPTCP for Linux

#28
post #23

Track MPTCP adoption: https://mptcp.io/

MPTCP is supported by more and more servers these days!

Note: if you don't see the two large graphs at the top, disable ad-blockers and/or try with another browser.

Re: MPTCP for Linux

#29
post #15
post #11

Seems like a fool's errand. The cited RFC8684 starts from the wrong premise: > TCP/IP communication is currently restricted to a single path per connection, yet multiple paths often exist between peers. In reality, IP modules of all the hosts and routers can load-balance over a set of all available interfaces, as long as global routing information is available.

It is very rare that a single TCP connection will be load-balanced over multiple interfaces, since that would frequently cause out-of-order delivery, which sucks quite a lot if the receiver isn't prepared for it.

Isn't every TCP implementation required to deal with receiving packages out-of-order? That is one of the abstraction TCP provides.

Re: MPTCP for Linux

#30
post #15

Earlier quoted context omitted.

It is very rare that a single TCP connection will be load-balanced over multiple interfaces, since that would frequently cause out-of-order delivery, which sucks quite a lot if the receiver isn't prepared for it.

Isn't every TCP implementation required to deal with receiving packages out-of-order? That is one of the abstraction TCP provides.

Yes, but not performantly so. In particular, out-of-order delivery is likely to be seen as packet loss, signalling TCP to reduce the transfer speed in one way or the other.
Post reply on HN