SlideShare a Scribd company logo
Various MySQL
High Availability (HA) Solutions

Percona Live MySQL Conference,
 London, Oct 24th and 25th, 2011

           Oli Sennhauser
    Senior MySQL Consultant at FromDual GmbH

      oli.sennhauser@fromdual.com
                 www.fromdual.com              1
About FromDual GmbH (LLC)
●   FromDual provides neutral and independent:
    ●  Consulting for MySQL (on-site and remote)
     ● Remote-DBA Services / MySQL Operations


     ● Premium Support (ex. MySQL Basic and Silver)


     ● Training for MySQL


●   Consulting partner of the Open Database Alliance
    (ODBA.org)
●   Oracle Silver Partner (OPN)
●   More information you can find at:
                 http://www.fromdual.com
                        www.fromdual.com               2
Contents

    Various MySQL High Availability (HA) Solu-
    tions
    ➢
        MySQL Replication / MySQL Scale-Out
    ➢
        High-Availability with Replication
    ➢
        Master-Master Replication
    ➢
        Active/passive fail-over with SAN
    ➢
        Active/passive fail-over with DRBD
    ➢
        Galera (synchronous) Replication
    ➢
        MySQL Cluster
    ➢
        Tungsten Replicator




                            www.fromdual.com     3
MySQL Scale-Out vs Scale-Up

         ● Costs
                              Scale-Up
         ● MySQL Design

         ● Physical bottlenecks




     ●   „Relaxation of Constraints“
                                Scale-Out

                         www.fromdual.com   4
High-Availability with Replication
                                 Application
                    read only
                                     VIP     rtw

                                                              Slave Reporting
              Slave M               Master
                                                   async!
                                                                  Slave Backup

          Slave 1         Slave 2          Slave 3
                                                            ...


                       Load balancer


●   Fail-over?
                                www.fromdual.com                                 5
Replication fail-over
                             Application
                read only
                                 VIP     rtw

                                                          Slave Reporting
          Slave M               Master
                                               async!
                                                              Slave Backup

      Slave 1         Slave 2          Slave 3
                                                        ...


                   Load balancer




                            www.fromdual.com                                 6
Advantages / Disadvantages
 Simple „standard“ Set-up
 Master is a SpoF! (Single Point of Failure)
 If master fails → which Slave becomes new master?
   Switch → a lot of work, delicate!
   There are tools to help (MMM v1/v2, MHA, Tungsten, ...)
 Fail-over Site is already warm/hot!
 Works very well if r >> w
 Data inconsistencies (mk-table-check/sync)
 Delay Master/Slave
 Slave lagging (Slave as bottleneck)

                         www.fromdual.com                    7
Master-Master Replikation
                  App        App          App



                             VIP




                        M1           M2



         Slave1   Slave2      Slave3       SlaveBackup

                  Load balancer (LB)



                  www.fromdual.com                       8
Master-Master Replication
                  App        App          App



                             VIP




                        M1           M2



         Slave1   Slave2      Slave3       SlaveBackup

                  Load balancer (LB)



                  www.fromdual.com                       9
Advantages / Disadvantages
Only slightly more complex than Master/Slave
Careful when writing on both Masters!
For a “balanced” system at least 2 Slaves are needed
You will NOT get more I/O throughput!
Data in-consitency possible because of asynchronous replication
Fail-over Site is already warm/hot!
Works very well if r >> w
Data inconsistencies (mk-table-check/sync)
If Master fails, half of the Slave are out of sync!
A little more complicated to (re-)set-up
Delay Master/Slave
Slave lagging (Slave as bottleneck)
                             www.fromdual.com                     10
Active/passive fail-over with SAN
              App       App            App



                               VIP


                          M'             M


                               SAN



         Slave1          Slave2              Slave3

                  Load balancing (LB)

                    www.fromdual.com                  11
Active/passive fail-over with SAN
●   SPOF!        App       App            App



                                  VIP


                             M'             M


                            !!!   SAN



            Slave1          Slave2              Slave3

                     Load balancing (LB)

                       www.fromdual.com                  12
Advantages / Disadvantages
    Synchronous replication
●   I/O throughput depends on SAN (I/O system)
    No data IN-consistencies possible
    SAN is a SpoF!
    Expensive if SAN is not available yet.
    SAN's are not easy to handle!
    Fail-over Site is still cold!
    Half of the hardware is idling
    Only one possible Data source
    Slaves are automatically and properly fail-overed
    Far more complex to set-up
                                www.fromdual.com        13
Active/passive fail-over with
DRBD
                  App       App            App



                                   VIP


                              M'             M


  “Poor man's SAN”                 DRBD



             Slave1          Slave2              Slave3

                      Load balancing (LB)

                        www.fromdual.com                  14
Active/passive fail-over with
DRBD
              App       App            App



                               VIP


                          M'             M


                               DRBD



         Slave1          Slave2              Slave3

                  Load balancing (LB)

                    www.fromdual.com                  15
Advantages / Disadvantages
 Synchronous replication
 No data IN-consistencies possible
 I/O throughput lower
 Slaves are automatically and properly fail-
 overed
 Fail-over Site is still cold!
 Half of the hardware is idling
 Only one possible Data source
 Far more complex to set-up
                      www.fromdual.com         16
Galera (synchronous) Replication


           App         App            App



             Load balancing (LB)



          Node 1     Node 2      Node 3
           wsrep       wsrep          wsrep
              Galera replication




                   www.fromdual.com           17
Galera (synchronous) Replication


           App         App            App



             Load balancing (LB)



          Node 1     Node 2      Node 3
           wsrep       wsrep          wsrep
              Galera replication




                   www.fromdual.com           18
Advantages / Disadvantages
Synchronous replication
Based on InnoDB SE (other SE theoretically possible)
Active-active real multi-master topology
Read and write to any cluster node
Automatic membership control
True parallel replication, on row level
No slave lag
No lost transactions
Read AND write scalability (Read Scale-Out!)
Patch off MySQL binaries (Codership provides binaries)
Be aware of Hot Spots on rows
Higher probability of dead locks
Full sync blocks for writing → 3 nodes
Initial sync for very big databases (>>50 Gbyte) with mysqldump
                                   www.fromdual.com               19
MySQL Cluster
                               App          App            App



                                   Load balancing (LB)



 SQL nodes                MySQL            MySQL                MySQL
                          Server           Server               Server


      MGM client                                                         MGM client
                                       NDB Cluster
                                          (Data nodes)

                                   ndbd                  ndbd
         mgmd                                                              mgmd

                                   ndbd                  ndbd
Data nodes / Mgmt nodes


                                     www.fromdual.com                                 20
Advantages / Disadvantages
 Synchronous replication
 No data IN-consistencies possible
 Extremely high throughput (if done correctly)
 Good for read AND write
 New beast to tame (MySQL Cluster != MySQL!)
 More complex to set-up and operate than normal MySQL
 Not for disaster fail-over (<= 7.1)
 Bad for complex queries (Joins, <= 7.1)
 At least 3 machines (better 4) are need.
 High demand on RAM and Network
 Only one possible Data source
                           www.fromdual.com             21
Tungsten Replicator




             www.fromdual.com   22
Advantages / Disadvantages
●   Similar to MySQL Replication
    Introduces Global Transaction-ID
    Asynchronous Replication
    Bases on MySQL Binary Log
    For: MySQL, PostgreSQL, Oracle and Drizzle
    Requires Java and Ruby?
    Multi Source Replication
    Failover should be easier to handle

                      www.fromdual.com           23
Questions ?

Discussion ?




  www.fromdual.com   24

More Related Content

Similar to Percona Live: Various MySQL High Availability (HA) Solutions

Drupal Con My Sql Ha 2008 08 29
Drupal Con My Sql Ha 2008 08 29Drupal Con My Sql Ha 2008 08 29
Drupal Con My Sql Ha 2008 08 29liufabin 66688
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
bobmcwhirter
 
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overviewHigh Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
Marco Amado
 
My sql replication advanced techniques presentation
My sql replication advanced techniques presentationMy sql replication advanced techniques presentation
My sql replication advanced techniques presentationepee
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
Giuseppe Maxia
 
Mysql talk
Mysql talkMysql talk
Mysql talk
LogicMonitor
 
SAP Virtualization Week 2012 - The Lego Cloud
SAP Virtualization Week 2012 - The Lego CloudSAP Virtualization Week 2012 - The Lego Cloud
SAP Virtualization Week 2012 - The Lego Cloudaidanshribman
 
Cassandra Anti-Patterns
Cassandra Anti-PatternsCassandra Anti-Patterns
Cassandra Anti-Patterns
Matthew Dennis
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningFromDual GmbH
 
SLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System zSLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System z
IBM India Smarter Computing
 
Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)
Henrik Ingo
 
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
Amazon Web Services
 
Rails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & ToolsRails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & Toolsguest05c09d
 
Behind the Scenes at LiveJournal: Scaling Storytime
Behind the Scenes at LiveJournal: Scaling StorytimeBehind the Scenes at LiveJournal: Scaling Storytime
Behind the Scenes at LiveJournal: Scaling Storytime
SergeyChernyshev
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
IndicThreads
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQL
Denish Patel
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy ArchitecturesPerconaPerformance
 
Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffy
Anuradha
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Arun Gupta
 
Disaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High AvailabilityDisaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High Availability
Open Networking Summit
 

Similar to Percona Live: Various MySQL High Availability (HA) Solutions (20)

Drupal Con My Sql Ha 2008 08 29
Drupal Con My Sql Ha 2008 08 29Drupal Con My Sql Ha 2008 08 29
Drupal Con My Sql Ha 2008 08 29
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overviewHigh Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
 
My sql replication advanced techniques presentation
My sql replication advanced techniques presentationMy sql replication advanced techniques presentation
My sql replication advanced techniques presentation
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
 
Mysql talk
Mysql talkMysql talk
Mysql talk
 
SAP Virtualization Week 2012 - The Lego Cloud
SAP Virtualization Week 2012 - The Lego CloudSAP Virtualization Week 2012 - The Lego Cloud
SAP Virtualization Week 2012 - The Lego Cloud
 
Cassandra Anti-Patterns
Cassandra Anti-PatternsCassandra Anti-Patterns
Cassandra Anti-Patterns
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL Tuning
 
SLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System zSLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System z
 
Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)Using and Benchmarking Galera in different architectures (PLUK 2012)
Using and Benchmarking Galera in different architectures (PLUK 2012)
 
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
CPN208 Failures at Scale & How to Ride Through Them - AWS re: Invent 2012
 
Rails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & ToolsRails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & Tools
 
Behind the Scenes at LiveJournal: Scaling Storytime
Behind the Scenes at LiveJournal: Scaling StorytimeBehind the Scenes at LiveJournal: Scaling Storytime
Behind the Scenes at LiveJournal: Scaling Storytime
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQL
 
Database Performance With Proxy Architectures
Database  Performance With  Proxy  ArchitecturesDatabase  Performance With  Proxy  Architectures
Database Performance With Proxy Architectures
 
Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffy
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Disaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High AvailabilityDisaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High Availability
 

More from FromDual GmbH

MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
FromDual GmbH
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
FromDual GmbH
 
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
FromDual GmbH
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
FromDual GmbH
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
FromDual GmbH
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schema
FromDual GmbH
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
FromDual GmbH
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
FromDual GmbH
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
FromDual GmbH
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
FromDual GmbH
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
FromDual GmbH
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
FromDual GmbH
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
FromDual GmbH
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
FromDual GmbH
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
FromDual GmbH
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
FromDual GmbH
 
Reading MySQL fingerprints
Reading MySQL fingerprintsReading MySQL fingerprints
Reading MySQL fingerprints
FromDual GmbH
 
High-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLHigh-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQL
FromDual GmbH
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
FromDual GmbH
 

More from FromDual GmbH (20)

MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
 
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schema
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
 
Reading MySQL fingerprints
Reading MySQL fingerprintsReading MySQL fingerprints
Reading MySQL fingerprints
 
High-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLHigh-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQL
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
 

Recently uploaded

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Percona Live: Various MySQL High Availability (HA) Solutions

  • 1. Various MySQL High Availability (HA) Solutions Percona Live MySQL Conference, London, Oct 24th and 25th, 2011 Oli Sennhauser Senior MySQL Consultant at FromDual GmbH oli.sennhauser@fromdual.com www.fromdual.com 1
  • 2. About FromDual GmbH (LLC) ● FromDual provides neutral and independent: ● Consulting for MySQL (on-site and remote) ● Remote-DBA Services / MySQL Operations ● Premium Support (ex. MySQL Basic and Silver) ● Training for MySQL ● Consulting partner of the Open Database Alliance (ODBA.org) ● Oracle Silver Partner (OPN) ● More information you can find at: http://www.fromdual.com www.fromdual.com 2
  • 3. Contents Various MySQL High Availability (HA) Solu- tions ➢ MySQL Replication / MySQL Scale-Out ➢ High-Availability with Replication ➢ Master-Master Replication ➢ Active/passive fail-over with SAN ➢ Active/passive fail-over with DRBD ➢ Galera (synchronous) Replication ➢ MySQL Cluster ➢ Tungsten Replicator www.fromdual.com 3
  • 4. MySQL Scale-Out vs Scale-Up ● Costs Scale-Up ● MySQL Design ● Physical bottlenecks ● „Relaxation of Constraints“ Scale-Out www.fromdual.com 4
  • 5. High-Availability with Replication Application read only VIP rtw Slave Reporting Slave M Master async! Slave Backup Slave 1 Slave 2 Slave 3 ... Load balancer ● Fail-over? www.fromdual.com 5
  • 6. Replication fail-over Application read only VIP rtw Slave Reporting Slave M Master async! Slave Backup Slave 1 Slave 2 Slave 3 ... Load balancer www.fromdual.com 6
  • 7. Advantages / Disadvantages Simple „standard“ Set-up Master is a SpoF! (Single Point of Failure) If master fails → which Slave becomes new master? Switch → a lot of work, delicate! There are tools to help (MMM v1/v2, MHA, Tungsten, ...) Fail-over Site is already warm/hot! Works very well if r >> w Data inconsistencies (mk-table-check/sync) Delay Master/Slave Slave lagging (Slave as bottleneck) www.fromdual.com 7
  • 8. Master-Master Replikation App App App VIP M1 M2 Slave1 Slave2 Slave3 SlaveBackup Load balancer (LB) www.fromdual.com 8
  • 9. Master-Master Replication App App App VIP M1 M2 Slave1 Slave2 Slave3 SlaveBackup Load balancer (LB) www.fromdual.com 9
  • 10. Advantages / Disadvantages Only slightly more complex than Master/Slave Careful when writing on both Masters! For a “balanced” system at least 2 Slaves are needed You will NOT get more I/O throughput! Data in-consitency possible because of asynchronous replication Fail-over Site is already warm/hot! Works very well if r >> w Data inconsistencies (mk-table-check/sync) If Master fails, half of the Slave are out of sync! A little more complicated to (re-)set-up Delay Master/Slave Slave lagging (Slave as bottleneck) www.fromdual.com 10
  • 11. Active/passive fail-over with SAN App App App VIP M' M SAN Slave1 Slave2 Slave3 Load balancing (LB) www.fromdual.com 11
  • 12. Active/passive fail-over with SAN ● SPOF! App App App VIP M' M !!! SAN Slave1 Slave2 Slave3 Load balancing (LB) www.fromdual.com 12
  • 13. Advantages / Disadvantages Synchronous replication ● I/O throughput depends on SAN (I/O system) No data IN-consistencies possible SAN is a SpoF! Expensive if SAN is not available yet. SAN's are not easy to handle! Fail-over Site is still cold! Half of the hardware is idling Only one possible Data source Slaves are automatically and properly fail-overed Far more complex to set-up www.fromdual.com 13
  • 14. Active/passive fail-over with DRBD App App App VIP M' M “Poor man's SAN” DRBD Slave1 Slave2 Slave3 Load balancing (LB) www.fromdual.com 14
  • 15. Active/passive fail-over with DRBD App App App VIP M' M DRBD Slave1 Slave2 Slave3 Load balancing (LB) www.fromdual.com 15
  • 16. Advantages / Disadvantages Synchronous replication No data IN-consistencies possible I/O throughput lower Slaves are automatically and properly fail- overed Fail-over Site is still cold! Half of the hardware is idling Only one possible Data source Far more complex to set-up www.fromdual.com 16
  • 17. Galera (synchronous) Replication App App App Load balancing (LB) Node 1 Node 2 Node 3 wsrep wsrep wsrep Galera replication www.fromdual.com 17
  • 18. Galera (synchronous) Replication App App App Load balancing (LB) Node 1 Node 2 Node 3 wsrep wsrep wsrep Galera replication www.fromdual.com 18
  • 19. Advantages / Disadvantages Synchronous replication Based on InnoDB SE (other SE theoretically possible) Active-active real multi-master topology Read and write to any cluster node Automatic membership control True parallel replication, on row level No slave lag No lost transactions Read AND write scalability (Read Scale-Out!) Patch off MySQL binaries (Codership provides binaries) Be aware of Hot Spots on rows Higher probability of dead locks Full sync blocks for writing → 3 nodes Initial sync for very big databases (>>50 Gbyte) with mysqldump www.fromdual.com 19
  • 20. MySQL Cluster App App App Load balancing (LB) SQL nodes MySQL MySQL MySQL Server Server Server MGM client MGM client NDB Cluster (Data nodes) ndbd ndbd mgmd mgmd ndbd ndbd Data nodes / Mgmt nodes www.fromdual.com 20
  • 21. Advantages / Disadvantages Synchronous replication No data IN-consistencies possible Extremely high throughput (if done correctly) Good for read AND write New beast to tame (MySQL Cluster != MySQL!) More complex to set-up and operate than normal MySQL Not for disaster fail-over (<= 7.1) Bad for complex queries (Joins, <= 7.1) At least 3 machines (better 4) are need. High demand on RAM and Network Only one possible Data source www.fromdual.com 21
  • 22. Tungsten Replicator www.fromdual.com 22
  • 23. Advantages / Disadvantages ● Similar to MySQL Replication Introduces Global Transaction-ID Asynchronous Replication Bases on MySQL Binary Log For: MySQL, PostgreSQL, Oracle and Drizzle Requires Java and Ruby? Multi Source Replication Failover should be easier to handle www.fromdual.com 23
  • 24. Questions ? Discussion ? www.fromdual.com 24