Lobby Load Balancer

Published at Oct 30, 2023

#lobby#load-balancer#ip

Lobby is a simple, yet highly performant, network load balancer based on nftables.

I’ve decided to code it on the back of some frustration with the load balancers state-of-the-art at the time. There were many well established load balancers, but none was really suiting my use case and delivering the user experience I was expecting. Sure, there is HAProxy, MetalLb, Nginx, Traefik, etc, but all of them were missing something and none would cover all of my uses cases. Also, many times a desired feature was part of their enterprise edition and not available as part of the community edition. That triggered me to try making one.

As I felt quite comfortable with nftables, I decided to experiment with it as it seemed a tool that could be used to setup network traffic load balancing. And actually, this is one of their documented example capabilities. I then also found out that there was already a load balancer that was based on nftables called nftlb and I considered using it, but yet again it wouldn’t be that simple. nftlb requires an external service to interact with its API’s to perform upstream server health checking which further consolidated my decision to build one.

I don’t mean that Lobby is better than any of those. It is just intended to be different and more useful for me. There is no reason for me to believe that Lobby would replace any of those, but I consider it to be simpler while also at least as highly performant or potentially even more than most, given the packet routing is performed at the kernel space and not on the user space.

Lobby system diagram

The main reason I liked the possibility of using nftables as the load balancer engine is that I wouldn’t need to code the packet routing. I’d focus the development on the control plane, orchestrating the load balancing and using a tool that already implemented the packet routing quite efficiently and that is so widely used.

During the development, more specifically the abstraction part of the load balancer engine, a new concept emerged in which Lobby wouldn’t have to be restricted to the nftables engine. Now it could utilize any other tool for that purpose.

As a result, Lobby was designed to support alternative load balancing engines, such as HAProxy or NGINX for instance, to implement the packet routing while keeping the ability to orchestrate the load balancing in the same format independently of the load balancing engine and in this way, maintaining a consistent and simple user experience while extending its capabilities.

This is exciting as I couldn’t find, to date, any other load balancer with such unique characteristics.

Lobby project page here

Lobby documentation page here

Igor Borisoglebski © 2024