Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantage of using HAProxy AND Keepalived vs just Keepalived

As per the (verbose) topic, are there any advantages over using a Keepalived & HAProxy as an HA webserver loadbalancer vs a pure keepalived solution?

like image 264
Werner Avatar asked Mar 27 '15 02:03

Werner


People also ask

What is HAProxy and Keepalived?

HAProxy (High Availability Proxy) is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. On the other hand, Keepalived is detailed as "A routing software written in C".

What is Keepalived used for?

The most basic Keepalived configuration enables a shared IP address between two servers. In the above topology, server1 is the master, and server2 is the backup. The configuration for both servers is simple.

Why is HAProxy used?

HAProxy is a high-performance, open-source load balancer and reverse proxy for TCP and HTTP applications. Users can make use of HAProxy to improve the performance of websites and applications by distributing their workloads. Performance improvements include minimized response times and increased throughput.


1 Answers

Keepalived is working in layer 4 so doesn't have layer 7 knowledge at all. By using HAProxy and Keepalived together you can get benefit of having some options that HAProxy provides in layer 7 like Stickiness, Sampling and converting information, ACLs and conditions, Content switching, Stick-tables, Formated strings, HTTP rewriting and redirection, Server protection, etc.

If you only need to have a load balancer without any manipulating or any high level decision (layer 7) you can use only Keepalived and it will be faster because it works in layer 4.

like image 156
l3ehnam Avatar answered Sep 27 '22 18:09

l3ehnam