Hey @matthewb,
max_writers
is set to 1.
mysql> select * from mysql_galera_hostgroups;
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
| writer_hostgroup | backup_writer_hostgroup | reader_hostgroup | offline_hostgroup | active | max_writers | writer_is_also_reader | max_transactions_behind | comment |
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
| 11 | 12 | 10 | 13 | 1 | 1 | 1 | 100 | NULL |
+------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+
1 row in set (0.036 sec)
But there are multiple servers in the writer hostgroup, but with different weights. The PXC Operator does add them I think, I did not configure anything in ProxySQL.
mysql> select * from mysql_servers;
+--------------+---------------------------------------------------------------+------+-----------+--------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+---------------------------------------------------------------+------+-----------+--------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
| 10 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000000 | 0 | 1000 | 0 | 0 | 0 | |
| 10 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 10 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 12 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 12 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
+--------------+---------------------------------------------------------------+------+-----------+--------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
8 rows in set (0.031 sec)
mysql> select * from runtime_mysql_servers;
+--------------+---------------------------------------------------------------+------+-----------+---------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+---------------------------------------------------------------+------+-----------+---------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
| 10 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000000 | 0 | 1000 | 0 | 0 | 0 | |
| 10 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 10 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | SHUNNED | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 11 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | SHUNNED | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 12 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 12 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
+--------------+---------------------------------------------------------------+------+-----------+---------+---------+-------------+-----------------+---------------------+---------+----------------+---------+
8 rows in set (0.024 sec)
I can’t find anything useful in the ProxySQL logs, only that the operator removes all servers and re-add them.
HID: 11 , address: core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 11 , address: core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: SHUNNED , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 11 , address: core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: SHUNNED , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 10 , address: core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 10 , address: core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 10 , address: core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 12 , address: core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
HID: 12 , address: core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local , port: 3306 , gtid_port: 0 , weight: 1000 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
2025-06-16 18:54:47 [INFO] Dumping mysql_servers: ALL
+-----+---------------------------------------------------------------+------+------+---------+--------+-----+-----------+---------+-----+---------+---------+-----------------+
| hid | hostname | port | gtid | weight | status | cmp | max_conns | max_lag | ssl | max_lat | comment | mem_pointer |
+-----+---------------------------------------------------------------+------+------+---------+--------+-----+-----------+---------+-----+---------+---------+-----------------+
| 11 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140207130166912 |
| 12 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140206822589952 |
| 12 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140206822588992 |
| 10 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140206822589760 |
| 10 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140206822588800 |
| 10 | core-pxc-pxc-0.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000000 | 0 | 0 | 1000 | 0 | 0 | 0 | | 140206822590528 |
| 11 | core-pxc-pxc-2.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 1 | 0 | 1000 | 0 | 0 | 0 | | 140206822589568 |
| 11 | core-pxc-pxc-1.core-pxc-pxc.core-production.svc.cluster.local | 3306 | 0 | 1000 | 1 | 0 | 1000 | 0 | 0 | 0 | | 140207130167104 |
+-----+---------------------------------------------------------------+------+------+---------+--------+-----+-----------+---------+-----+---------+---------+-----------------+
2025-06-16 18:54:47 [INFO] Received SAVE MYSQL QUERY RULES FROM RUNTIME command
2025-06-16 18:54:47 [INFO] Received SAVE MYSQL USERS FROM RUNTIME command
2025-06-16 18:54:47 [INFO] Received SAVE MYSQL VARIABLES FROM RUNTIME command