rt-mysql-galera-client
mariadb/mysql client support galera cluster High Availability
Introduction
This is a node.js driver for mysql galera cluster, include those features:
- auto recover from mysql server crash or connection failure.
- provide high availability. If one mysql server crash at runtime, it will auto re-send mysql command to another host in galera cluster. So your won't lose any data or query failure. You need at least 2 hosts in galera cluster to enable high availability.
- use Round-Robin rule to send mysql command to galera cluster
Install
npm install --save rt-mysql-galera-client
Usage
var MyGaleraClient = ; //createPool = function(mysqlGaleraHostsArray, user, password, database)pool = MyGaleraClient; //pool.query(sql, function(error, results, fields)pool;