Hacker News new | ask | show | jobs
by JoeSmithson 2157 days ago
The reason UDP is less leaky is not because it meets any guarantee better, but because it guarantees less
1 comments

IMHO the switch to UDP is happening because the work TCP is doing to ensure reliability is now done at network and thus having TCP do it is redundant. TCP assumed very simple and dumb network, which is no longer the case.
You should have a look at the paper “end-to-end arguments in system design” - http://web.mit.edu/Saltzer/www/publications/endtoend/endtoen...

More or less reliability in the datagram layers affects performance - for example, WiFi does its own retransmissions whereas ethernet does not, because WiFi uses a less reliable physical layer, and because you don’t want your packets to have to go from London to New York and back before you discover one of them was lost.

But reliability at the WiFi later cannot give your application the semantics of an ordered data stream, so it is not a substitute for TCP. You can replace TCP with a different transport protocol if you want different behaviour, eg SCTP or DTLS or QUIC, but in all cases they are providing a higher level abstraction than raw datagrams, not just (and not necessarily) more reliability.