MySQL Multi-Source Replication

32 views
Skip to first unread message

Slawek Korwel

unread,
Nov 20, 2024, 9:37:45 AM11/20/24
to proxysql
Hello! 
I have a question. What is the desire behavior from proxysql when it monitors a mysql slave that replicates from more than one source?

Since GTID based replication it is possible to use multi sources to replicate data from to one slave database. It can be used from many reasons, to mention only about "merging a sharding data" or "merging different databases into one".
My concern is: if one of the replicas in that multi-source model has a lag:
1. would it be count as the entire server's lag and practically it will be shunned? or
2. all server will be treated as lag = 0 until at least one replication has no lag. 

My tests show that proxysql relies ONLY on the first replication channel and calculates a lag just based on the times from that one channel. So even if the second channel - I don't know how mysql orders them - has a lag or is stopped, proxysql still treats my server as ONLINE and servers.
When I flip the situation and start second channel, but stop the first one, proxysql suddenly thinks the entire server should be shunned. 

Is it desired way it should work?
Thanks,
Sławek



Michael Romero

unread,
Dec 19, 2024, 8:48:29 PM12/19/24
to proxysql
I am also interested in how ProxySQL behaves when multi-source replication is enabled on a MariaDB / MySQL server.  My setup currently consists of replicas that have connections to a 'masterA' and 'masterB' replication source (the read/write master/master pair). Such that a 'show slave status\G' would return empty because we are not using any default channel name (empty name) and are instead using 'masterA' / 'masterB' - i.e. you would need to run 'show all slaves status\G' to see the replication health, or 'show slave 'masterA' status\G' etc. 

Is this something that ProxySQL is capable of supporting, or is it only capable of supporting a default channel i.e. with no name, or maybe even one named connection?

Reply all
Reply to author
Forward
0 new messages