Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Folks, for my own learning, I want to learn how to configure and use HA Proxy. I want a simple setup like this:

One load balancer running HA Proxy and behind it are two webservers - A and B -both running Apache, Pressflow and Wordpress on each along with MariaDB databases on each.

What is the easiest way of setting this up as a load balanced failover cluster?

Also I have the following questions:

  1. How will the databases and the contents on the servers be synchronized? - For e.g. if one adds a post with an attachment in A, how will server B pick it up? Will it be automatic?

  2. Any guides to configure this? I want to learn how to do this.

  3. What is the best OS to do this? Debian, Centos or FreeBSD?

share|improve this question

I think you need to:

  1. Have a look at haproxy documentation. It is easy-to-understand and comprehensive. You can start with some basic configuration and add up more conditions/complexity and when you stuck you can ask for help.
  2. For DB synchronization, this is related to the used DB. For example, this differs when using mysql, postgresql or any other DB system.
  3. For the distribution selection, there is no best one. It is a matter of preference. You can work with the one your most comfortable with.
share|improve this answer

Start with the excellent documentation. HAProxy is actually very straightforward to configure, with a very readable configuration file.

Also the default install should provide you with a config file to get started with.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.