请教一个 ProxySQL 配置问题

2019-07-26 13:54:41 +08:00
 qtsunk

使用的是 proxysql 原生自带的 galera 集群配置方案,具体配置如下:

INSERT INTO mysql_servers ( hostgroup_id, hostname, PORT, weight )
VALUES
    ( 2, '192.168.0.3', 3306, 100 ),
    ( 2, '192.168.0.4', 3306, 10 ),
    ( 3, '192.168.0.5', 3306, 100 );
INSERT INTO mysql_galera_hostgroups ( writer_hostgroup, backup_writer_hostgroup, reader_hostgroup, offline_hostgroup, active, max_writers, writer_is_also_reader, max_transactions_behind )
VALUES
    ( 2, 4, 3, 1, 1, 1, 0, 100 );

加载配置后,理论上应该 192.168.0.4 被改为 4 组,其他保持不变,但实际情况如下:

mysql> select hostgroup_id,hostname,status,weight from runtime_mysql_servers;    
+--------------+-------------+--------+--------+
| hostgroup_id | hostname    | status | weight |
+--------------+-------------+--------+--------+
| 2            | 192.168.0.5 | ONLINE | 100    |
| 4            | 192.168.0.3 | ONLINE | 100    |
| 4            | 192.168.0.4 | ONLINE | 10     |
+--------------+-------------+--------+--------+

.5 变成了 2 组

.3 和 .4 都变成了 4 组,这直接就懵逼了。。怎么会这样?请问是什么问题?

3678 次点击
所在节点    MySQL
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/586419

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX