ProxySql connection manages to backend server unavailability

657 views Asked by At

In proxysql we have the query rules for going to Backend DB servers ie Master (Write/Read) and Secondary(Read) but in case as secondary gets down then queries will start failing but how can we manage it from proxysql if secondary is down then that traffic should still be route to Master DB in place of failing the queries?

1

There are 1 answers

0
izzy On

ProxySQL should manage re-routing traffic to the Master for you, in the case that the secondary goes down. It does this by monitoring the status of the MySQL servers with health checks.

When the secondary goes down, health checks from ProxySQL to that server will fail. ProxySQL will shun the node, as it failed to respond to healthchecks. (This means that the status of the server will be set to SHUNNED in the runtime_mysql_servers table.) All queries will then be routed to the Master DB.

this blog contains more information about the health checks.

I can also recommend the proxysql documentation about that monitor module.