wss1051 发表于 2019-1-2 10:46:36

haproxy+web 负载均衡高可用性

global   
      maxconn 5120   
      chroot /usr/local/haproxy   
      uid 502   
      gid 502
      daemon   
      quiet   
      nbproc4   
      pidfile /usr/local/haproxy/haproxy.pid   
defaults   
      log   global   
      mode    http   
      optionhttplog   
      optiondontlognull   
      log 127.0.0.1 local3   
      retries 3   
      option redispatch   
      maxconn 2000   
      contimeout      5000   
      clitimeout      50000   
      srvtimeout      50000   

listen webinfo :80   
       mode http   
       balance roundrobin   
       option httpclose   
       option forwardfor   
server 101 192.168.18.101:80 check weight 3 minconn 1 maxconn 3 check inter 40000
server 117 192.168.18.117:80 check weight 3 minconn 1 maxconn 3 check inter 40000   
server 118 192.168.18.118:80 check weight 3 minconn 1 maxconn 3 check inter 40000   
server back 127.0.0.1:80 backup


listen admin_page :90   
       mode http   
       balance roundrobin
#transparent   
       stats uri / haproxy-stats   
       stats realm Haproxy \ statistic
       stats auth admin:admin



页: [1]
查看完整版本: haproxy+web 负载均衡高可用性