A big part of observed network latencies/delays is due to so-called bufferbloat:
Too large intermediate buffers, both on the endpoints and in the network, cause packets to stay in the buffer too long, delaying them.
On the endpoints, this can be improved by tuning buffer sizes for different protocols (TCP/QUIC, TLS and HTTP have their own buffers!). Default sizes are often too high.
In the network this is often done by Active Queue Management (AQM). This basically comes down to intentionally but smartly dropping some packets if buffers fill up, causing the senders' congestion controllers to slow down, reducing buffer occupancy
However, using packet loss for this isn't ideal... why can't the network just tell senders to slow down in another way?
That's exactly what ECN (Explicit Congestion Notification) was made for. Here, middleboxes give explicit signals that congestion is (going to be) occurring.
ECN works, but has some problems.
A new, similar proposal called L4S (low-latency, low-loss, scalable throughput) aims to improve on the same ideas: ietf.org/archive/id/dra…
Apple is now (one of) the first to provide an L4S implementation to help test this new approach!
While L4S (like ECN) needs explicit network support to properly work (middleboxes need to set bits in packet headers), I do think this is the next big frontier for big network latency improvements.
And having good endpoint implementations is a crucial step!
Apple has also been working on a new way to measure bufferbloat with a specialized "Round-Trips per Minute" metric and tools to test it: ietf.org/archive/id/dra…
They even mention @hawkinsw's Go implementation (achievement unlocked!):
In conclusion, choosing the correct protocols (like HTTP/3) is often just the first step.
After that comes careful tuning of both endpoints and intermediate networks to squeeze out optimal performance, and that work is still very much active and ongoing!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Take the "parking lot problem": you have WiFi on your phone inside, but switch to 4G when going to your car.
This switches networks and client IP/port, so all TCP connections are dropped and re-started, since they're only identified based on client+server IP+port (4-tuple). 2/12
QUIC instead assigns each connection a unique Connection ID (CID) of 1-20 bytes.
By using the same CID even after switching networks, the server knows it's actually the same connection, even though the 4-tuple has changed. 3/12
Yesterday, there was a #QUIC workshop at the #conext18 conference with a large amount of new insights. Most of my notes on this can be found at docs.google.com/document/d/16S…. Following tweets contain the parts relevant to the blogpost.
For example, Intel was here with a demo of a NIC that can offload #QUIC crypto to hardware. When asked later, Manasi Deval mentioned that specifically Variable Integer Encoding (to reduce the amount of bits on the wire) is a serious hindrance for #QUIC hardware support.