Cloudflare

High Availability Load Balancers with Maglev

Jun 10, 2020Terin Stock
High Availability Load Balancers with Maglev
SummaryAI, from the source post

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