zoukankan      html  css  js  c++  java
  • haporxy 负载elasticsearch

    <pre name="code" class="html">-bash-4.1# cat /etc/haproxy/haproxy.cfg
    global
    	log 127.0.0.1	local3 
    	maxconn 65535 
    	chroot /usr/local/haproxy
    	uid 401
    	gid 401 
    	daemon
    
    defaults
    	log	global
    	mode	http
    	option	httplog
    	option	dontlognull
    	retries	3
    	option  redispatch
    	option  abortonclose 
    	maxconn 65535	
    	timeout connect 5000
    	timeout client  50000
    	timeout server 50000
    
    	timeout check   5s
    	stats   refresh 30s
    	stats   uri     /stats	
    	stats   realm   baison-test-Haproxy     
      	stats   auth    admin:admin
      	stats   hide-version 
           
    	
    frontend  	www
     bind    	*:9200
    
     default_backend eshttp_server
    backend eshttp_server
            mode    	http
    	balance		roundrobin
    backend eshttp_server
            mode    	http
    	balance		roundrobin
    	server ela01 192.168.32.80:9200 check inter 2000 fall 3
    	server ela02 192.168.32.81:9200 check inter 2000 fall 3
    	server ela03 192.168.32.82:9200 check inter 2000 fall 3
    #服务器定义,cookie 1表示serverid为1,check inter 1500 是检测心跳频率
    
    
    #rise 3是3次正确认为服务器可用,fall 3是3次失败认为服务器不可用,weight代表权重
    
    
    server mms1 10.1.5.134:80 cookie 1 check inter 1500 rise 3 fall 3 weight 1
    
    
    server mms2 10.1.6.118:80 cookie 2 check inter 1500 rise 3 fall 3 weight 2
    
    
    
    
    
    


    
       
    
    
  • 相关阅读:
    Jupyter notebook 读取文件的问题
    机器学习-数据清洗和特征选择
    机器学习-逻辑回归
    Java教程
    13.并发编程
    redis 实现
    CyclicBarrier介绍
    Future模式衍生出来的更高级的应用
    并发编程 futuretask
    整理POST请求方式
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199212.html
Copyright © 2011-2022 走看看