Wednesday, 8 February 2017

High Availability Configuration and LoadBalancing for webservers using HAProxy::

High Availability  Configuration and LoadBalancing for webservers using HAProxy::
My scenario is as follows:

HA Proxy is installed on

I have one application hosted on four Tomcat instances as follows sharing the same database.

Database server

I have four Apache instances installed on another server which is connected to the tomcat instances mentioned above using mod_jk connector --> --> --> -->

So once configured, when I browse, I should get the any of the four tomcat pages

Please check the previous thread for apache-mod_jk configurations

HAproxy installation steps:-
# yum install haproxy

Edit /etc/haproxy/haproxy.cfg and add the frontend and backend entries at the bottom of the file.

Comment off any default entries.

frontend http-service
    acl url path_beg /
    default_backend http-server
    mode http

backend http-server
    balance roundrobin
    option httpchk HEAD /
    server service1 check
    server service2 check
    server service3 check
    server service4 check

Disable  SELinux and  Restart the service.

No comments:

Post a Comment