Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Cluster
-
Author
severalnines-ab -
Category
Technology
-
view
3.502 -
download
4
Embed Size (px)
description
Transcript of Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Cluster
- 1. Migrating to MySQL, MariaDB Galera, and/or Percona XtraDB Cluster March 2014 Johan Andersson Severalnines AB [email protected] Mobile +46 73 073 60 99
2. Online Migration ! Existing MySQL Server ! E.g Master Slave setup ! Single server ! Tired of slave lag and data loss? ! Easy scaling w/o read/write splits? ! Feasibility - Data set, queries, suits Galera 2 Copyright 2014 Severalnines AB 3. Online Migration 3 Copyright 2014 Severalnines AB Master Slave RW R Galera Cluster m1 s1 gm1 gm2 gm3 Setup with http://www.severalnines.com/galera-configurator Existing setup (examples based on 5.5) 4. Online Migration ! On s1: ! Enable log-bin=binlog log-slave-updates=1 ! GRANT REPLICATION_SLAVE ON *.* TO [email protected] IDENTIFIED BY repl ! Dump schema and data into two separate files. ! Easier to convert the schema ! Best: convert schema already on slave Copyright 2014 Severalnines AB 4 Master Slave RW R m1 s1 5. Online Migration ! On gm1: ! Load in converted schema ! Load in data ! CHANGE MASTER TO MASTER_HOST=s1, MASTER_USER=repl, MASTER_PASSWORD=repl; ! START SLAVE; Copyright 2014 Severalnines AB 5 Galera Cluster gm1 gm2 gm3 6. Online Migration 6 Copyright 2014 Severalnines AB Master Slave Galera Cluster RW R R/W 7. Online Migration 7 Copyright 2014 Severalnines AB Master Slave Galera Cluster RW R 90% R/W 10% Reads 8. Cut Off 8 Copyright 2014 Severalnines AB Master Slave Galera Cluster RW R R/W 9. Demo Time! ! Setting up Replication from Master to Galera Cluster (acting as a slave cluster). ! Master Percona Server 5.5 ! Slave - 3 Node Galera Cluster PXC 5.6 9 Copyright 2014 Severalnines AB Master Galera Cluster 10. Operational Checklist ! Are queues building up? ! Slow queries? Tune queries in the Query Monitor. ! Are backups working? ! Reporting queries? ! Latency issue? ! Do you have random node restarts and failures? Time to upgrade. ! Did you test new code before putting in production? You worst enemy is the network administrator! 10 Copyright 2014 Severalnines AB 11. Belt and Suspenders ! Apply your backup procedures as normal ! mysqldump single-transaction ! s9s_backup, front-end to xtrabackup http://johanandersson.blogspot.se/2012/10/hotbackup-of-galera-cluster-for- mysql.html ! http://www.severalnines.com/blog/full-restore-mysql-galera-cluster-backup ! You may still want to have an async slave connected to the cluster ! Reporting ! Disaster Recovery ! http://www.severalnines.com/blog/asynchronous-replication-galera-cluster- mysql-server-gtid ! Point in time recovery ! http://www.severalnines.com/blog/point-time-recovery-galera-cluster 11 Copyright 2014 Severalnines AB 12. Q & A 12 Copyright 2014 Severalnines AB 13. Thank you. 13 Copyright 2014 Severalnines AB For further questions please contact John-Jerome Schmidt: [email protected]