SlideShare a Scribd company logo
1 of 25
Download to read offline
Tungsten University: 
                   Zero Downtime Maintenance
                          and Schema Upgrade
                                      Robert Hodges, CEO
                            Giuseppe Maxia, Director of QA


©Continuent 2013
Introducing Continuent

               •   The leading provider of clustering and
                   replication for open source DBMS

               •   Our Product: Continuent Tungsten
                   • Clustering - Commercial-grade HA, performance
                      scaling and data management for MySQL
                   • Replication - Flexible, high-performance data
                      movement




©Continuent 2013                          2
High Availability and System
                          Maintenance




©Continuent 2013                3
Maintenance and Upgrade Math

                   Uptime    Weekly Maintenance Window
                     95.2%             8 hours
                     97.6%             4 hours
                     98.8%             2 hours
                     99.4%              1 hour
                     99.8%            20 minutes
                    99.99%           1 minute (!!)

  True 4 9s availability: 53 minutes downtime per year

©Continuent 2013                    4
Tungsten Cluster Architecture
                       in 3 Minutes or Less




©Continuent 2013                 5
Overview of a Tungsten Cluster
                                     Application                         Application
                                 Tungsten Connector                  Tungsten Connector
        Monitoring and Control




                                                                                          Monitoring and Control
                                  Db2                     Db1                  Db3

                                 Manager                Manager               Manager
                                 Replicator             Replicator           Replicator

                                  Slave                Master                 Slave
                                                   Data Service: sjc
©Continuent 2013                                            6
Introduction to MySQL Maintenance:

             Change a my.cnf variable and restart




©Continuent 2013              7
Useful cctrl maintenance commands

               •   set policy automatic | manual | maintenance

               •   datasource <name> o!ine

               •   datasource <name> online

               •   datasource <name> shun

               •   datasource <name> welcome

               •   cluster online




©Continuent 2013                       8
Online Maintenance of a Slave

      Step 1
    Shun node
    and take                 1
    services
    o"ine
                                           Step 2
                                     2     Perform
      Step 3                               maintenance
    Welcome                                task(s)
    slave back to
                         3
    cluster



©Continuent 2013                 9
Online Maintenance of a Master

                                          Step 2
      Step 1                             Shun node
    Switch                               and take
    master to                    2       services
    slave             1                  o"ine

                                         Step 3
                                     3   Perform
     Phase 5                             maintenance
    Switch slave      5                  task(s)
    back to
    master
                                 4
                                          Step 4
                                         Welcome
                                         slave back

©Continuent 2013            10
Rolling Maintenance

          Slave 1      Slave 2-N            Switch      Master


• Shun slave 1,     • Repeat for        • Switch     • Shun old
 maintain,            additional          master       master,
 welcome back         slave(s)                         maintain,
 to cluster                                            welcome back
                                                       to cluster




©Continuent 2013                   11
Extended MySQL Maintenance:

                   Upgrading to a new MySQL version




©Continuent 2013                  12
Rolling MySQL Version Upgrade

  Slave Upgrade    Slave Upgrade            Switch    Final Upgrade


 1. Shun slave    1.Shun slave          1.Switch      1. Shun slave
2. Dump data     2. Upgrade              master      2. Upgrade
3. Upgrade          MySQL                               MySQL
   MySQL         3. Restore                          3. Restore
4. Restore data
5. Welcome slave
6. Backup




©Continuent 2013                   13
Backups and MySQL Version Upgrade

           •       Backup before upgrade to protect against
                   failure
                   /cluster	
  >	
  datasource	
  DB2	
  backup

           •       Backup after 1st upgrade to simplify further
                   upgrades
                   /cluster	
  >	
  datasource	
  DB2	
  backup

           • Restore after subsequent node upgrades
                   /cluster	
  >	
  datasource	
  DB3	
  restore


©Continuent 2013                           14
Schema Upgrade:

             Performing ALTER TABLE commands




©Continuent 2013            15
Tips and Tricks for Schema Upgrade

           • Use replication to do simple, non-blocking
                   changes

           •       Don’t log schema changes on slaves
                   mysql>	
  set	
  session	
  sql_log_bin=0;

           • Add schema rather than taking away




©Continuent 2013                         16
Rolling Schema Upgrade

  Slave Upgrade     Slave Upgrade            Switch   Final Upgrade


 1. Run backup     1.Shun/               1.Switch     1. Shun/
2. Shun slave       upgrade/              master       upgrade/
3. Run upgrade      welcome                            welcome
4. Discard and
   restore on
   failure
5. Welcome slave




©Continuent 2013                    17
Ways to Make Upgrade and
                    Maintenance Easy or at
                      Least Less Painful :)




©Continuent 2013              18
Secrets of Success #1: Testing

           •       Develop a procedure and follow it

           •       Automate as much as possible

           •       Run tests before going production

           •       Use production data and lots of it




©Continuent 2013                         19
Secrets of Success #2: Minimize Risk

           •       You can do zero-downtime upgrade without
                   stopping any apps

           •       But why take chances?

           •       Run upgrades at periods of low activity

           •       Shut down non-essential services

           •       Upgrade low-value applications "rst

           •       Upgrade slaves "rst



©Continuent 2013                         20
Secrets of Success #3: Application
           Design
           •       Avoid “generic” SQL statement that do not
                   specify columns

           •       Build schema upgrade into application
                   installation

                        Install base schema
                        Run upgrade script #1
                        Run upgrade script #2
                        ...
                        Application ready...


©Continuent 2013                        21
Secrets of Success #4: Be Prepared
           for Trouble




©Continuent 2013            22
Wrapping Up




©Continuent 2013        23
Tungsten University Sessions

           •       Zero-Downtime Maintenance and Schema
                   Operations
                   (March 21 and 26)

           •       Geographically Distributed Tungsten Clusters
                   (April 11 and 16)

           •       Replicate between MySQL and Oracle
                   (May 2 and 7)
                   Send any feedback to: tu@continuent.com



©Continuent 2013                        24
560 S. Winchester Blvd., Suite 500   Our Blogs:
San Jose, CA 95128                   http://scale-out-blog.blogspot.com
Tel +1 (866) 998-3642                http://datacharmer.org/blog
Fax +1 (408) 668-1009                http://www.continuent.com/news/blogs
e-mail: sales@continuent.com



                           Continuent Web Page:
                        http://www.continuent.com

                          Tungsten Replicator 2.0:
                http://code.google.com/p/tungsten-replicator

©Continuent 2012.

More Related Content

What's hot

My sql cluster_taipei_event
My sql cluster_taipei_eventMy sql cluster_taipei_event
My sql cluster_taipei_event
Ivan Tu
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
PerconaPerformance
 
Tackling the Management Challenges of Server Consolidation on Multi-core Systems
Tackling the Management Challenges of Server Consolidation on Multi-core SystemsTackling the Management Challenges of Server Consolidation on Multi-core Systems
Tackling the Management Challenges of Server Consolidation on Multi-core Systems
The Linux Foundation
 
Windows Server 2008 R2 Overview 1225768142880746 9
Windows Server 2008 R2 Overview 1225768142880746 9Windows Server 2008 R2 Overview 1225768142880746 9
Windows Server 2008 R2 Overview 1225768142880746 9
Stephan - Gabriel Georgescu
 
Synchronous Log Shipping Replication
Synchronous Log Shipping ReplicationSynchronous Log Shipping Replication
Synchronous Log Shipping Replication
elliando dias
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
Joseph D'Antoni
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
RapidValue
 

What's hot (20)

Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming ReplicationBuilding Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
 
My sql cluster_taipei_event
My sql cluster_taipei_eventMy sql cluster_taipei_event
My sql cluster_taipei_event
 
Sql Server High Availability & DR Technologies
Sql Server High Availability & DR TechnologiesSql Server High Availability & DR Technologies
Sql Server High Availability & DR Technologies
 
Brooklin Mirror Maker - How and why we moved away from Kafka Mirror Maker
Brooklin Mirror Maker - How and why we moved away from Kafka Mirror MakerBrooklin Mirror Maker - How and why we moved away from Kafka Mirror Maker
Brooklin Mirror Maker - How and why we moved away from Kafka Mirror Maker
 
Galera Multi Master Synchronous My S Q L Replication Clusters
Galera  Multi Master  Synchronous  My S Q L  Replication  ClustersGalera  Multi Master  Synchronous  My S Q L  Replication  Clusters
Galera Multi Master Synchronous My S Q L Replication Clusters
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with Tungsten
 
Tackling the Management Challenges of Server Consolidation on Multi-core Systems
Tackling the Management Challenges of Server Consolidation on Multi-core SystemsTackling the Management Challenges of Server Consolidation on Multi-core Systems
Tackling the Management Challenges of Server Consolidation on Multi-core Systems
 
VM Live Migration Speedup in Xen
VM Live Migration Speedup in XenVM Live Migration Speedup in Xen
VM Live Migration Speedup in Xen
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr nova
 
MariaDB High Availability
MariaDB High AvailabilityMariaDB High Availability
MariaDB High Availability
 
Netbackup 6.5 backup process
Netbackup 6.5 backup processNetbackup 6.5 backup process
Netbackup 6.5 backup process
 
Scheduler performance in manycore architecture
Scheduler performance in manycore architectureScheduler performance in manycore architecture
Scheduler performance in manycore architecture
 
Windows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaWindows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V Replica
 
Windows Server 2008 R2 Overview 1225768142880746 9
Windows Server 2008 R2 Overview 1225768142880746 9Windows Server 2008 R2 Overview 1225768142880746 9
Windows Server 2008 R2 Overview 1225768142880746 9
 
Synchronous Log Shipping Replication
Synchronous Log Shipping ReplicationSynchronous Log Shipping Replication
Synchronous Log Shipping Replication
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
 
Virtualizing the Next Generation of Server Workloads with AMD™
Virtualizing the Next Generation of Server Workloads with AMD™Virtualizing the Next Generation of Server Workloads with AMD™
Virtualizing the Next Generation of Server Workloads with AMD™
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
 

Viewers also liked

TAT ACE SBS Failure Root Cause Analysis
TAT ACE SBS Failure Root Cause AnalysisTAT ACE SBS Failure Root Cause Analysis
TAT ACE SBS Failure Root Cause Analysis
Narender Bisht
 

Viewers also liked (10)

WARNING - Maintainable Equipment in this Area
WARNING - Maintainable Equipment in this AreaWARNING - Maintainable Equipment in this Area
WARNING - Maintainable Equipment in this Area
 
Work Processing - Planning and Scheduling
Work Processing - Planning and SchedulingWork Processing - Planning and Scheduling
Work Processing - Planning and Scheduling
 
Pulling an Elephant
Pulling an ElephantPulling an Elephant
Pulling an Elephant
 
Maintenance PM inspection vs Operator PM inspection
Maintenance PM inspection vs Operator PM inspection Maintenance PM inspection vs Operator PM inspection
Maintenance PM inspection vs Operator PM inspection
 
Tool Box Talk - Resolving Hydraulic Leaks
Tool Box Talk - Resolving Hydraulic LeaksTool Box Talk - Resolving Hydraulic Leaks
Tool Box Talk - Resolving Hydraulic Leaks
 
PACE: Process and Critical Equipment Conference in Dubai, Sept 24-25
PACE: Process and Critical Equipment Conference in Dubai, Sept 24-25PACE: Process and Critical Equipment Conference in Dubai, Sept 24-25
PACE: Process and Critical Equipment Conference in Dubai, Sept 24-25
 
Elements Of Root Cause Analysis
Elements Of Root Cause AnalysisElements Of Root Cause Analysis
Elements Of Root Cause Analysis
 
TAT ACE SBS Failure Root Cause Analysis
TAT ACE SBS Failure Root Cause AnalysisTAT ACE SBS Failure Root Cause Analysis
TAT ACE SBS Failure Root Cause Analysis
 
KPI Users Group- Failure Reports, Session 2_Dec09 Ajc[1]
KPI Users Group-  Failure Reports, Session 2_Dec09 Ajc[1]KPI Users Group-  Failure Reports, Session 2_Dec09 Ajc[1]
KPI Users Group- Failure Reports, Session 2_Dec09 Ajc[1]
 
Gates Belts PM Manual
Gates Belts PM ManualGates Belts PM Manual
Gates Belts PM Manual
 

Similar to Tungsten University: Zero-Downtime Maintenance And Schema Operations

Set Up & Operate Tungsten Clusters
Set Up & Operate Tungsten ClustersSet Up & Operate Tungsten Clusters
Set Up & Operate Tungsten Clusters
Continuent
 
Tungsten University: Configure & Provision Tungsten Clusters
Tungsten University: Configure & Provision Tungsten ClustersTungsten University: Configure & Provision Tungsten Clusters
Tungsten University: Configure & Provision Tungsten Clusters
Continuent
 
Disaster Recovery with MySQL and Tungsten
Disaster Recovery with MySQL and TungstenDisaster Recovery with MySQL and Tungsten
Disaster Recovery with MySQL and Tungsten
Jeff Mace
 

Similar to Tungsten University: Zero-Downtime Maintenance And Schema Operations (20)

Tungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clustersTungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clusters
 
Tungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten ReplicatorsTungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten Replicators
 
Tungsten University: Geographically Distributed Multi-Master MySQL Clusters
Tungsten University: Geographically Distributed Multi-Master MySQL ClustersTungsten University: Geographically Distributed Multi-Master MySQL Clusters
Tungsten University: Geographically Distributed Multi-Master MySQL Clusters
 
Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...
Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...
Harnessing the Power of Master/Slave Clusters to Operate Data-Driven Business...
 
Set Up & Operate Tungsten Clusters
Set Up & Operate Tungsten ClustersSet Up & Operate Tungsten Clusters
Set Up & Operate Tungsten Clusters
 
Tungsten University: Setup & Operate Tungsten Replicator
Tungsten University: Setup & Operate Tungsten ReplicatorTungsten University: Setup & Operate Tungsten Replicator
Tungsten University: Setup & Operate Tungsten Replicator
 
Tungsten University: Configure & Provision Tungsten Clusters
Tungsten University: Configure & Provision Tungsten ClustersTungsten University: Configure & Provision Tungsten Clusters
Tungsten University: Configure & Provision Tungsten Clusters
 
02 2017 emea_roadshow_milan_ha
02 2017 emea_roadshow_milan_ha02 2017 emea_roadshow_milan_ha
02 2017 emea_roadshow_milan_ha
 
Upgrade Kubernetes the boring way
Upgrade Kubernetes the boring wayUpgrade Kubernetes the boring way
Upgrade Kubernetes the boring way
 
Tungsten University: Introduction to Continuent Tungsten 2.0
Tungsten University: Introduction to Continuent Tungsten 2.0Tungsten University: Introduction to Continuent Tungsten 2.0
Tungsten University: Introduction to Continuent Tungsten 2.0
 
Java Middleware Surgery
Java Middleware Surgery Java Middleware Surgery
Java Middleware Surgery
 
Disaster Recovery with MySQL and Tungsten
Disaster Recovery with MySQL and TungstenDisaster Recovery with MySQL and Tungsten
Disaster Recovery with MySQL and Tungsten
 
How We Made Scylla Maintenance Easier, Safer and Faster
How We Made Scylla Maintenance Easier, Safer and FasterHow We Made Scylla Maintenance Easier, Safer and Faster
How We Made Scylla Maintenance Easier, Safer and Faster
 
Set Up & Operate Tungsten Replicator
Set Up & Operate Tungsten ReplicatorSet Up & Operate Tungsten Replicator
Set Up & Operate Tungsten Replicator
 
Tungsten University: Unleashing the Power of Tungsten Connectors
Tungsten University: Unleashing the Power of Tungsten ConnectorsTungsten University: Unleashing the Power of Tungsten Connectors
Tungsten University: Unleashing the Power of Tungsten Connectors
 
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
 
Setup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorSetup & Operate Tungsten Replicator
Setup & Operate Tungsten Replicator
 
Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman
Nagios Conference 2012 - Jason Cook - Nagios and Mod-GearmanNagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman
Nagios Conference 2012 - Jason Cook - Nagios and Mod-Gearman
 
On-Demand Image Resizing Extended - External Meet-up
On-Demand Image Resizing Extended - External Meet-upOn-Demand Image Resizing Extended - External Meet-up
On-Demand Image Resizing Extended - External Meet-up
 
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
 

More from Continuent

Continuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition WebinarContinuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition Webinar
Continuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Continuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Continuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Continuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Continuent
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Continuent
 
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Continuent
 
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Continuent
 

More from Continuent (20)

Tungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and BeyondTungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and Beyond
 
Continuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition WebinarContinuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition Webinar
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS AuroraWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
 
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
 
Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent FailoverWebinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
 
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
 
Training Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten DashboardTraining Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten Dashboard
 
Training Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & KafkaTraining Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & Kafka
 
Training Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data WarehousesTraining Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data Warehouses
 
Training Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a ClusterTraining Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a Cluster
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMI
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMI
 
Training Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a ProTraining Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a Pro
 
Training Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & TroubleshootingTraining Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & Troubleshooting
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSL
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Tungsten University: Zero-Downtime Maintenance And Schema Operations

  • 1. Tungsten University:  Zero Downtime Maintenance and Schema Upgrade Robert Hodges, CEO Giuseppe Maxia, Director of QA ©Continuent 2013
  • 2. Introducing Continuent • The leading provider of clustering and replication for open source DBMS • Our Product: Continuent Tungsten • Clustering - Commercial-grade HA, performance scaling and data management for MySQL • Replication - Flexible, high-performance data movement ©Continuent 2013 2
  • 3. High Availability and System Maintenance ©Continuent 2013 3
  • 4. Maintenance and Upgrade Math Uptime Weekly Maintenance Window 95.2% 8 hours 97.6% 4 hours 98.8% 2 hours 99.4% 1 hour 99.8% 20 minutes 99.99% 1 minute (!!) True 4 9s availability: 53 minutes downtime per year ©Continuent 2013 4
  • 5. Tungsten Cluster Architecture in 3 Minutes or Less ©Continuent 2013 5
  • 6. Overview of a Tungsten Cluster Application Application Tungsten Connector Tungsten Connector Monitoring and Control Monitoring and Control Db2 Db1 Db3 Manager Manager Manager Replicator Replicator Replicator Slave Master Slave Data Service: sjc ©Continuent 2013 6
  • 7. Introduction to MySQL Maintenance: Change a my.cnf variable and restart ©Continuent 2013 7
  • 8. Useful cctrl maintenance commands • set policy automatic | manual | maintenance • datasource <name> o!ine • datasource <name> online • datasource <name> shun • datasource <name> welcome • cluster online ©Continuent 2013 8
  • 9. Online Maintenance of a Slave Step 1 Shun node and take 1 services o"ine Step 2 2 Perform Step 3 maintenance Welcome task(s) slave back to 3 cluster ©Continuent 2013 9
  • 10. Online Maintenance of a Master Step 2 Step 1 Shun node Switch and take master to 2 services slave 1 o"ine Step 3 3 Perform Phase 5 maintenance Switch slave 5 task(s) back to master 4 Step 4 Welcome slave back ©Continuent 2013 10
  • 11. Rolling Maintenance Slave 1 Slave 2-N Switch Master • Shun slave 1, • Repeat for • Switch • Shun old maintain, additional master master, welcome back slave(s) maintain, to cluster welcome back to cluster ©Continuent 2013 11
  • 12. Extended MySQL Maintenance: Upgrading to a new MySQL version ©Continuent 2013 12
  • 13. Rolling MySQL Version Upgrade Slave Upgrade Slave Upgrade Switch Final Upgrade 1. Shun slave 1.Shun slave 1.Switch 1. Shun slave 2. Dump data 2. Upgrade master 2. Upgrade 3. Upgrade MySQL MySQL MySQL 3. Restore 3. Restore 4. Restore data 5. Welcome slave 6. Backup ©Continuent 2013 13
  • 14. Backups and MySQL Version Upgrade • Backup before upgrade to protect against failure /cluster  >  datasource  DB2  backup • Backup after 1st upgrade to simplify further upgrades /cluster  >  datasource  DB2  backup • Restore after subsequent node upgrades /cluster  >  datasource  DB3  restore ©Continuent 2013 14
  • 15. Schema Upgrade: Performing ALTER TABLE commands ©Continuent 2013 15
  • 16. Tips and Tricks for Schema Upgrade • Use replication to do simple, non-blocking changes • Don’t log schema changes on slaves mysql>  set  session  sql_log_bin=0; • Add schema rather than taking away ©Continuent 2013 16
  • 17. Rolling Schema Upgrade Slave Upgrade Slave Upgrade Switch Final Upgrade 1. Run backup 1.Shun/ 1.Switch 1. Shun/ 2. Shun slave upgrade/ master upgrade/ 3. Run upgrade welcome welcome 4. Discard and restore on failure 5. Welcome slave ©Continuent 2013 17
  • 18. Ways to Make Upgrade and Maintenance Easy or at Least Less Painful :) ©Continuent 2013 18
  • 19. Secrets of Success #1: Testing • Develop a procedure and follow it • Automate as much as possible • Run tests before going production • Use production data and lots of it ©Continuent 2013 19
  • 20. Secrets of Success #2: Minimize Risk • You can do zero-downtime upgrade without stopping any apps • But why take chances? • Run upgrades at periods of low activity • Shut down non-essential services • Upgrade low-value applications "rst • Upgrade slaves "rst ©Continuent 2013 20
  • 21. Secrets of Success #3: Application Design • Avoid “generic” SQL statement that do not specify columns • Build schema upgrade into application installation Install base schema Run upgrade script #1 Run upgrade script #2 ... Application ready... ©Continuent 2013 21
  • 22. Secrets of Success #4: Be Prepared for Trouble ©Continuent 2013 22
  • 24. Tungsten University Sessions • Zero-Downtime Maintenance and Schema Operations (March 21 and 26) • Geographically Distributed Tungsten Clusters (April 11 and 16) • Replicate between MySQL and Oracle (May 2 and 7) Send any feedback to: tu@continuent.com ©Continuent 2013 24
  • 25. 560 S. Winchester Blvd., Suite 500 Our Blogs: San Jose, CA 95128 http://scale-out-blog.blogspot.com Tel +1 (866) 998-3642 http://datacharmer.org/blog Fax +1 (408) 668-1009 http://www.continuent.com/news/blogs e-mail: sales@continuent.com Continuent Web Page: http://www.continuent.com Tungsten Replicator 2.0: http://code.google.com/p/tungsten-replicator ©Continuent 2012.