Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Can anybody please guide me on HA Proxy as I am a newbies for it.

  1. How it works?
  2. How do I configure it?
  3. How do I modify(add/remove) the already configured file?
  4. How do I start/restart the HA Proxy after modifying the configuration file?
  5. Even I don't know how to check my current installed HA Proxy version?

Please guide me on the same.

I have already gone through the below URL, http://haproxy.1wt.eu/download/1.3/doc/configuration.txt Except the above URL please provide me some extra stuff, so I can start to work on it.

share|improve this question

1 Answer 1

  1. How it works Basically it's a load balancer. You put HAProxy in front of Web Servers, and it will split the load/traffic between them based on the balance algorithm you chose.

  2. How do I configure it? It has a single config file /etc/haproxy/haproxy.cfg . For the most simple configuration you define one frontend with one or more backends (the web servers behind haproxy). Something like this:

    listen frontend *:80
       mode http
       balance roundrobin
       server backend1 192.168.1.2:80 cookie A check
       server backend2 192.168.1.3:80 cookie B check
    
  3. How do I modify(add/remove) the already configured file? You just need to edit the file, At this time doesn't exist the option to use include files for configurarion. To apply the changes you need to restart haproxy.

  4. How do I start/restart the HA Proxy after modifying the configuration file? If you have installed haproxy from a ubuntu/centos package you need:

    /etc/init.d/haproxy restart

  5. Even I don't know how to check my current installed HA Proxy version? If you're using CentOS:

    rpm -qi haproxy

Check this document: http://haproxy.1wt.eu/download/1.3/doc/architecture.txt . It will guide you through different architectures for differente needs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.