Hacker News new | ask | show | jobs
by IgorPartola 257 days ago
UDP introduced ports. Ports are not always the best abstraction for specifying which application is talking to which other application. They are finite.

I am very aware of what you can do with UDP, I have done some very fun work trying to minimize bandwidth usage on crappy mobile connections by using and abusing it. But I think at the end of the day it is an engineering crutch.

If we insisted on properly supporting a diverse set of L4 protocols years ago we wouldn’t have wound up with NAT and slow adoption of IPv6. Address exhaustion would have been a real pressing issue. Instead you can’t even ping a server behind a NAT and firewalls run out of memory trying to manage stateful connections.

UDP is a pretty elegant design for what it is but it is barely good enough to allow us some room to make things work. Ultimately it did limit us more than it enabled us.

1 comments

Ports are just a multiplexing device, the same as the IP protocol number. Besides the tiny number of bytes in the UDP header, what's the practical difference?
Negligible to none as of now. But take a look at this comment below: https://news.ycombinator.com/item?id=45528837

And I agree: it stifled what could have been a much nicer to work with set of protocols and who knows what could have been created had we not just said "well there is always UDP if you want to do your own thing".

Stifled how? You want SCTP? Allocate a UDP port for it. You still haven't explained what the problem is.
OK let’s put it this way: what is the point of IP being able to carry protocols other than ICMP, TCP, and UDP? For that matter why doN’t TCP and ICMP run on top of UDP?
There isn't one! TCP running on top of UDP would have been a reasonable design. TCP/IP is full of warts like this. The URG pointer. The conflicting length fields.

The fact of ICMP not being itself a UDP protocol caused major problems for systems programmers, because it meant that OS kernels all "owned" ICMP, provided only a baroque sockopt programming interface to like 5% if it, and required userland programs to hold suser privileges to do any real ICMP work. Awful design. And ICMP is slow-pathed by routers, because it isn't UDP.

UDP literally doesn't do anything but multiplex raw IP. Unless you're actually worried about the 8 bytes the header takes up, there's no reason, none at all, to slide a new IP protocol anywhere but on top of UDP. Again: that's why UDP was designed in the first place. You can go look this up! David Reed still talks about it!

Isn’t WebTransport more or less TCP (reimagined I guess but it’s key functionality and set of capabilities) running on UDP while also able to play well with the web’s security model.