Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MySQL System design for high availability with ...

Takeshi Yako
November 26, 2014

MySQL System design for high availability with MHA and HAproxy

Takeshi Yako

November 26, 2014
Tweet

More Decks by Takeshi Yako

Other Decks in Technology

Transcript

  1. Servers app1 app2 mysql1 mysql2 mysql3 HAproxy App App HAproxy

    MySQL Master MySQL Slave MySQL Slave MHA Node MHA Node MHA Node MHA Manager
  2. Read HAproxy App App HAproxy MySQL Master MySQL Slave MySQL

    Slave 127.0.0.1:3307 127.0.0.1:3307 mysql1:3306 mysql2:3306 mysql3:3306
  3. Read Failover step2 HAproxy App App HAproxy MySQL Master MySQL

    Slave HAproxy detaches 
 down server 127.0.0.1:3307 127.0.0.1:3307 mysql1:3306 mysql3:3306
  4. Write Failover step3 MySQL Master MySQL Master MySQL Slave MHA

    Manager MHA changes HAproxy config HAproxy HAproxy
  5. Write Failover step4 HAproxy HAproxy MySQL Slave MySQL Slave 127.0.0.1:3308

    127.0.0.1:3308 App App MySQL Master mysql2:3306 HAproxy detaches 
 down server
  6. Bibliography mysql-master-ha MHA for MySQL: Master High Availability Manager and

    tools for MySQL https://code.google.com/p/mysql-master-ha/ HAproxy The Reliable, High Performance TCP/HTTP Load Balancer http://www.haproxy.org/