dockerized HAProxy+Keepalived for HA
You can run a HAProxy and a Keepalived in a container with main process. Docker provide --privileged
param, so Keepalived can get the VIP(Virtual IP) through this way in a container.
About how to run multiple processes in a container, you can refer to docs: multi-service-container
After you started Haproxy & Keepalived
more than to nodes, VIP can drift between these nodes. With same haproxy.cfg, you can access HAProxy service with VIP. So that you can get the High-Avaliable HAProxy service.
About how to run HAProxy & Keepalived
in a container, there is an image you can try it: docker haproxy-keepalived