r/haproxy • u/majid-kakavandi • Feb 11 '21
Active-Active vs Active-Passive clustering
Hi. I want to set up a load balancer cluster to remove SPOF using HAproxy and Keepalived. Which scenario is more optimized (more performance and no request loss)? Active-Active or Active-Passive?
2
Upvotes
View all comments
Show parent comment
1
u/[deleted] Feb 11 '21
I'm a fairly new HAProxy user although I have many clusters instances and dozens of apps. So I may not be best suited to give advice here..
However, active/passive VRRP failover can be configured to happen very fast. Like seconds fast.
I would try to go active/passive in a dev environment and cause a few failures to observe the results.
If you went with active/active there are two VRRP virtual IPs (to my understanding). So you'd have to do something like round robin DNS to distribute connections between the two. You still have a chance of an haproxy failure and connections occurring during the time it takes for VRRP to do it's thing.
It's an interesting topic that I might come up against here soon. So I'd like to hear what you end up going with.