aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranciszek Przewozny <przewozny.franciszek@gmail.com>2026-09-11 00:13:27 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2026-09-17 06:38:11 +0000
commita0d97b7373730f241b3637f9e5ab03cd8f99cf87 (patch)
treedd253c1f02402eb9275f877457f575f69a4c3d48
parent7c45608cf7dd251a334ac888a19ad7d8c053a165 (diff)
downloadkolla-ansible-a0d97b7373730f241b3637f9e5ab03cd8f99cf87.tar.gz
kolla-ansible-a0d97b7373730f241b3637f9e5ab03cd8f99cf87.zip
Fix ProxySQL not using backup writer node for reads
Set writer_is_also_reader to 2 in the Galera hostgroup configuration so that the backup writer node also serves reads, instead of sitting idle while all read traffic went to the single remaining reader node. The writer node is never added to the reader hostgroup regardless of this setting, only the backup writer is affected. See bug report for performance difference details. Closes-Bug: #2167037 Change-Id: Ib5145c200c3cd70f861824abd967748faf61e1cf Signed-off-by: fprzewozn <przewozny.franciszek@gmail.com> (cherry picked from commit 42eec877ff572fd724af8a1c0fa64acf5e824c7b)
-rw-r--r--ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j22
-rw-r--r--releasenotes/notes/fix-proxysql-distributed-reads-5142e40995499611.yaml13
2 files changed, 14 insertions, 1 deletions
diff --git a/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 b/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2
index f7a8b0a08..549051383 100644
--- a/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2
+++ b/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2
@@ -111,6 +111,6 @@ mysql_galera_hostgroups:
offline_hostgroup: {{ _offline_group }}
max_connections: {{ proxysql_backend_max_connections }}
max_writers: 1
- writer_is_also_reader: 0
+ writer_is_also_reader: 2
comment: "Galera cluster for shard {{ shard_id }}"
{% endfor %}
diff --git a/releasenotes/notes/fix-proxysql-distributed-reads-5142e40995499611.yaml b/releasenotes/notes/fix-proxysql-distributed-reads-5142e40995499611.yaml
new file mode 100644
index 000000000..1ec90b0fd
--- /dev/null
+++ b/releasenotes/notes/fix-proxysql-distributed-reads-5142e40995499611.yaml
@@ -0,0 +1,13 @@
+---
+fixes:
+ - |
+ Fix ProxySQL Galera configuration so that the backup writer
+ node also serves read queries, instead of leaving it idle
+ and sending all reads to the single remaining reader node.
+ This is done by setting ``writer_is_also_reader`` to ``2``,
+ which adds backup writer hostgroup nodes to the reader
+ hostgroup while still excluding the active writer node. See
+ the `ProxySQL documentation
+ <https://proxysql.com/documentation/group-replication-configuration/>`__
+ for details.
+ `LP#2167037 <https://launchpad.net/bugs/2167037>`__