zoukankan      html  css  js  c++  java
  • mysql 从读负载

    global
    #log 127.0.0.1	local0
    log 127.0.0.1	local3 info
    #log loghost	local0 info
    maxconn 4096
    chroot /usr/local/haproxy
    uid nobody
    gid nobody
    daemon
    debug
    #quiet
     
    defaults
    log	global
    mode	tcp
    #option	httplog
    option	dontlognull
    retries	3
    option redispatch
    maxconn	2000
    contimeout	5000
    clitimeout	50000
    srvtimeout	50000
     
    frontend mysql
    bind 192.168.0.107:3306
    maxconn 3000
    default_backend mysql_slave
     
     
    backend	mysql_slave 
    #cookie	SERVERID rewrite
    mode tcp
    balance	roundrobin
    #balance	source
    #balance	leastconn
    contimeout 10s
    timeout check 2s
    option httpchk OPTIONS * HTTP/1.1
    Host: www
    server	mysql_192_168_0_104_3306 192.168.0.104:3306 weight 1 check port 9300 inter 5s rise 2 fall 3
    server	mysql_192_168_0_104_3307 192.168.0.104:3307 weight 1 check port 9301 inter 5s rise 2 fall 3
    #server	mysql_192_168_0_106_3306 192.168.0.106:3306 weight 1 check port 9300 inter 5s rise 2 fall 3
     
    listen  admin_status
    mode  http
    bind 192.168.0.107:8000
    option httplog
    log global
    stats enable
    stats refresh 30s
    stats hide-version
    stats realm Haproxy Statistics
    stats uri  /admin-status
    stats auth  admin:123456
    stats admin if TRUE

  • 相关阅读:
    2019-8-31-win10-uwp-使用-WinDbg-调试
    PHP simplexml_import_dom() 函数
    PHP asXML() 函数
    PHP registerXPathNamespace() 函数
    PHP getNamespaces() 函数
    PHP getName() 函数
    查看收集统计信息的时间间隔
    SPOJ DISQUERY LCA + 倍增
    洛谷P3958 奶酪 并查集
    洛谷P2678 跳石头
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351099.html
Copyright © 2011-2022 走看看