High Availability is a group of computer that ensures the availability of backup server with no down-time. It can reduces the load on a single server which means lots of hits are coming on a single server to access any application, website and other applications on the server.
We can reduce the load on a server by configuring HA act as load balancer. It can be configured using Nginx or HA Proxy Server.
HA Proxy is an open source Load balancer available today’s date. There are many load balancer like KEMP, Zevenet , Neutrino , Nginx etc.
Configuration fle /etc/haproxy/haproxy.conf
Our Senario Requirement
a. HAProxy Server – 10.1.11.11
b. Application 1 IP – 10.1.11.12
c. Application 2 IP – 10.1.11.13
There are two method of HAproxy with the help of we can set up load balancing.
Installation of HAproxy on Redhat
Yum install Haproxy* -y
Services of HAProxy
Systemctl start/enable haproxy
Go the file /etc/haproxy/haproxy.conf
By Default, Grafana HTTP Port is 3000
Frontend Configuration For HAProxy
Put these line shown below
Backend Configuration as Balance Algorithm
Balance roundrobin # Algorithm method
Server test1 10.1.11.12:80 check # application 1
Server test1 10.1.11.13:80 check # application 2
Now Restart a Service Again
systemctl restart haproxy
Go to browser and type 10.1.11.11 and enter You will see HAProxy will take you on one of application available. You do not need to worry about on which server you’re logged in.