News for hackers. Stuff that matters.
Re:HTTP/3 Is Fast by tlamponi on Wednesday December 15, 2021 @07:19AM (#29564945)
> If I want to read an article that is 50kB of text, it's not unreasonable to expect that information to be here before my finger leaves the ENTER key, regardless of how its transmitted.

I mean no, but it can be unreasonable to expect that physical limits get beaten if you have in mind that some people just have a few hundred to a thousand KM between their computer and the server they access.

E.g., in my hometown I may get latencies of 200 ms and more to a few sites, especially simpler ones that have no CDN but are a single server on the other end of the world. Don't get me started if I'm travelling between Vienna and South Tyrol using the train, in some parts (cough Germany) the internet is really spotty and latency spikes up to 10 to 20s are (sadly) rather normal for a few minutes here and there.

Now, with HTTP 1.1 over TCP and TLS involved the setup time already gets me to almost a second of wait time (more than the few tens of ms my finger needs to leave the Enter key) in the former setup and in the latter I may need 30 to 60s, or it even just times out when travelling by train and being in a bad spot, connectivity wise.

QUIC improves there, TLS handshake starts immediately and UDP setup needs less round-times (none) compared to TCP (even with TCP fast-open).

So simple websites can profit too from QUIC, initial load time can get reduced a lot, browsing them is finally doable also on remote, spotty connections. Also, I happen to develop applications that are delivered as web app, they just tend to acquire a certain complexity even if one tries to stay simple, so loading that faster even if nothing is already cached is a welcome thing to me.

Bloated page still will be slow, sure faster than with HTTP 1.1 but still slow, and I definitively would like to see that getting improved, but that's not really related to the issues that QUIC improves on, as simple websites win too when using it; it's just less noticeable there if you already have a somewhat OK connection.

In summary: Why not invent a new protocol if you can significantly reduce overhead for everyone, especially if it can coexist with the simple and established one.

Re:HTTP/3 Is Fast by usrbinbash on Wednesday December 15, 2021 @08:29AM (#29565598)
>In summary: Why not invent a new protocol

Pretty sure I said nowhere that we shouldn't invent new and better protocols. QUIte the contrary (pardon the pun).

What I am saying is: We should not need to rely on new protocols to make up for the fact that we send more and more garbage, we should send less garbage.

If we can get less garbage, and new and improved protocols, all the better!

But if all we do is invent better protocols, the result will be that what buries the internet in garbage now, will use that better protocol to bury us in even more garbage.

Re:HTTP/3 Is Fast by ReactiveJelly on Wednesday December 15, 2021 @09:47AM (#29566625)
"rely" is doing a lot of lifting in that sentence. It's more productive to talk about improvements.

You're saying it's good to make sites smaller, and I agree. You're saying QUIC is good, and I agree.

What do you want? To just complain that bad sites exist? Is this "what-aboutism" for programmers?

I'm sorry, usrbinbash. I'm sorry that bad things happen, and I wish I could make you happy.

Re:HTTP/3 Is Fast by Dylan16807 on Wednesday December 15, 2021 @03:21PM (#29571129)
> What do you want?

How about for people to recognize that this performance gift is easily squandered, and talk about how we're going to prevent bloat so that we can preserve the good performance.

Re:HTTP/3 Is Fast by deepstack on Wednesday December 15, 2021 @07:23AM (#29564996)
>QUIC improves there, TLS handshake starts immediately and UDP setup needs less round-times compared to TCP.

hmmm abit skeptical on the less round-times. Are the all the round-times in TCP to ensure the integrity of the connection. With UPD it is my understanding that no confirmation of receiving packet is issued. So a server can send out a signal, but never can be sure if the client got it. I can see it can be great for multiplexing/broadcasting, but the switch the whole http protocol over like this, I can't imagine there won't be tons integrity and security issues.

Re:HTTP/3 Is Fast by simiones on Wednesday December 15, 2021 @07:50AM (#29565256)
QUIC is a combination of TLS and TCP essentially, implemented over UDP so that there is some chance that middle-boxes will allow it to pass (there's very little chance to actually use a completely new protocol over IP directly and have your packets received by the vast majority of networks).

HTTP over QUIC will probably do a similar number of round-trips compared to HTTP over TCP, but it will do much fewer than HTTP over TLS over TCP. There's no getting away from SYN/SYN-ACK/ACK for a reliable protocol, but QUIC can put certificate negotiation information directly here, instead of the TLSoTCP approach of SYN/SYN-ACK/ACK/ClientHello/ServerHello/ClientKeyExchange/ServerKeyExchange.

Additionally, QUIC supports multiple streams over a single physical connection, and correctly implements packet ordering constraints and retries for them. TCP supports a single stream over a connection: any delayed packet will delay the entire stream. In QUIC, a delayed packet will only delay packets from the same logical stream, packets from other streams can still be received successfully on the same connection.

This feature is heavily used by HTTP/3: HTTP/2 introduced a concept of HTTP streams, but all HTTP streams were run over the same TCP connection, so over a single TCP stream: a slow packet on HTTP/2 stream 1 will delay all packets from HTTP/2 streams 2, 3 etc. With QUIC, an HTTP/3 stream is a QUIC stream, so a single slow request will not blkc other packets from other requests from being received.

Re:HTTP/3 Is Fast by benmmurphy on Wednesday December 15, 2021 @03:44PM (#29571384)
Weirdly enough I think QUIC often does something that is not much better because of address validation. It is not safe for the QUIC server to send a bunch of large packets back to the client source address without being confident the client controls the address. We run QUIC in production so I’ll grab an example conversation to show how many round trips connection setup takes. I guess we might not be optimising connection setup correctly because we are using long running QUIC connections to transport our own protocol and I don’t care how long the connection setup takes.

so we are using a slightly older version of QUIC than the RFC and using go-quic on server and client. and this is what i see when creating a connection:

    Client: Initial (1284 bytes) includes client hello
    Server: Retry (166 bytes) includes retry token
    Client: Initial (1284 bytes) including retry token and client hello
    Server: Server Hello/Encrypted Extensions/Cert 
    Request/Certificate/Certificate Verify/Finished (1284 bytes) 
    Client: Certificate/Certificate Verify/Finished (1284 bytes)
address validation is covered in RFC 9000:

https://datatracker.ietf.org/doc/html/rfc9000#section-8.1

probably what go-quic does is not optimal because you don't always have to validate the address.

   Prior to validating the client address, servers MUST NOT send more
   than three times as many bytes as the number of bytes they have
   received.  This limits the magnitude of any amplification attack that
   can be mounted using spoofed source addresses.  For the purposes of
   avoiding amplification prior to address validation, servers MUST
   count all of the payload bytes received in datagrams that are
   uniquely attributed to a single connection.  This includes datagrams
   that contain packets that are successfully processed and datagrams
   that contain packets that are all discarded.

...

    A server might wish to validate the client address before starting
   the cryptographic handshake.  QUIC uses a token in the Initial packet
   to provide address validation prior to completing the handshake.
   This token is delivered to the client during connection establishment
   with a Retry packet (see Section 8.1.2) or in a previous connection
   using the NEW_TOKEN frame (see Section 8.1.3).
Re:HTTP/3 Is Fast by dtech on Wednesday December 15, 2021 @08:07AM (#29565394)
TCP is not the only way to ensure integrity, QUIC protocol ensures it, using UDP as transport. This is how all new protocols do it since there's too many hardware and software roadblocks to use anything but TCP and UDP.
Re:HTTP/3 Is Fast by salawat on Wednesday December 15, 2021 @08:51AM (#29565885)
Only because no one wants to upgrade their damn backbone NICS. SCTP solved things way better than QUIC imo except for the infrastructure inertia part.

The infrastructure inertia part isn't even so much a question of technical infeasibility, but greed. So much spending was slotted to carriers to improve their networks, but instead of investing in capacity and protocol upgrades, it all went to lobbying/exec bonuses.

Re:HTTP/3 Is Fast by lttlrck on Wednesday December 15, 2021 @09:09AM (#29566111)
SCTP runs over UDP too. The main reason for not picking it is likely the TLS handshake optimizations they wanted.
Re:HTTP/3 Is Fast by salawat on Wednesday December 15, 2021 @09:52AM (#29566685)
It does not run on UDP. It provides a UDP like best-effort transmission mode though, while also optionally allowing for interweaving reliable connection features.

If SCTP really ran on UDP. I'd have no reason to be salty, because we'd already be using it.

Re:HTTP/3 Is Fast by Dylan16807 on Wednesday December 15, 2021 @03:28PM (#29571209)
RFC 6951. It can run over UDP if you want it to, with a clear guide for how to do it.

> I'd have no reason to be salty, because we'd already be using it.

Direct OS support is a big deal, and UDP gets messed with too. If someone made SCTP-over-UDP the default mode, while changing nothing else, I don't think it would affect adoption at all.

Re:HTTP/3 Is Fast by xibo9 on Wednesday December 15, 2021 @12:26PM (#29568946)
Nope, SCTP runs at the same layer as UDP.