MaxScale and multimaster
Hello, I have tried mariadb and max scale. Let me have a question.
I have two db servers. I want the redundant system but no noeed high performance.so I did this setting.
Both dbserv1 and dbserv2 are masters by using mmmon.
I wrote this config. [Splitter Service] type=service router=readwritesplit servers=dbserv1, dbserv2
Insert/update/delete SQL statements are sent to dbserv1, and when db serve1 downs, they are sent to dbserv2.
It seems to work well. But is it right config ?
Answer Answered by Markus Mäkelä in this comment.
The service definition looks OK. Multi-master setups usually set one of the servers into read-only mode with SET GLOBAL read_only=ON
to allow it to be used as a read-only slave.
The main problem with multiple master servers will be that the chosen master will depend on the order of the servers declared with the servers
parameter. It is also not recommended to use readwritesplit in a setup with more than one master server as it will not use the other masters for reads. The readconnroute
router combined with server weghting is a better solution for a highly available setup with multiple masters.
For more information, read the readconnroute documentation and the section on server weights in the configuration guide.