zoukankan      html  css  js  c++  java
  • HAProxy 配置文件

    
    global
        log         127.0.0.1 local2 info
        chroot      /var/lib/haproxy
        pidfile     /var/run/haproxy.pid
        maxconn     20480
        nbproc     8
        user        haproxy
        group       haproxy
        daemon
        stats socket /var/lib/haproxy/stats
    defaults
        mode                    http
        log                     global
        option                  httplog
        option                  dontlognull
        option http-server-close
        option forwardfor       except 127.0.0.0/8
        option                  redispatch
        retries                 3
        timeout http-request    10s
        timeout queue           1m
        timeout connect         10s
        timeout client          1m
        timeout server          1m
        timeout http-keep-alive 10s
        timeout check           10s
        maxconn                 3000
        stats refresh 30s
        stats realm Welcome Login Haproxy Statistics
        stats uri /haproxy-admin
        stats auth admin:admin~!@
        stats hide-version
        stats admin if TRUE
    
    frontend  Web_Service
        bind *:80
        mode http
        log global
        option httplog
        option forwardfor
        option httpclose
        option logasap
        option dontlognull
        #capture request header Host len 20
        #copture request header Referer len 20
        default_backend             web
    backend web
        mode http
        option redispatch
        option abortonclose
        balance source
        cookie SERVERID
        #option httpchk GET /index.html
        server  web1 192.168.199.203:80 cookie server1 weight 1 check inter 2000 rise 2 fall 3
        server  web2 192.168.199.204:80 cookie server2 weight 1 check inter 2000 rise 2 fall 3
     转载自:https://www.xwroot.com/archives/haproxy-%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/
  • 相关阅读:
    Spring国际化模块
    广告牌 循环 轮播 图片
    ImageLoader 网络加载图片
    ProgressBar 进度条 旋转
    UI处理 线程
    权限 动态 访问
    系统 状态栏 导航栏
    对话框 dialog 整理
    修改 字体
    获取 Activity中所有的View ViewGroup
  • 原文地址:https://www.cnblogs.com/Wang-Hongwei/p/14709897.html
Copyright © 2011-2022 走看看