#--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global     log         127.0.0.1 local2     chroot      /var/lib/haproxy     pidfile     /var/run/haproxy.pid     maxconn     4000     user        haproxy     group       haproxy     daemon     # turn on stats unix socket     stats socket /var/lib/haproxy/stats #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults     mode                    tcp     log                     global     option                  tcplog     #option                  dontlognull     #option http-server-close     #option forwardfor       except 127.0.0.0/8     option                  redispatch     retries                 7     #timeout http-request    10s     timeout queue           10m     timeout connect         30s     timeout client          20m     timeout server          10m     #timeout http-keep-alive 10s     timeout check           30s     maxconn                 3000 #--------------------------------------------------------------------- # Synchronize server entries in sticky tables #--------------------------------------------------------------------- peers hapeers     peer haproxy1-fqdn.com 192.168.0.58:8388     peer haproxy2-fqdn.com 192.168.0.79:8388 #--------------------------------------------------------------------- # HAProxy Monitoring Config #--------------------------------------------------------------------- listen stats 192.168.0.77:8080                #Haproxy Monitoring run on port 8080     mode http     option httplog     option http-server-close     stats enable     stats show-legends     stats refresh 5s     stats uri /stats                            #URL for HAProxy monitoring     stats realm Haproxy\ Statistics     stats auth hauser:secretpass4321         #User and Password for login to the monitoring dashboard     stats admin if TRUE     #default_backend bk_Prod1         #This is optionally for monitoring backend #--------------------------------------------------------------------- # HAProxy Monitoring Config #--------------------------------------------------------------------- #listen stats 192.168.0.83:8080                #Haproxy Monitoring run on port 8080 #    mode http #    option httplog #    option http-server-close #    stats enable #    stats show-legends #    stats refresh 5s #    stats uri /stats                            #URL for HAProxy monitoring #    stats realm Haproxy\ Statistics #    stats auth hauser:secretpass321          #User and Password for login to the monitoring dashboard #    stats admin if TRUE #    #default_backend bk_Prod1           #This is optionally for monitoring backend #--------------------------------------------------------------------- # HAProxy Monitoring Config #--------------------------------------------------------------------- # listen stats 192.168.0.78:8080                #Haproxy Monitoring run on port 8080 #    mode http #    option httplog #    option http-server-close #    stats enable #    stats show-legends #    stats refresh 5s #    stats uri /stats                            #URL for HAProxy monitoring #    stats realm Haproxy\ Statistics #    stats auth hauser:secretpass123          #User and Password for login to the monitoring dashboard #    stats admin if TRUE #    #default_backend bk_DKV_PROD_WLPFO          #This is optionally for monitoring backend #--------------------------------------------------------------------- # frontend which proxys to the backends #--------------------------------------------------------------------- frontend ft_PROD     mode tcp     bind 192.168.0.77:61000-61299         bind 192.168.0.83:51000-51300         bind 192.168.0.78:51000-62300     option tcplog         # (4) Peer Sync: a sticky session is a session maintained by persistence         stick-table type ip size 1m peers hapeers expire 60m # Commented for change CHG0292890 #   stick on src     log-format %ci:%cp\ [%t]\ %ft\ %b/%s\ %Tw/%Tc/%Tt\ %B\ %ts\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq         acl RULE1 dst_port 61115         acl RULE2 dst_port 61215         use_backend APP1 if app1         use_backend APP2 if app2     default_backend bk_PROD_ROUNDROBIN #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- backend bk_PROD_ROUNDROBIN     mode tcp     # (0) Load Balancing Method.     balance roundrobin     # (4) Peer Sync: a sticky session is a session maintained by persistence     stick-table type ip size 1m peers hapeers expire 60m     # (5) Server List     # (5.1) Backend     server appl1 10.33.0.50 check port 31232     server appl2 10.33.0.51 check port 31232      server appl2 10.45.0.78 check port 31232      server appl3 10.45.0.79 check port 31232  #--------------------------------------------------------------------- # source balancing for the GUI #--------------------------------------------------------------------- backend bk_APP2     mode tcp     # (0) Load Balancing Method.     balance source     # (4) Peer Sync: a sticky session is a session maintained by persistence     stick-table type ip size 1m peers hapeers expire 60m         stick on src     # (5) Server List     # (5.1) Backend     server appl1 10.33.0.50 check port 55232     server appl2 10.32.0.51 check port 55232 backup     server appl3 10.45.0.78 check port 55232 backup     server appl4 10.45.0.79 check port 55232 backup #--------------------------------------------------------------------- # source balancing for the OLW #--------------------------------------------------------------------- backend bk_APP1     mode tcp     # (0) Load Balancing Method.     balance source     # (4) Peer Sync: a sticky session is a session maintained by persistence     stick-table type ip size 1m peers hapeers expire 60m         stick on src     # (5) Server List     # (5.1) Backend     server appl1 10.33.0.50 check port 53119     server appl2 10.32.0.51 check port 53119 backup     server appl3 10.45.0.78 check port 53119 backup     server appl4 10.45.0.79 check port 53119 backup