I cant seem to find decent documentation that explains this properly or maybe better way to see in what I think is clear. I understand what HAProxy/keepalived and have worked with many different types of load balancers over the years.

What I can't wrap my head around is the implementation of direct routing. To be clear I am intimately familiar with how direct server return (direct routing) works in all load balancers but I am trying to understand how HAProxy/keepalived implement this.

My understanding is that HAProxy does not support this at all and the only option is to use keepalived ipvs. So can anyone please tell me :

1) Am I correct that HAProxy alone does not support direct routing?

2) Why would I need to have both HAProxy and keepalived to have direct routing? It appears that you should only need keepalived for this to work.

Thanks for any pointers..


No HAProxy does not support direct routing on its own and is not required unless you need to do something else at higher layers. (HTTP/HTTPS for example)

Keeplived (LVS) does support direct routing and can be used alone to provide the solution along with some other common features like health checks, persistence, and HA via VRRP.

Yeah many of the articles you will find can be a bit hazy on this topic because there are so many variations in how people can be using both solutions for different reasons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.