Shared ingress on Envoy Gateway
Every new customer needs a load balancera route.
I led it, from the requirements and the controller tests to the rollout.
The product runs one server per customer on Kubernetes. Devices connect on many TCP ports, most of them not HTTP, and the server checks their TLS certificates itself.
Why it was needed
Each server had its own AWS load balancer, so cost grew with every customer. Sharing one was hard: every customer uses the same ports, and customers' firewalls allow our IP address, so it could not change.
How it was done
Tested the Gateway API controllers and wrote down why each one failed.
Routed by the server name in the TLS handshake (TLSRoute), because a plain TCP route cannot tell customers apart on the same port.
Put one Elastic IP (a fixed AWS address) on each shared load balancer before the big batches.
Rolled out in batches over three months, with a switch back to a load balancer per server.
Problems on the way
After the first batch of 20 servers, devices dropped their connections.
Envoy's default connection limits. Fix: Raised the limits for every server before the next batch.
Half of the second batch could not move yet.
The customers' own domains still pointed at the old load balancer. Fix: Checked each domain first and moved the late ones one by one.
Sharing moved the risk. It did not remove it.
Results
- N → 1load balancers per cluster, behind one fixed IP
- 58orphaned load balancers deleted in one cluster
- 4production clusters moved in batches