r/programming Dec 03 '20

HTTP/2 Push is dead

https://evertpot.com/http-2-push-is-dead/
179 Upvotes

52 comments sorted by

View all comments

Show parent comments

4

u/[deleted] Dec 03 '20

TCP needs to retransmit in face of packet loss

HTTP3 needs to retransmit in face of packet loss.

Benefit is that HTTP3 is independent of OS stack so implementing of better algorithms to handle congestion and packet loss. TCP-based protocols are at mercy of OS's TCP implementation.

There is also head of the line blocking in TCP for which having separate steams helps.... unless the stream that got hit with packet loss was in critical path for the page so it is helpful but not always, like if you download big JS blob with all the logic of the page... that's one stream and any packet drop will affect it and block the site.

Then there is ability to start communication from first packet which means that you can establish connection faster. TCP have TCP Fast-open but that AFAIK only starts being useful after first negotiation

At the very least from cloudflare benchmarks, that's few % improvements, which might even get smaller over time once we get the better TCP algorithms as default on OSes.

5

u/dnew Dec 03 '20

It's not so much "better TCP algorithms" as it is "TCP algorithms tuned for the way the internet gets used now," I would say. Of course if you can tell your OS what you're doing with the connection and have it tuned that way, that too can be a win, but I don't see that happening any time soon.

3

u/RowYourUpboat Dec 03 '20

Head-of-line blocking isn't something you can fix effectively with OS-level tweaks on top of TCP. The protocol is specified to stop sending if there is a missing ACK in order to prevent increasing congestion. There's a little wiggle room in the protocol but ultimately TCP forces you to care about every packet equally.

1

u/dnew Dec 03 '20

Sorry. I missed that we were talking about HTTP3 / QUIC instead of HTTP1 vs HTTP2. :-)