zoukankan      html  css  js  c++  java
  • HAProxy1.5.x tcp example

    #---------------------------------------------------------------------
    # Example configuration for a possible web application. See the
    # full configuration options online.
    #
    # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
    #
    #---------------------------------------------------------------------

    #---------------------------------------------------------------------
    # Global settings
    #---------------------------------------------------------------------
    global

    log 127.0.0.1 local2

    chroot /var/lib/haproxy
    pidfile /var/run/haproxy.pid
    maxconn 40000
    user haproxy
    group haproxy
    daemon
     
    stats socket /var/lib/haproxy/stats

    #---------------------------------------------------------------------
    # common defaults that all the 'listen' and 'backend' sections will
    # use if not designated in their block
    #---------------------------------------------------------------------
    defaults
    mode tcp
    log global
    option tcplog
    option dontlognull
    option redispatch
    retries 3
    timeout queue 1m
    timeout connect 10s
    timeout client 1m
    timeout server 1m
    timeout check 10s
    maxconn 30000

    #填写用途备注
    listen client_ip1
    bind :60002
    mode tcp
    maxconn 1000
    stick-table type ip size 20 expire 10s store conn_cnt
    tcp-request content reject if { src_updt_conn_cnt gt 3 }
    server backend xxx.xxx.xxx.xxx:22
  • 相关阅读:
    十一周总结
    第十周课程总结
    第九周课程总结&实验报告
    第八周课程总结&实验报告
    第七周&实验报告五
    第六周&Java实验报告四
    课程总结
    第十四周课程总结
    第十三周总结
    十二周课程总结
  • 原文地址:https://www.cnblogs.com/ccielife/p/11341761.html
Copyright © 2011-2022 走看看