3. About N:1 Replication
• Multi Master to Single Slave
Replication
• a.k.a Multi-source Replication
– MariaDB 10 (https://mariadb.com/kb/en/mariadb/mariadb-
documentation/replication-cluster-multi-master/replication/multi-
source-replication/)
– MySQL 5.7 (labs)
(http://www.mysqlperformanceblog.com/2013/10/02/mysql-5-7-multi-
source-replication/)
• N:1 Replication work on MySQL5.0!
12. Current N:1 Replication
• Work in my production for 3 years
• I almost never use time to
maintenance
• can’t keep pace in some case
– pt-online-schema-change
– master server changed
– need restart (relatively trouble)
19. MHA for MySQL
• Master High Availability Manager and
tools for MySQL
(https://code.google.com/p/mysql-master-ha/)
• Automating master failover
– slave promotes to master when master
goes down
– include “Graceful master switch”
function
(masterha_master_switch --master_state=alive)
http://www.slideshare.net/matsunobu/automated-master-failover/44
20. MHA (master switch) 1
current master
(orig_master)
other
slaves
candidate of
master
(new_master)
write
21. MHA (master switch) 2
write
record binlog filename and position
(orig_master_log_file, orig_master_log_pos)