Hi,
I have a question about the db_cluster module. We are currently using a galera mysql cluster from severalnines, in this setup haproxy is installed on the kamailio nodes handling the database failover.
The question is if a database node fails and the TCP connection breaks the sql query will probably fail when using haproxy since it is not aware of the query. Will the db_cluster module send the query to the next available mysql node in the cluster without a failing query? If thats the case i should not notice the failing dbnode in my kamailio script.
In other words, will there be a advantage in using the db_cluster module instead of haproxy?
Thanks,
Jan Hazenberg
On Wednesday 08 July 2015 11:02:44 Jan Hazenberg wrote:
The question is if a database node fails and the TCP connection breaks the sql query will probably fail when using haproxy since it is not aware of the query. Will the db_cluster module send the query to the next available mysql node in the cluster without a failing query? If thats the case i should not notice the failing dbnode in my kamailio script.
Yes, if a node failes to reply, the next node will be used.
Take note of the penalty box used in db_cluster, if a node fails to reply in a timely fashion (max_query_length) it will be disable for some time (inactive_interval, by default 300s).
Daniel Tryba schreef op 2015-07-08 12:19:
On Wednesday 08 July 2015 11:02:44 Jan Hazenberg wrote:
The question is if a database node fails and the TCP connection breaks the sql query will probably fail when using haproxy since it is not aware of the query. Will the db_cluster module send the query to the next available mysql node in the cluster without a failing query? If thats the case i should not notice the failing dbnode in my kamailio script.
Yes, if a node failes to reply, the next node will be used.
Take note of the penalty box used in db_cluster, if a node fails to reply in a timely fashion (max_query_length) it will be disable for some time (inactive_interval, by default 300s).
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thanks for the quick reply, indeed looks like that the db_cluster module is the best solution.
Jan
Jan Hazenberg schreef op 2015-07-08 12:35:
Daniel Tryba schreef op 2015-07-08 12:19:
On Wednesday 08 July 2015 11:02:44 Jan Hazenberg wrote:
The question is if a database node fails and the TCP connection breaks the sql query will probably fail when using haproxy since it is not aware of the query. Will the db_cluster module send the query to the next available mysql node in the cluster without a failing query? If thats the case i should not notice the failing dbnode in my kamailio script.
Yes, if a node failes to reply, the next node will be used.
Take note of the penalty box used in db_cluster, if a node fails to reply in a timely fashion (max_query_length) it will be disable for some time (inactive_interval, by default 300s).
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thanks for the quick reply, indeed looks like that the db_cluster module is the best solution.
Jan
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
One other question, is there a way to see the status of the connections to the dbnodes with db_cluster?
Thanks,
Jan