How to Compile HAProxy From Source and Setup a Basic Configuration
To learn more about HAProxy I decided to compile it from source and use it to load-balance traffic to louwrentius.com across two different web servers. I run HAProxy on a VPS based on Ubuntu 12.04 LTS. Let's dive right in. First, we need to download the source. Don't copy/pased the exact code, you should download the latest version of HAProxy. cd /usr/src wget "http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.24.tar.gz" tar xzf haproxy-1.4.24.tar.gz cd haproxy-1.4.24 Before you can compile software, you must make sure you have a working build-environment. With Ubuntu or Debian, you should run: apt-get install build-essential If you open the README file in the root directory, you will find some detailed instructions on how to compile HAProxy, which is really straight-forward. Compiling HAProxy Best CPU performance The manual states that by default, it will compile HAProxy with no CPU-specific optimisations. To enable CPU-specific optimisations, you n...