Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Example haproxy Configuration

Joel Christner edited this page Jun 4, 2019 · 1 revision

Below is a simple haproxy loadbalancer configuration for a two node kvpbase deployment:

global
    daemon
    maxconn 256
 
defaults
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms
 
frontend http-in
    bind *:80
    default_backend kvpbase
 
backend kvpbase
    option httpchk GET /loopback
    server s1 10.1.1.10:80 maxconn 32
    server s2 10.1.1.11:80 maxconn 32
    server s3 10.1.1.12:80 maxconn 32
 
listen admin
    bind *:8080
    stats enable

Once this file is created, haproxy can be run using the following:

ubuntu:~$ sudo haproxy -f haproxy.cfg

Clone this wiki locally