3 ms·
The reason for uTP using UDP is clear. When you are sending a complete file from one computer to another, you can send it in any order. With TCP the packets nee
by exDM69 3y ago
The reason for uTP using UDP is clear. When you are sending a complete file from one computer to another, you can send it in any order. With TCP the packets need to arrive in order (at least within the sliding window) or they get rejected which is wasteful.
Another reason is the custom flow control. The uTP protocol uses a scheme called LEDBAT (RFC 6817) which is a high bandwidth, high latency "scavenger" protocol that uses all the available bandwidth but tries to take a lower priority than TCP connections. This allows your web browsing to be smooth while your OS updates or Torrents are chugging along in the background. Microsoft and Apple both use a LEDBAT based UDP protocol for updates.
On the other side of the spectrum there are video games and audio/video live streams. They use UDP protocols but with a flow control that minimizes latency at the expense of bandwidth. The polar opposite of what uTP/LEDBAT does.
With TCP you get the flow control algorithm of the protocol. While there is a little configurability in the kernel, you can't adjust it from the application.
UDP protocols also need a handshake not unlike TCP three way, but you can include payload bytes or crypto key exchange in those packets to avoid TCP+TLS "six way handshake".
The LEDBAT flow control scheme is absolutely brilliant, using just some simple timestamps to evaluate network congestion. If you're looking for a nice Saturday geek reading, RFC 6817 is a good candidate.
https://en.m.wikipedia.org/wiki/LEDBAT https://en.m.wikipedia.org/wiki/LEDBAT