Open shinguz opened 3 years ago
Hi Oli, sorry I missed this ticket. There is an option for glbd to run external script that checks the state of a destination (glbd is a generic TCP router, so it does not know what sort if destination is there):
./glbd -w exec:"mysql.sh -d 2 -utest -ptestpass" -t 2 3306 192.168.0.1 192.168.0.2
so here you have -w
(--watchdog
) option with an argument exec:"mysql.sh -d 2 -utest -ptestpass"
which means that it will execute external script with certain options. There is a sample mysql.sh
script that should work for most users in /usr/share/doc/glbd/examples/mysql.sh
This can be configured in /etc/sysconfig/glbd
//etc/default/glbd
like:
OTHER_OPTIONS="-w exec:'/path/to/mysql.sh -d 2 -utest -ptestpass'"
hi @ayurchen, its better that Galera Load balancer has the capability to understand current cluster and exclude the node that is not part of cluster. We had this issue last week in production, the node was not part of cluster (mysql was running but due to network issue it went away from cluster) but still glb was sending requests to this node.
glb should understand galera group communication protocol and exclude node if it is not in state synced (donor/desynced)