Step By Step Configuration Of High Availability (HA ) For Grafana On Redhat/CentOs 7

3
34
views

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.

  1. Frontend
  2. Backend

Installation of HAproxy on Redhat

Yum install Haproxy* -y

Services of HAProxy

 Systemctl  start/enable  haproxy

Configuration  

Go the file /etc/haproxy/haproxy.conf

By Default, Grafana HTTP Port is 3000

Frontend Configuration For HAProxy

Put these line shown below

Frontend main

Bind :*80

Option http-server-close

Option forwarder

Default_backend app-main

Backend Configuration as Balance Algorithm 

Backend app-main

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.

You’re done.

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here