ivaneeo's blog

          自由的力量,自由的生活。

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
          # this config needs haproxy-1.1.28 or haproxy-1.2.1
          global
                  log 127.0.0.1   local0
                  log 127.0.0.1   local1 notice
                  #log loghost    local0 info
                  maxconn 4096
                  tune.bufsize 20480
                  tune.maxrewrite 2048
                  #chroot /usr/share/haproxy
                  user haproxy
                  group haproxy
                  daemon
                  #debug
                  #quiet
          defaults
              log global
              mode tcp
              option tcplog
              option dontlognull
              option tcp-smart-accept
              option tcp-smart-connect
              #option dontlog-normal
              retries 3
              option redispatch
              timeout connect 1h
              timeout client  1h  
              timeout server  1h
              maxconn 40000
              option redispatch
          listen rabbitmq_cluster 0.0.0.0:5672
                 mode tcp
                 maxconn 2000
                 balance roundrobin
                 server   rabbit1 172.20.21.1:5672 check inter 2000 rise 2 fall 3
                 server   rabbit2 172.20.21.2:5672 check inter 2000 rise 2 fall 3
                 server   rabbit3 172.20.21.3:5672 check inter 2000 rise 2 fall 3
          listen  mariadb_cluster
                  bind 0.0.0.0:3306
                  mode tcp       
          #option tcpka
                  option mysql-check user haproxy #mysql....  root.mysql.....
                  #balance leastconn           #....
                  balance roundrobin
                  server mysql1 172.20.21.1:3306 weight 1 check  inter 1s rise 2 fall 2
                  server mysql2 172.20.21.2:3306 weight 1 check  inter 1s rise 2 fall 2
                  server mysql3 172.20.21.3:3306 weight 1 check  inter 1s rise 2 fall 2
          listen ssdb_cluster 0.0.0.0:8888
                 mode tcp
                 maxconn 2000
                 balance roundrobin
                 server   ssdb1 172.20.21.1:8888 check inter 2000 rise 2 fall 3
                 server   ssdb2 172.20.21.2:8888 check inter 2000 rise 2 fall 3
          listen 49 0.0.0.0:3389
                 mode tcp
                 maxconn 2000
                 balance source
                 option tcpka
                 server   49 172.20.0.49:3389 check inter 2000 rise 2 fall 3
          listen stats :1936
              mode http
              stats enable
              stats hide-version
              stats realm Haproxy\ Statistics
              stats uri /
              stats auth admin:admin
          posted on 2014-03-11 15:22 ivaneeo 閱讀(312) 評論(0)  編輯  收藏 所屬分類: GNU牛力
          主站蜘蛛池模板: 丹江口市| 岐山县| 阜城县| 卓尼县| 邵阳县| 镇江市| 平陆县| 南安市| 大姚县| 伊春市| 漯河市| 曲靖市| 马边| 商城县| 水富县| 长宁县| 黑龙江省| 苏尼特右旗| 武穴市| 沂源县| 章丘市| 新余市| 凌海市| 长子县| 岳池县| 西峡县| 肥东县| 治多县| 石阡县| 万年县| 大理市| 余江县| 仲巴县| 南城县| 广元市| 个旧市| 哈巴河县| 法库县| 禹城市| 清原| 江源县|