Stateless load balancing in eBPF

There are two main types of load balancers; stateful and stateless load balancers. Stateful load balancers are typically more flexible, but their need to save per-connection state makes them difficult to scale. Stateless load balancers, on the other hand, are much easier to deploy[1].

However, without any state, it’s much harder to implement basic load balancing features. For example, a load balancer is said to be per-packet consistent if it forwards packets from one client connection to the same server. If this does not hold, the load balancer can potentially break ongoing client connections[2].

Long story short: there’s an inherent trade-off between stateful and stateless load balancers. Previous work proposes a new stateless design that naturally supports per-packet consistency. We would like you to reimplement this algorithm and asses its performance.

To make things a tad more difficult, we want you to implement it in eBPF. eBPF is a C-based programming model that makes it possible to extend the kernel with custom functionality in a safe way. This allows the load balancer to make forwarding decisions right in kernel space, yielding much better performance.

Milestones

  • Get familiar with the new stateless load balancing design
  • Implement the scheme and tailor it specifically for the eBPF runtime
  • Performance analysis with Katran as baseline

Requirements

  • Programming languages: Rust or Go, and basic knowledge in C (for eBPF)
  • Experience with low-level programming or network programming
  • Critical and independent thinking

References

  1. Balancing on the Edge: Transport Affinity without Network State
  2. A High-Speed Load-Balancer Design with Guaranteed Per-Connection-Consistency

Supervisors