If you've ever had a TCP connection between two distant regions, say London to Sydney, you already know what happens. A tiny bit of packet loss and your p95 latency goes off a cliff. TCP retransmits are brutal over long routes.
The standard answer is "just deal with it" or "pay for a premium network." Neither felt right so I built something else.
entrouter-line is a cross-region relay that sits between your nodes and absorbs packet loss using Reed-Solomon Forward Error Correction. The idea is simple, instead of waiting for TCP to detect loss and retransmit, FEC sends enough redundancy that the receiving end can reconstruct missing packets without asking for them again.
The numbers on London to Sydney over cheap Vultr VPS:
0% loss → relay p95: 280ms | direct TCP p95: 271ms (TCP wins by 9ms, fair)
1% loss → relay p95: 280ms | direct TCP p95: 758ms (relay wins by 478ms)
3% loss → relay p95: 280ms | direct TCP p95: 817ms (relay wins by 537ms)
5% loss → relay p95: 280ms | direct TCP p95: 1089ms (relay wins by 809ms)
Relay latency is dead flat whether there's 0% or 5% loss. TCP p95 just keeps climbing.
At baseline the relay adds ~9ms for encryption + FEC + UDP tunnelling. The moment any loss appears that cost pays for itself immediately.
A few other things it does:
Routing via real-time latency mesh with Dijkstra shortest-path, not BGP. It actually measures which path is fastest right now and uses that.
QUIC 0-RTT edge termination so new connections are instant.
All inter-node traffic encrypted with ChaCha20-Poly1305. No PKI needed, just a shared key per peer.
Zero relay overhead, measured loss exactly matches simulated network loss. The relay itself adds nothing.
It handles up to 10% link loss with perfect recovery and degrades gracefully up to around 22%. Above 25% loss on a 273ms RTT route even QUIC starts falling apart, that's a physical constraint, not a code one. Real backbone loss between major cities is typically under 2% so in practice this covers everything short of a damaged undersea cable.
Written in Rust. Single binary. Docker image available.
cargo install entrouter-line
GitHub: https://github.com/Entrouter/entrouter-line
Curious if anyone else has dealt with cross-region tail latency issues and what they ended up doing about it.
Noir - Out
Top comments (0)