haproxy专题学习

[root@hosts ha]# cat haproxy.cfg
global
         log 127.0.0.1   local0
         log 127.0.0.1  local1 notice
         #log loghost    local0 info
         maxconn 4096
         #chroot /home/haproxy
         uid 99
         gid 99
         daemon
         nbproc 1
         pidfile /tmp/haproxy.pid
#         #debug
#         #quiet
#
 defaults
         log     127.0.0.1       local3
         mode    http
         option  httplog
         option  httpclose
         option  dontlognull
         option  forwardfor
         option  redispatch
         retries 2
         maxconn 2000
         balance roundrobin
  #cookie SERVERID insert indirect
  cookie JESSIONID prefix
         stats enable
         stats   uri     /haproxy-stats
         contimeout      5000
         clitimeout      50000
         srvtimeout      50000
#
 listen  http_proxy 0.0.0.0:80
         #option  httpchk GET /ping.jsp
#
#         #server s2 192.168.0.102:8080 weight 3 check
         server s3 192.168.1.35:80 cookie app1 weight 1 check inter 2000 rise 2 fall 5
         server s1 192.168.1.166:80 cookie app2 weight 1 check inter 2000 rise 2 fall 5

你可能感兴趣的:(haproxy,学习,职场,休闲,专题)