Firezone’s macOS WireGuard client had been limited to about 1 Gbit/s, with upload speeds sometimes falling to a few hundred Mbit/s and performance worsening as network latency increased. The account describes the effort to raise throughput beyond 5 Gbit/s, using networking fundamentals and investigation of how Apple’s XNU-based systems handle TUN and UDP. It explains that TCP and QUIC discover usable bandwidth through feedback: congestion controllers track acknowledgments and round-trip time, increase the amount of data in flight, and reduce their sending rate when they infer packet loss. Because more latency requires a larger congestion window to sustain the same throughput, losses can be especially costly on high-speed, long-distance connections.
The central engineering lesson is that a VPN must not introduce avoidable packet loss or reordering. A congestion controller cannot tell whether a packet was dropped by a physical network or by the VPN’s own software; either can trigger a rate reduction even when the network has spare capacity. Firezone’s data path spans TUN-reading and writing threads, an event loop for routing, policy and NAT, crypto workers, and UDP threads. These stages communicate through bounded channels, which limit memory use and propagate backpressure: when a later stage is full, its sender waits until capacity becomes available instead of dropping packets. This lets slower processing stages regulate earlier ones, preserving packets and helping the connection use available bandwidth.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.