
Hard Numbers: HTTP/2 vs UDP Overlay for Agent Communication
Two machines. Two continents. GCP us-east1 (South Carolina) and europe-west1 (Belgium). 85ms RTT. 100 runs per test, median reported. No synthetic benchmarks. Connection setup: 11x faster. HTTP/2 requires a TCP three-way handshake (~85ms), TLS 1.3 handshake (~85ms), and ALPN negotiation. Total: ~175ms per connection. Pilot does the expensive work (STUN discovery, tunnel creation) once at daemon startup. Each new connection reuses the existing tunnel. Total: ~15ms. An orchestrator dispatching tasks to 50 agents: 8.75 seconds of pure overhead with HTTP/2. 750 milliseconds with Pilot. Message latency: identical where it matters. At 1 KB (the size of a JSON task description): HTTP/2 172ms, Pilot 171ms. At 10 KB: 174ms vs 172ms. At 100 KB: 182ms vs 179ms. Both protocols are dominated by the 85ms network RTT. The protocol overhead is not the bottleneck. The network is. At 1 MB, HTTP/2 edges ahead by 2.4% — TCP's 30 years of kernel-level optimization. For the message sizes agents actually sen
Continue reading on Dev.to
Opens in a new tab



