MySQL High Availability
Automatic Failover During Database Failure
ScaleBase utilizes standard MySQL replication or Galera Cluster to transport data from a master database to one or more slave databases.
ScaleBase functions as a proxy to a cluster of identical databases, a single point of connectivity to your client applications. When ScaleBase detects that a master database has failed, it automatically redirects all traffic to one of the slave databases ensuring continuous uptime and availability.
ScaleBase employs a smart failover determination process that eliminates false alarms from temporary losses of database connectivity (such as temporary network slowdowns). In this way ScaleBase avoids triggering unnecessary failovers that would necessitate manual labor of a failback.
If the master database crashes and a failover takes place, applications continue to run uninterrupted by the automated failover. Applications retain their open connections and statements states:
- Read operations are automatically re-routed to a working database without any disruptions, delays or performance impact.
- Write operations will be held temporarily until a failover decision is made (typically 5-10 seconds), after which either they are sent to the recovered master, or, in case of a failover, they are forwarded to a new master transparently. In case of an active transaction, an error message is returned to the client. This logic eliminates false alarms that lead to costly failbacks and avoids almost any disruption to running applications.
ScaleBase also constantly monitors all slave databases’ replication lags and when it detects a broken replication process, or a large slave replication lag, it will eliminate non-performing slave databases from the failover processes and will create an alert notification identifying the situation to help operators to quickly remedy the problem.