aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>`__