# ProxySQL平滑下线节点

KO我司自研php中间件

## 环境介绍

10.133.x.59 跑sysbench
10.133.x.52:3307 测试集群节点
10.133.x.53:3307 测试集群节点
10.133.x.54:3307 测试集群节点
VIP 访问类型 所在服务器
10.133.x.202 KO 10.133.x.202
10.133.x.203 ProxySQL 10.133.x.203

ProxySQL版本

MySQL版本

1.59跑压测

## 正确的下线方式

1.59跑sysbench

1.52插入KO VIP, 修改其他节点状态为OFFLINE_SOFT

## 关于OFFLINE_SOFT

• status:
• ONLINE - backend server is fully operational
• SHUNNED - backend sever is temporarily taken out of use because of either too many connection errors in a time that was too short, or replication lag exceeded the allowed threshold
• OFFLINE_SOFT - when a server is put into OFFLINE_SOFT mode, new incoming connections aren’t accepted anymore, while the existing connections are kept until they became inactive. In other words, connections are kept in use until the current transaction is completed. This allows to gracefully detach a backend
• OFFLINE_HARD - when a server is put into OFFLINE_HARD mode, the existing connections are dropped, while new incoming connections aren’t accepted either. This is equivalent to deleting the server from a hostgroup, or temporarily taking it out of the hostgroup for maintenance work
#