Load Balancing with nginx and HaProxy

Page 1

Load Balancer with SSL offloading - nginx + HAProxy HAProxy and nginx can be configured together to work as an SSL offloader and a load balancer. Listed below are the steps to achieve the same on a centOS instance.

Assume 192.168.1.1 and 192.168.1.2 running web servers on port 80 and 192.168.1.3 running haproxy on port 8181. Starting with HAPROXY set up. 1. Install haproxy. yum install -y haproxy 2. Edit the haproxy configuration to update the backend web servers and keep it at the basic log level. global log 127.0.0.1 chroot pidfile maxconn user group daemon defaults mode log option option option option option retries timeout timeout timeout timeout

local2 /var/lib/haproxy /var/run/haproxy.pid 4096 haproxy haproxy

http global httplog dontlognull http-server-close forwardfor except 127.0.0.0/8 redispatch 3 http-request 20s queue 1m connect 10s client 1m


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Load Balancing with nginx and HaProxy by tindulich_org - Issuu