High Availability Load Balancers with Maglev
Jun 10, 2020Terin Stock

Summary
This post details the implementation of a new stateless L4 load balancing architecture using Maglev consistent hashing, IPVS, and Foo-Over-UDP encapsulation. Key technical contributions include preserving source IPs, supporting distributed backends, enabling zero-downtime maintenance via BGP and statelessness, utilizing well-tested Linux features, avoiding explicit connection synchronization, and allowing staged rollouts. The implementation addresses challenges with MTU and encapsulation, and introduces a Go agent for configuring IPVS and iptables, with an open-sourced netlink package for IPVS management.
More from the Load Balancing UI and Feature Enhancements trail
- Load Balancing Monitor Groups: Multi-Service Health Checks for Resilient Applications
- Your IPs, your rules- enabling more efficient address space usage
- Simplify cloud routing and object storage configurations with Cloud Connector
- Eliminating hardware with Load Balancing and Cloudflare One
- Extending Private Network Load Balancing load balancing to Layer 4 with Spectrum