Force reads on Master in Master-Slave configuration

You are viewing an old version of this question. View the current version here.

I want to use MaxScale to scale the reads throughput.

But I also want to only use 2 instances: 1 Master and 1 Slave.

When using the read-write-split router in this configuration, only the slave receives the reads. Is there a way to also allow reads on the master?

I've found in the documentation: https://mariadb.com/kb/en/mariadb-maxscale-24-readwritesplit/#master_accept_reads "By default, no reads are sent to the master as long as there is a valid slave server available. If no slaves are available, reads are sent to the master regardless of the value of master_accept_reads."

Ok, so "by default" means that there is a way to force reads on the master?

Answer Answered by Markus Mäkelä in this comment.

To allow reads on the master, add master_accept_reads=true in the service section.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.