Hacker News new | ask | show | jobs
by mike_d 2266 days ago
HTTP/2 with stream prioritization and server push kinda replaces the need for UDP.

We can't allow UDP to be sent directly from browsers because that would enable any random bit of JavaScript you load to launch a DDoS attack.

2 comments

HTTP/2 doesn’t replace the need for UDP at all, not in the slightest. For latency-sensitive applications, it provides no advantages over HTTP that I can tell.

The problem is with TCP, and the problem with TCP is that it prioritizes in-order delivery, and missed packets cause head of line blocking. HTTP/2 is designed to solve head of line blocking, but since it’s built on top of TCP, it can’t solve the issue in this case.

UDP was never "needed". It's been used in real-time applications because there are latency benefits to datagram protocols.

And browsers can indeed use UDP. WebRTC data channels are SCTP over DTLS, which is UDP based.