ferry
An L4/L7 edge router and load balancer in Go, with Maglev hashing on an XDP fast path and config that reloads without dropping a connection.
Every load balancer I've run in the homelab has been a compromise. HAProxy is superb and completely opaque to me. Traefik is convenient right up until you want to know why a connection was reset. I want one I can read end to end, and I want the data path to be honest about what it costs.
What it actually does
Two planes. The data plane is an XDP program attached to the NIC that hashes the
5-tuple with Maglev and rewrites the destination: no copy, no allocation, and no trip
through the kernel network stack for steady-state traffic. The control plane is
ordinary Go: it watches Kubernetes EndpointSlice objects, rebuilds the backend table,
and swaps it into an eBPF map atomically.
The interesting constraint is that a backend table swap must never break an in-flight connection. Maglev gets most of the way there. It's designed so that removing one backend disturbs a minimal number of hash buckets, and a small connection-tracking map covers the rest.
Why bother
Partly because I want to understand XDP properly rather than by reputation. Mostly because pi-tower needs an ingress I can debug at 2am, and "read the source" is only a real option when the source is small enough to read.