proxysql

ProxySql Master node not serve the traffic untill slave gets shunned


I need to create a hostgroup with a master and n slaves.

Can I configure it in a way that all the requests will be served by the slaves DB only(not by the master), until and unless the slaves get shunned?


Solution

  • Yes, and when you mean by requests I assume you mean only READ requests and WRITEs will still be forwarded to the Master.

    Make sure to configure mysql_replication_hostgroups and create Query Rules in mysql_query_rules table. Here's a blog post of a friend that I hope will get you started: proxysql-tutorial-master-and-slave