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
  • 相关阅读:
    HDU1287+枚举
    HDU1303+水
    HDU1286+线性筛素数
    HDU1293+Java+大整数
    POJ1992+简单DP
    三种Cache写入方式原理简介
    Hadoop分布式文件系统:架构和设计要点 转
    GFS, HDFS, Blob File System架构对比转
    python
    Cassandra,Mongodb,CouchDB,Redis,Riak,HBase比较转
  • 原文地址:https://www.cnblogs.com/ccielife/p/11341761.html
Copyright © 2011-2022 走看看