SlideShare a Scribd company logo
Migrating from MySQL Replication
to Galera Cluster
Philip Stoev
Codership Oy
2
Codership
Established 2007 (Galera development started).
Production version 2009
3 co-founder engineers:
Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect
Team have developed three MySQL cluster software earlier.
Based on: http://www.dsn.jhu.edu/~yairamir/Yair_phd.pdf
http://www.inf.usi.ch/faculty/pedone/Paper/199x/These-2090-Pedone.pdf
Product: Galera Cluster for MySQL, open source
Thousands of users in e-commerce, telecom, gaming, insurance, betting, healthcare,
media, marketing, advertising, travel, universities, software-as-service, Paas, Iaas, etc
Galera Cluster is included and will be included in Linux and OpenStack distros
3
Galera Cluster variants
API
MySQL
Coderhips’s Galera Replication plugin
API
Percona
Server
API
MariaDB
merge
merge
Percona calls Galera
Percona XtraDB Cluster
Galera Cluster for MySQL by Codership
MariaDB calls Galera
MariaDB Galera Cluster or
MariaDB Enterprise Cluster
Agenda
• A very quick overview of Galera Cluster
• Compare asynchronous to synchronous replication
• Demonstrate a migration with no downtime
Galera Cluster Overview
Synchronous
– each transaction is immediately replicated on all nodes at commit
– no stale slaves
Multi-Master
– read from and write to any node
– automatic transaction conflict detection
Replication
– a copy of the entire dataset is available on all nodes
– new nodes can join automatically
For MySQL
– based on a modified version of MySQL (5.5, 5.6 with 5.7 coming up)
– InnoDB storage engine
And more …
• Recovers from node failures within seconds
• Data consistency protections
– avoids reading stale data
– prevents unsafe data modifications
• WAN support
– nodes can be on different continents
– end-to-end encryption
– optimized communication with least latency
Synchronous Replication
Galera replication is synchronous
• Replication happens at COMMIT time:
– network delays can slow down the commit
– but disk I/O can be avoided
• Virtually no slave lag:
– nodes can be behind only by a
very small number of transactions
– cluster will be throttled if a node falls behind
– options are available for less strict operation
Multi-Master
Every Galera node can process any database update
• Conflicts are detected at COMMIT time
– application must be able to detect the error and retry whole
transaction
• Instant fail-over
– no need for an external procedure to promote new master
• Any load-balancer can be used
– Codership provides GLB, which works at the TCP level
– some language Connectors can do it internally
Monitoring and Configuration
• Entire Galera configuration is in my.cnf
– CHANGE MASTER is not used
– master.info, relay-log.info, etc. are not used
• SHOW SLAVE STATUS is not used
– SHOW STATUS LIKE ‘wsrep_%’ provides status information
• Important status variables:
– wsrep_cluster_status
– wsrep_flow_control_paused
Galera And The Binary Log
• Galera uses row-based binary log events for replication
– binlog_format=ROW is required
– wsrep-forced-binlog-format=ROW can also be useful
• But Galera does not use binary log files
– log-bin is not necessary unless binlog files are needed for
some other purpose, such as point-in-time backup
– log-slave-updates ensures that all updates made on any
node are reflected in the binlog files or all nodes
– relay log is not used
Adding New Nodes
Galera takes care of the details:
• No need to manually ship data files
– Galera supports taking a non-blocking
snapshot from existing node via XtraBackup
• No need to manually track positions or perform replay
– Galera will fetch and replay whatever data is required
– node will not answer queries unless it is fully up to date
Hybrid Operation
• Galera Cluster can be a slave to traditional replication
– all updates from the async master are replicated
to all Galera nodes
– very useful during migrations
• Galera can be a master to async replication
– so you can have special-purpose slaves
(non-InnoDB, time-delayed, etc.)
– log_slave_updates must be set
Migration Procedure
1. Convert an existing async slave to Galera
2. Build up the cluster to the desired size
3. Switch readers to read from the cluster
4. Switch writers to write to the cluster
5. Deactivate the async replication altogether
Setup
• At start: • At end:
node 1
node 2
node 3
writes
reads
async
master
async
slave
async
slave
Writes
async
master
async
slave
reads
Questions
• Please use the Question/Chat box in the GoToWebinar
panel
Thank You
http://www.galeracluster.com
Discussion group:
codership-team@googlegroups.com

More Related Content

What's hot (20)

PDF
Galera Cluster DDL and Schema Upgrades 220217
Codership Oy - Creators of Galera Cluster
 
PDF
Running Galera Cluster on Microsoft Azure
Codership Oy - Creators of Galera Cluster
 
PDF
Scaling with sync_replication using Galera and EC2
Marco Tusa
 
PDF
How to understand Galera Cluster - 2013
Codership Oy - Creators of Galera Cluster
 
PDF
Galera 3.0 Webinar Slides: Galera Monitoring & Management
Severalnines
 
PDF
Galera explained 3
Marco Tusa
 
PDF
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Severalnines
 
PDF
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Corporation
 
PPTX
Maria DB Galera Cluster for High Availability
OSSCube
 
PDF
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Continuent
 
PDF
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
 
PDF
Galera Cluster - Node Recovery - Webinar slides
Severalnines
 
PDF
Plny12 galera-cluster-best-practices
Dimas Prasetyo
 
PPTX
MySQL Multi Master Replication
Moshe Kaplan
 
PDF
Introduction to Galera
Henrik Ingo
 
PPTX
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Corporation
 
DOCX
Master master vs master-slave database
Wipro
 
PDF
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Severalnines
 
PDF
Zero Downtime Schema Changes - Galera Cluster - Best Practices
Severalnines
 
PDF
合并到 XtraDB 存储引擎集群
YUCHENG HU
 
Galera Cluster DDL and Schema Upgrades 220217
Codership Oy - Creators of Galera Cluster
 
Running Galera Cluster on Microsoft Azure
Codership Oy - Creators of Galera Cluster
 
Scaling with sync_replication using Galera and EC2
Marco Tusa
 
How to understand Galera Cluster - 2013
Codership Oy - Creators of Galera Cluster
 
Galera 3.0 Webinar Slides: Galera Monitoring & Management
Severalnines
 
Galera explained 3
Marco Tusa
 
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Severalnines
 
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Corporation
 
Maria DB Galera Cluster for High Availability
OSSCube
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Continuent
 
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
 
Galera Cluster - Node Recovery - Webinar slides
Severalnines
 
Plny12 galera-cluster-best-practices
Dimas Prasetyo
 
MySQL Multi Master Replication
Moshe Kaplan
 
Introduction to Galera
Henrik Ingo
 
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Corporation
 
Master master vs master-slave database
Wipro
 
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Severalnines
 
Zero Downtime Schema Changes - Galera Cluster - Best Practices
Severalnines
 
合并到 XtraDB 存储引擎集群
YUCHENG HU
 

Similar to Galera webinar migration to galera cluster from my sql async replication (20)

PPTX
Migrating to XtraDB Cluster
percona2013
 
PPTX
Migrating to XtraDB Cluster
percona2013
 
PDF
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
MariaDB Corporation
 
PPTX
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Codership Oy - Creators of Galera Cluster
 
ODP
Do more with Galera Cluster in your OpenStack cloud
philip_stoev
 
PDF
[@NaukriEngineering] Introduction to Galera cluster
Naukri.com
 
PPT
Codership's galera cluster installation and quickstart webinar march 2016
Codership Oy - Creators of Galera Cluster
 
PPT
Codership's galera cluster installation and quickstart webinar march 2016
Sakari Keskitalo
 
PDF
M|18 Under the Hood: Galera Cluster
MariaDB plc
 
PDF
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
PDF
The MySQL High Availability Landscape and where Galera Cluster fits in
Sakari Keskitalo
 
PDF
MySQL Galera 集群
YUCHENG HU
 
PPTX
MariaDB Galera Cluster
Abdul Manaf
 
PDF
MariaDB Galera Cluster webinar — 2025 Edition.pdf
Sakari Keskitalo
 
PPTX
Introduction to XtraDB Cluster
yoku0825
 
PDF
OSDC 2016 - MySQL-Server in Teamwork - Replication and Galera Cluster by Jörg...
NETWAYS
 
PDF
Webinar Slides: Migrating to Galera Cluster
Severalnines
 
PDF
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Severalnines
 
PDF
What’s new in Galera 4
MariaDB plc
 
PPT
Galera cluster - SkySQL Paris Meetup 17.12.2013
MariaDB Corporation
 
Migrating to XtraDB Cluster
percona2013
 
Migrating to XtraDB Cluster
percona2013
 
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
MariaDB Corporation
 
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Codership Oy - Creators of Galera Cluster
 
Do more with Galera Cluster in your OpenStack cloud
philip_stoev
 
[@NaukriEngineering] Introduction to Galera cluster
Naukri.com
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership Oy - Creators of Galera Cluster
 
Codership's galera cluster installation and quickstart webinar march 2016
Sakari Keskitalo
 
M|18 Under the Hood: Galera Cluster
MariaDB plc
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
The MySQL High Availability Landscape and where Galera Cluster fits in
Sakari Keskitalo
 
MySQL Galera 集群
YUCHENG HU
 
MariaDB Galera Cluster
Abdul Manaf
 
MariaDB Galera Cluster webinar — 2025 Edition.pdf
Sakari Keskitalo
 
Introduction to XtraDB Cluster
yoku0825
 
OSDC 2016 - MySQL-Server in Teamwork - Replication and Galera Cluster by Jörg...
NETWAYS
 
Webinar Slides: Migrating to Galera Cluster
Severalnines
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Severalnines
 
What’s new in Galera 4
MariaDB plc
 
Galera cluster - SkySQL Paris Meetup 17.12.2013
MariaDB Corporation
 
Ad

Recently uploaded (20)

PDF
Dealing with JSON in the relational world
Andres Almiray
 
PPTX
EO4EU Ocean Monitoring: Maritime Weather Routing Optimsation Use Case
EO4EU
 
PDF
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
 
PPTX
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
PDF
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
PDF
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
PPTX
ManageIQ - Sprint 265 Review - Slide Deck
ManageIQ
 
PDF
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
PPTX
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Power BI vs Tableau vs Looker - Which BI Tool is Right for You?
MagnusMinds IT Solution LLP
 
PPTX
Mistakes to Avoid When Selecting Policy Management Software
Insurance Tech Services
 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PPTX
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Dealing with JSON in the relational world
Andres Almiray
 
EO4EU Ocean Monitoring: Maritime Weather Routing Optimsation Use Case
EO4EU
 
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
 
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
ManageIQ - Sprint 265 Review - Slide Deck
ManageIQ
 
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Power BI vs Tableau vs Looker - Which BI Tool is Right for You?
MagnusMinds IT Solution LLP
 
Mistakes to Avoid When Selecting Policy Management Software
Insurance Tech Services
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Ad

Galera webinar migration to galera cluster from my sql async replication

  • 1. Migrating from MySQL Replication to Galera Cluster Philip Stoev Codership Oy
  • 2. 2 Codership Established 2007 (Galera development started). Production version 2009 3 co-founder engineers: Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect Team have developed three MySQL cluster software earlier. Based on: http://www.dsn.jhu.edu/~yairamir/Yair_phd.pdf http://www.inf.usi.ch/faculty/pedone/Paper/199x/These-2090-Pedone.pdf Product: Galera Cluster for MySQL, open source Thousands of users in e-commerce, telecom, gaming, insurance, betting, healthcare, media, marketing, advertising, travel, universities, software-as-service, Paas, Iaas, etc Galera Cluster is included and will be included in Linux and OpenStack distros
  • 3. 3 Galera Cluster variants API MySQL Coderhips’s Galera Replication plugin API Percona Server API MariaDB merge merge Percona calls Galera Percona XtraDB Cluster Galera Cluster for MySQL by Codership MariaDB calls Galera MariaDB Galera Cluster or MariaDB Enterprise Cluster
  • 4. Agenda • A very quick overview of Galera Cluster • Compare asynchronous to synchronous replication • Demonstrate a migration with no downtime
  • 5. Galera Cluster Overview Synchronous – each transaction is immediately replicated on all nodes at commit – no stale slaves Multi-Master – read from and write to any node – automatic transaction conflict detection Replication – a copy of the entire dataset is available on all nodes – new nodes can join automatically For MySQL – based on a modified version of MySQL (5.5, 5.6 with 5.7 coming up) – InnoDB storage engine
  • 6. And more … • Recovers from node failures within seconds • Data consistency protections – avoids reading stale data – prevents unsafe data modifications • WAN support – nodes can be on different continents – end-to-end encryption – optimized communication with least latency
  • 7. Synchronous Replication Galera replication is synchronous • Replication happens at COMMIT time: – network delays can slow down the commit – but disk I/O can be avoided • Virtually no slave lag: – nodes can be behind only by a very small number of transactions – cluster will be throttled if a node falls behind – options are available for less strict operation
  • 8. Multi-Master Every Galera node can process any database update • Conflicts are detected at COMMIT time – application must be able to detect the error and retry whole transaction • Instant fail-over – no need for an external procedure to promote new master • Any load-balancer can be used – Codership provides GLB, which works at the TCP level – some language Connectors can do it internally
  • 9. Monitoring and Configuration • Entire Galera configuration is in my.cnf – CHANGE MASTER is not used – master.info, relay-log.info, etc. are not used • SHOW SLAVE STATUS is not used – SHOW STATUS LIKE ‘wsrep_%’ provides status information • Important status variables: – wsrep_cluster_status – wsrep_flow_control_paused
  • 10. Galera And The Binary Log • Galera uses row-based binary log events for replication – binlog_format=ROW is required – wsrep-forced-binlog-format=ROW can also be useful • But Galera does not use binary log files – log-bin is not necessary unless binlog files are needed for some other purpose, such as point-in-time backup – log-slave-updates ensures that all updates made on any node are reflected in the binlog files or all nodes – relay log is not used
  • 11. Adding New Nodes Galera takes care of the details: • No need to manually ship data files – Galera supports taking a non-blocking snapshot from existing node via XtraBackup • No need to manually track positions or perform replay – Galera will fetch and replay whatever data is required – node will not answer queries unless it is fully up to date
  • 12. Hybrid Operation • Galera Cluster can be a slave to traditional replication – all updates from the async master are replicated to all Galera nodes – very useful during migrations • Galera can be a master to async replication – so you can have special-purpose slaves (non-InnoDB, time-delayed, etc.) – log_slave_updates must be set
  • 13. Migration Procedure 1. Convert an existing async slave to Galera 2. Build up the cluster to the desired size 3. Switch readers to read from the cluster 4. Switch writers to write to the cluster 5. Deactivate the async replication altogether
  • 14. Setup • At start: • At end: node 1 node 2 node 3 writes reads async master async slave async slave Writes async master async slave reads
  • 15. Questions • Please use the Question/Chat box in the GoToWebinar panel