Bài đăng

Hiển thị các bài đăng có nhãn HAProxy

Using HAproxy in multi core environments

HAproxy  is a great load balancing solution that we use at  Instela . We use HAProxy in a 8-Cores bare metal machine and we also use it to offload SSL encryption. Although HAproxy is very effective solution in terms of CPU usage, SSL offloading obviously needs more CPU power, thus, using only one core could be easily a bottleneck. Apart from this, also we did not want to waste other cores and we decided to activate  not recommended multi core support. The configuration is pretty straightforward. At the  global  section of  haproxy.cfg , we put these directives: nbproc 15 cpu - map 1 1 cpu - map 2 2 cpu - map 3 3 cpu - map 4 4 cpu - map 5 5 cpu - map 6 6 cpu - map 7 7 cpu - map 8 8 cpu - map 9 9 cpu - map 10 10 cpu - map 11 11 cpu - map 12 12 cpu - map 13 13 cpu - map 14 14 cpu - map 15 1...

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...