In my previous post I have explain how we are running maxwell as service in Ubuntu. Now in this post I will be explaining how we achieved HA for Backend Instances (MySQL Hosts), Maxwell was using to read binlog.
So the stack we have introduced to achieve high availability contains HAProxy (http://www.haproxy.org/) and GTID enabled slaves. HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications.
defaults mode tcp timeout connect 5000ms timeout client 86400s timeout server 86400s listen MySQL bind 127.0.0.1:3306 mode tcp option mysql-check user haproxy # mysql-check enables a database server check, to determine whether the node is currently operational server Primary host1:3306 check server Secondary host2:3306 check backup
Now stack becomes:
This stack has solved our problem incase MySQL slave goes down, Our whole pipeline will not be impacted.
Next Post: We will be publishing on How we achieved HA for Maxwell service.