Search Our Database

How to Set HAProxy Load Balancing Using Session Cookie

Last updated on |
by

Step 1: Locate the HA Proxy config file and execute the following command using your web server’s SSH terminal.

vi /etc/haproxy.cfg

 

Step 2: Edit the configuration file by adding the following codes.

listen http_proxy 192.168.0.1:80
    mode http
    balance roundrobin
    cookie SERVERID insert indirect nocache
    server web1 192.168.0.2:80 check cookie
    server web2 192.168.0.3:80 check cookie

 

Affordable but Powerful Cloud Hosting Package

Check out IPServerOne’s Cloud Hosting Packages.
Contact us @ +603-6259-5625 or email @ sales@ipserverone.com