4 ms·
You do want to download multiple assets like images in parallel over the same connection since you can’t open that many connections per domain.
by TravelPiglet 6y ago
You do want to download multiple assets like images in parallel over the same connection since you can’t open that many connections per domain.
- coddle-hark 6y agoThat’s not a fundamental limitation of TCP though. You can theoretically open 4294967296 sockets between two machines (with one IP address per machine) and a beefy machine can handle >1M concurrent connections. They’ve already proposed adding HTTPS and SVCB DNS records for performance, it would be easy enough to implement a ICANTAKEIT record that lets the browser know it’s OK to open as many sockets as it needs.
- CydeWeys 6y agoIt's a bigger lift than just switching from TCP to QUIC though. And there's other reasons you wouldn't want to use as many connections as you have assets to download; each connection has startup overhead.
- coddle-hark 6y agoN connections have the same startup overhead as a single connection though, since they’re made in parallel.
- a1369209993 6y agoA single (TCP) connection has a single SYN and SYN-ACK packet of startup overhead. N connections have N SYN packets and N SYN-ACKs. That might still not be very much overhead, but it is more.
- coddle-hark 6y agoYou’re right, of course, there’s a (teeny tiny) cost for the handshakes but what I meant was that the performance overhead will be zero.
- CydeWeys 6y agoThe performance overhead will not be zero. You're spending more computational power and memory opening up and maintaining a larger number of connections, and you're sending more packets and bits over the network in total because each additional connection has non-zero overhead.
- gravypod 6y ago> (teeny tiny) cost for the handshakes What happens when your ping time is >500ms? > was that the performance overhead will be zero I think QUIC is motivated by Google's expansion into developing markets (China, India, etc). These areas are primarily mobile markets that would like to consume the same content we do. What might sound like small overhead (SYN->SYN-ACK) actually takes half a second. If your performance is measured in this way than N connections times half a second is a long time. And, on mobile networks, sometimes your TCP connection will drop even if there's still data being sent back and forth (some times you can see latency spikes up to 3sec on really bad networks which causes most software to timeout since it thinks no data came in because of head-of-line blocking). It's a truely miserable experience that QUIC or HTTP/3 can easily solve. Imagine how slow an `apt update && apt upgrade` is and how much of that overhead can be dropped by connecting to 1 mirror a single time and bulk requesting 10 to 100 file transfers. This allows you to maximize your network throughput. Think instead of how slow this would be if you opened 10 to 100 connections each of which might take 500ms per startup. In the worst case that's a 500ms penalty versus a 5 second penalty.
- a1369209993 6y ago> What happens when your ping time is >500ms? Actually, that's not a problem with one reused connection versus N simultaneous connections (as coddle-hark said, the connections are made in parallel). It's a problem with how many round trips it takes to set up each connection.
- mcqueenjordan 6y agoWhen you open and depend on N connections, your total time is now linked to the worst performing of those N connections. As N increases, so does the latency, because it’s a long tail.