ispsh 发表于 2019-1-2 08:10:55

HAProxy 负载均衡

#vi /opt/haproxy/haproxy.cfg  global
  log 127.0.0.1local0
  maxconn 4096
  chroot /opt/haproxy
  uid 500
  gid 500
  daemon
  nbproc 1
  #pidfile /home/haproxy/logs/haproxy.pid
  #debug
  #quiet
  defaults
  log   127.0.0.1    local3
  modehttp
  option httplog
  option httpclose
  option dontlognull
  option forwardfor
  option redispatch
  retries 2
  maxconn 2000
  balance roundrobin
  statsuri   /haproxy-stats
  contimeout   5000
  clitimeout   50000
  srvtimeout   50000
  listen web_proxy 0.0.0.0:8888
  option httpchk
  server web1 192.168.1.250:8080 weight 3 check
  server web2 192.168.1.238:8080 weight 3 check

页: [1]
查看完整版本: HAProxy 负载均衡