Lately, a pastime for me has been learning and tinkering in Rust. As Rust is a systems programming I decided a load balancer would make a good pet pro

Adventures in Rust and Load Balancers

submited by
Style Pass
2021-07-18 08:30:04

Lately, a pastime for me has been learning and tinkering in Rust. As Rust is a systems programming I decided a load balancer would make a good pet project to hack on. While there are many exciting Layer 7 proxies out there, the available Layer 4 load balancers are all industrial strength and somewhat complex to get up and running. So I thought to create a more general purpose Layer 4 load balancer. These are my notes and takeaways from my load balancer side-project, Convey.

A goal of this p roject was to build a load balancer that easily supports Layer 4 Network Load Balancing but is still modern and general purpose. Convey supports a few modes of operations but some of the features are universal, namely health checking backends for availability and hot reloading of the load balancer configuration. This is probably up for discussion, but imo a modern load balancer should already have features like stats counters, health checking and hot configuration reloading baked in.

Backend configuration can be hot-reloaded, there is no need to restart or even reload the process. Simply update the configuration file and save it. Convey will notice the change and reload the backend server configuration making the addition or removal of load balanced servers simple. Right now the only available configuration source is via a configuration file, but this could easily be extended to support other configuration sources such as a key value store, for example.

Leave a Comment