<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
												

haporxy 负载elasticsearch的更多相关文章

  1. haproxy 负载elasticsearch 切换

    Attempted to send a bulk request to Elasticsearch configured at '["http://192.168.32.152:9200&q ...

  2. kibana连接elasticsearch集群做负载均衡

    问题背景: 在ELK架构中,kibana一般配置连接elasticsearch的时候,配置文件中的写法一般如下: ……# The URL of the Elasticsearch instance t ...

  3. elasticsearch负载均衡节点——客户端节点 node.master: false node.data: false 其他配置和master 数据节点一样

    elasticSearch的配置文件中有2个参数:node.master和node.data.这两个参 数搭配使用时,能够帮助提供服务器性能. 数据节点node.master: false node. ...

  4. Graylog+elasticsearch+mongodb集群+nginx负载均衡前端

    网上有张图画的很好,搜索有关它的配置文章,google里有几篇英文的,都是依靠haproxy等或别的什么实现,没有纯粹的Graylog+elasticsearch+mongodb集群,项目需要,只有自 ...

  5. kibana访问多个 Elasticsearch 节点间的负载均衡

    如果 Elasticsearch 集群有多个节点,分发 Kibana 节点之间请求的最简单的方法就是在 Kibana 机器上运行一个 Elasticsearch 协调(Coordinating onl ...

  6. Elasticsearch:反向代理及负载均衡在 Elasticsearch 中的应用

    文章转载自:https://elasticstack.blog.csdn.net/article/details/108365746

  7. .net Elasticsearch 学习入门笔记

    一. es安装相关1.elasticsearch安装  运行http://localhost:9200/2.head插件3.bigdesk插件安装(安装细节百度:windows elasticsear ...

  8. ElasticSearch 5学习(8)——分布式文档存储(wait_for_active_shards新参数分析)

    学完ES分布式集群的工作原理以及一些基本的将数据放入索引然后检索它们的所有方法,我们可以继续学习在分布式系统中,每个分片的文档是被如何索引和查询的. 路由 首先,我们需要明白,文档和分片之间是如何匹配 ...

  9. ElasticSearch 5学习(6)——分布式集群学习分享1

    在使用中我们把文档存入ElasticSearch,但是如果能够了解ElasticSearch内部是如何存储的,将会对我们学习ElasticSearch有很清晰的认识.本文中的所使用的ElasticSe ...

随机推荐

  1. HDU3564 --- Another LIS (线段树维护最值问题)

    Another LIS Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total ...

  2. python删除指定位置 2个元素

    # -*- coding: utf-8 -*-__author__ = 'Administrator'import bisect#排序说明:http://en.wikipedia.org/wiki/i ...

  3. Android 按二次后退键退出应用程序

    前言          欢迎大家我分享和推荐好用的代码段~~ 声明          欢迎转载,但请保留文章原始出处:          CSDN:http://www.csdn.net        ...

  4. [MongoDB] Remove, update, create document

    Remove: remove the wand with the name of "Doom Bringer" from our wandscollection. db.wands ...

  5. UVALive 4043 Ants

    KM   构图求最小权值匹配 保证最小的权值,所连的边一定是能够不相交的. Ants Time Limit: 3000MS   Memory Limit: Unknown   64bit IO For ...

  6. android 4.0之前版本号出现JSONException异常

    今天在调试解析server传过来的JSON数据时,在2.3.7的手机上报了以下这样一个异常. 08-07 22:00:29.597: W/System.err(7610): org.json.JSON ...

  7. [转] unix/linux下线程私有数据实现原理及使用方法

     在维护每个线程的私有数据的时候,我们可能会想到分配一个保存线程数据的数组,用线程的ID作为数组的索引来实现访问,但是有一个问题是系统生成的线程 ID不能保证是一个小而连续的整数,并且用数组实现的时候 ...

  8. Android实现左右滑动效果

    本示例演示在Android中实现图片左右滑动效果.   关于滑动效果,在Android中用得比较多,本示例实现的滑动效果是使用ViewFlipper来实现的,当然也可以使用其它的View来实现.接下来 ...

  9. CSS样式之背景、文本

    一.背景     1.背景颜色用background-color属性,例如:body{background-color:red}     2.用图像做背景用background-image属性,例如b ...

  10. Sqlserver in 实现 参数化查询 XML类型

    原文: http://www.cnblogs.com/tangruixin/archive/2012/04/23/2465917.html 1:如果参数是int类型: declare @a xmlse ...