Building resilient and highly available infrastructure is of the utmost importance in today’s world, and the principal part of such a design is a load balancer. While HAProxy is easy to set up, it can become tedious to manually include new servers in massive production environments with hundreds of servers, if not thousands. In today’s automated world, we may set up each newly installed server to have its settings applied immediately. The question is, “How can we accomplish this?”
Among the many powerful configuration management technologies available, we have settled on Ansible. Using an Ansible playbook, we can automate adding additional servers to the HAProxy load balancer configuration on AWS and bare metal. We begin by setting up a dynamic inventory in Ansible, then set up HAProxy to automatically refresh its inventory whenever Ansible’s inventory receives a new server. By the end, the audience will have learned how HAProxy’s power can be utilized alongside configuration management tools, and how cloud computing providers can be used for building infrastructure with high availability.
Here you can view the slides used in this presentation if you’d like a quick overview of what was shown during the talk.