MySQL high availability & autofailover with ProxySQL & Orchestrator

Session track

Devops

Experience level

Expert

Duration

50 min

MySQL replication has been common practice for years. But leveraging master/slave or master/master replication in order to achieve high availability still proves to be challenging:

  • How do you know which nodes in your replicaset are active?
  • What do you do when replication breaks?
  • How do you deal with a dead master server?
  • How do you split read and write queries?

In this presentation, I’ll show you how to use ProxySQL as a single point of entry. ProxySQL will automatically performing read/write splitting and send the queries to the right servers.

We’ll also use Github’s Orchestrator project to monitor replica sets and perform automatic failover when servers die. New master elections will be advertised through the Consul key/value store and will trigger an automatic reconfiguration of our loadbalancers and ProxySQL servers.

The end goal is to create a reliable MySQL stack that is highly available and where complexities are abstracted away into a single endpoint.