【MySQL】HAProxy1.6负载均衡分配策略新增first
来源:互联网 发布:淘宝客新手 编辑:程序博客网 时间:2024/05/24 06:29
对于mysql主主代理来说,绝对是一个福音。
经过测试,haproxy能够做到像参数功能描述的那样:
The first server with available connection slots receives the connection.
可用连接槽的第一个服务器接收连接。
并且在第一个服务器恢复之后,能够主动切回来。
for /l %i in (1,1,500) do @(mysql -h192.168.1.221 -P20001 -A -N -e "select concat(%i,'-',version(),'-',sysdate())")
附
first The first server with available connection slots receives the connection. The servers are chosen from the lowest numeric identifier to the highest (see server parameter "id"), which defaults to the server's position in the farm. Once a server reaches its maxconn value, the next server is used. It does not make sense to use this algorithm without setting maxconn. The purpose of this algorithm is to always use the smallest number of servers so that extra servers can be powered off during non-intensive hours. This algorithm ignores the server weight, and brings more benefit to long session such as RDP or IMAP than HTTP, though it can be useful there too. In order to use this algorithm efficiently, it is recommended that a cloud controller regularly checks server usage to turn them off when unused, and regularly checks backend queue to turn new servers on when the queue inflates. Alternatively, using "http-check send-state" may inform servers on the load.
0 0
- 【MySQL】HAProxy1.6负载均衡分配策略新增first
- RabbitMQ3.6.3集群搭建+HAProxy1.6做负载均衡
- RabbitMQ3.6.3集群搭建+HAProxy1.6做负载均衡
- 负载均衡策略
- 一些负载均衡策略
- 负载均衡策略
- 负载均衡策略
- Apache负载均衡策略
- nginx负载均衡策略
- 一些负载均衡策略
- 负载均衡策略概论
- 一些负载均衡策略
- NGinx负载均衡策略
- Nginx负载均衡策略
- Nginx负载均衡策略
- Nginx负载均衡策略
- NGX负载均衡策略
- NGinx负载均衡策略
- Java8初体验
- 使用友盟进行第三方平台的授权分享
- 搜索和替换文件中的文本
- Java多线程(一)——线程创建的两种方法
- windows cmd 命令行下打开文件夹图形界面
- 【MySQL】HAProxy1.6负载均衡分配策略新增first
- 白话Spring(基础篇)---方法注入与方法替换
- sendBroadcast和sendStickyBroadcast的区别
- INF文件格式说明(转载)
- Travis CI android 持续集成
- Unity3d获得android和ios设备的唯一标识
- [设计模式] 状态模式
- 获取网页中的图片
- ubuntu 花屏、卡死