HAproxy or High Availability proxy is an open source load balancer, which can load balance any TCP service. HAProxy (High Availability Proxy) is a TCP/HTTP stack balancer and intermediary server that permits a web server to spread approaching solicitations over various endpoints. This is valuable in situations where excessively numerous simultaneous associations over-immerse the capacity of a solitary server.
Characteristics
- Free
- Veryfast
- Reliable solution which offers load balancing.
- High availability.
- Proxying for TCP and HTTP based applications.
- It is most suitable for high traffic websites and powers many of the world’s most visited websites.
Installation steps
apt-get install haproxy
haproxy -v
/etc/default/haproxy set ENABLED = 1
service haproxy <reload restart start status stop>
Setup
Create a setup in which we host two web servers and one HAProxy instance.
Now you open up the web browser and browser through haproxy IP and keep refreshing the tab. When you refresh each time, the load will get distributed to each web server.
HAProxy supports many algorithms. They are as of below:
- Roundrobin
- Static roundrobin
- Least connections
- Source
- URI
- URL
Difference between ELB and HAProxy
- ELB can handle only less number of concurrent connections when compared with HAProxy.
- HAProxy does not support SSL out of the box. ELB has SSL support, SSL offload or SSL termination.
- Algorithm options are available for HAProxy whereas ELB supports only Roundrobin.
- HAProxy does not support geo-location out of the box. AWS ELB by itself cannot support geo-location but in conjuction with AWS Route53 DNS.
- AWS ELB is supported by the monitoring tool Cloudwatch. HAProxy is supported by Nagios.
” margin_top=”50px” margin_bottom=”” animation_type=”slide” animation_direction=”left” animation_speed=”0.3″ class=”” id=””]
Leave A Comment
You must be logged in to post a comment.