筆記 Haproxy 設定

Haproxy 設定筆記

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 4096
        #chroot /var/chroot/haproxy
        user haproxy
        group haproxy
        daemon
        #debug
        #quiet
                                nbproc      2 # Number of processes
 
defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout      5000
        clitimeout      30000
        srvtimeout      50000
        monitor-uri /ok.html
        stats uri /stats
        stats auth admin:admin
 
listen  load_balanced_http      :80
    mode http
    option httpchk
    option httplog
    option forwardfor
    option httpclose               # disable keep-alive
    option checkcache              # block response if set-cookie & cacheable
    option redispatch
    option persist
    cookie SERVERID insert nocache indirect
    balance roundrobin
    server shop1 192.168.0.1:80 cookie server01 weight 49 maxconn 400 check inter 40000
    server shop2 192.168.0.2:80 cookie server02 weight 51 maxconn 500 check inter 40000
 
listen  load_balanced_https     :443
    mode tcp
    balance roundrobin
    option  ssl-hello-chk
    option  forwardfor
    server shop1 192.168.0.1:443 check inter 30000 rise 1 fall 2
    server shop2 192.168.0.2:443 check backup

One thought on “筆記 Haproxy 設定

  1. Hello! I could have sworn I’ve been to this web site before but after going through a
    few of the posts I realized it’s new to me. Nonetheless,
    I’m definitely pleased I came across it and I’ll be book-marking it and checking
    back frequently!

東京租車 發表迴響 取消回覆

你的電子郵件位址並不會被公開。 必要欄位標記為 *