<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. Windows Azure 存储管理器 (2014)

     Windows Azure存储用户经常希望能够在"管理器"中查看他们的数据,管理器指的是一款可用于显示存储帐户数据的工具.我们之前提供了我们所知的存储管理器列表.在本文中,我 ...

  2. 【hihoCoder第十七周】最近公共祖先·三

    之前就写的是离线算法.思路就是先序一遍树,记录层数,然后高效RMQ就好.ST和线段树都能过. 以后有时间将之前的在线算法补上. #include <bits/stdc++.h> using ...

  3. Qt Creator中,include路径包含过程(或如何找到对应的头文件)

    Qt Creator中,include路径包含过程(或如何找到对应的头文件) 利用Qt Creator开发程序时,需要包含利用#include来添加头文件. 大家都知道,#include <&g ...

  4. Spring3 MVC 之 Hello Word

    开发工具: MyEclipse  10.0 项目目录: [http://www.cnblogs.com/rhythmK/] 1.新建项目:File->New->Web Project  项 ...

  5. ibatis使用--SqlMapClient对象

    SqlMapClient对象 这个对象是iBatis操作数据库的接口(执行CRUD等操作),它也可以执行事务管理等操作.这个类是我们使用iBATIS的最主要的类.它是线程安全的.通常,将它定义为单例. ...

  6. Go程序GC优化经验分享

    http://1234n.com/?post/yzsrwa 最近一段时间对<仙侠道>的服务端进行了一系列针对GC的调优,这里跟各位分享一下调优的经验. 游戏第一次上线的时候,大部分精力都投 ...

  7. [RxJS] Creating Observable From Scratch

    Get a better understanding of the RxJS Observable by implementing one that's similar from the ground ...

  8. Gson源码分析之Json结构抽象和注解使用

    github上的博客地址: http://chuyun923.github.io/blog/2015/01/06/gsonyuan-ma-fen-xi/ XML和Json作为最常用的两种网络传输格式而 ...

  9. Notification (通知)的 新版和旧版用法

    Notification (通知)的 新版和旧版用法   一.先来看旧版,Api 11 之前的用法: NotificationManager manager = (NotificationManage ...

  10. 常见HTTP状态码的含义

    200 请求已成功,请求所希望的响应头或数据体将随此响应返回. 301 被请求的资源已永久移动到新位置. 302 请求的资源现在临时从不同的 URI 响应请求. 400 1.语义有误,当前请求无法被服 ...