In this tutorial I am going to setup a HAProxy based cluster (layer 4) in Docker which would load balance to a set of Mysql nodes (again running on Docker).
Before I jump into how to get this done, I would like to explain a little more about few important terms : –
- Docker – well, everybody knows this. Excellent implementation of Microservices architecture. nearly everybody is going for it, whether Redhat, Oracle, Microsoft, Apple. it has potential to containerize on any platform.
- HAProxy – stands for High Availability Proxy, is an open source software TCP/HTTP Load Balancer and Reverse proxy solution which can run on Linux, Solaris, and FreeBSD. Most common use case for this product is to improve the performance and availability of servers by distributing the workload across multiple servers (e.g. web, application, database (yes, even Database)). So why do we need HAProxy? …