← Back
Home › Systems › Networking and edge

l4-load-balancer

L4 load balancer

Maglev, Katran

SystemTechniques · 0Primitives · 19 l4-load-balancer Anycastnetworking · low: Announce one IP prefix from many sites over BGP; routing sends each client to its preferred site, and a failed site leaves by withdrawing the route.›Bgpnetworking · low: BGP sessions, UPDATE messages, path attributes and best-path selectionConnection trackingnetworking · low: Per-flow state table (5-tuple, TCP state, timeouts) for stateful packet handlingDirect server returnnetworking · low: Load balancer forwards only inbound packets; backends reply to clients directlyEbpf xdpnetworking · low: EBPF programs at the XDP/tc hooks for in-kernel packet processing at line rateEcmpnetworking · low: Equal-cost multipath: hash flows across next hops; resilient hashing on changesInternet checksumnetworking · low: Ones-complement IP/TCP/UDP checksum, incremental update (RFC 1624) and offloadKernel-bypass networkingnetworking · low: User space (DPDK, AF_XDP) or an in-driver eBPF hook (XDP) handles packets straight from NIC rings, skipping sockets, for 10-40 Mpps per core.›Maglev hashingnetworking · low: Consistent hashing into a fixed prime-size lookup table filled by per-backend permutations; O(1) lookups, near-perfect balance, little disruption on backend changes.›Packet encapsulationnetworking · low: IP-in-IP, GRE, GUE, VXLAN and Geneve tunnelling headers and MTU effectsReceive side scalingnetworking · low: NIC hashing of flows to RX queues (RSS) and symmetric hashing for per-core processingSyn cookiesnetworking · low: Stateless SYN handling that encodes connection state in the initial sequence numberHealth checkingsystems · low: Decide per backend whether to route to it using probes and real-traffic errors, with consecutive-count hysteresis, capped ejection and a panic fallback.›False sharingconcurrency · low: Independent variables written by different cores on one cache line force the line to bounce between cores; pad or regroup hot data to fix it.›Memory orderingconcurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.›SPSC ring bufferdata-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.›+ 3 more primitives

Similar systems

Share the most building blocks with this one.

In-house systems

Named systems of this kind at large companies, with their paper or write-up.