HAProxy Technology’s Director of Product, Baptiste Assmann, and HAProxy core developer Amaury Denoyelle spoke at HAProxyConf 2021 about how dynamic servers reduce the need to reload HAProxy after adding or removing servers, which improves uptime and scalability. The feature, which was introduced in HAProxy version 2.5, culminates a series of complementary updates to the load balancer designed to make adding and removing servers a seamless operation that fits cloud-based, autoscaling workloads.
After giving an introduction about the changes that came before, including support for changing server parameters at runtime, Baptiste said that the real feature people were expecting was the possibility to create servers entirely from scratch at runtime and be able to populate more of them as soon as the application grows.
Amaury continued with a feature explanation of dynamic servers and their ability to create and remove servers at runtime within an existing backend. It is implemented through a new set of HAProxy Runtime API commands. The commands support a large subset of keywords available when defining a server in an HAProxy configuration file.
However, like everything, dynamic servers have their limitations as well. Not all load balancing algorithms are supported yet, which means you cannot use static-rr or non-consistent hashing algorithms, and some server keywords are not available, as their implementation is not straightforward.
Dynamic servers as a feature targets dynamic environments like Kubernetes and the cloud. Baptiste and Amaury concluded that the future is bright for this feature — it may support Lua integration and similar capabilities may extend to adding and removing entire backends dynamically.
For more information about dynamic servers, we recommend reading a blog post about how to load balance an infinite number of servers without reloading HAProxy. We also suggest signing up for an HAProxy Dynamic Capabilities webinar.
Slide Deck
Here you can view the slides used in this presentation if you’d like a quick overview of what was shown during the talk.