SlideShare uma empresa Scribd logo
1 de 28
Disaster Recovery
                    with MySQL and Tungsten
                                       Jeff Mace



©Continuent 2012.
Right now ...

              • your slaves are 2 hours behind the
                   master.

              • it takes 30 minutes to recover from a DB
                   failure.

              • you are running a network of sites from a
                   single datacenter.




©Continuent 2012                        2
You need to ...

              • reduce replication lag of your slaves.
              • automatically failover when a DB crashes.
              • host sites from many locations,
                   and have a copy of the data everywhere.




©Continuent 2012                     3
Where does lag come from?

                   www.example.com




©Continuent 2012                     4
Where does lag come from?

                   www.example.com




                   www.spacely.com




©Continuent 2012                     4
Where does lag come from?

                   www.example.com




                   www.spacely.com




                   www.widgets.com




©Continuent 2012                     4
Where does lag come from?

                   www.example.com




                   www.spacely.com




                   www.widgets.com




                   www.bigfoothunter.com


                     Large updates to one site can hold up
                             replication for others
©Continuent 2012                           4
Reducing replication lag

                   www.example.com




                   www.spacely.com




                   www.widgets.com




                   www.bigfoothunter.com


                   Tungsten can replicate each site in parallel

©Continuent 2012                           5
Best Practices

              • Use a separate schema for each site
              • Avoid updates that affect multiple
                   schemas

              • We recommend 10 parallel channels max
              • Manually create channel assignments for
                   each schema to balance the workload




©Continuent 2012                    6
Bi-directional HA




            Tungsten allows you to replicate in both directions

©Continuent 2012                   7
Bi-directional HA




            Tungsten allows you to replicate in both directions

©Continuent 2012                   8
Bi-directional HA




            Tungsten allows you to replicate in both directions

©Continuent 2012                   9
Best Practices

              • SET GLOBAL read_only=true;
              • REVOKE SUPER ON *.* FROM
                   ‘app_user’@‘host.example.com’;

              • Take your backups from the slave




©Continuent 2012                    10
What’s wrong with most failover

              • Recovery of the failed server is tedious
                   and requires careful analysis

              • Virtual IPs may go to the wrong server
                   even after being moved

              • Synchronous replication may reduce write
                   performance




©Continuent 2012                      11
Why connect to a database
          server ...




©Continuent 2012          12
... when you can connect to a
          cluster.




            Tungsten sends connections to the current master

©Continuent 2012                 13
Failover is hidden inside the
          cluster




                   Tungsten will automatically trigger a failover

©Continuent 2012                       14
Failover is hidden inside the
          cluster




                   and promote a new master.

©Continuent 2012             15
Failover is hidden inside the
          cluster




                   The failed server can be restored later

©Continuent 2012                    16
Planning for disaster recovery




                            NYC




                   London            Tokyo
©Continuent 2012             17
Planning for disaster recovery




                            NYC




                   London            Tokyo
©Continuent 2012             18
Planning for disaster recovery




                            NYC




                   London            Tokyo
©Continuent 2012             19
Planning for disaster recovery




                            NYC




                   London            Tokyo
©Continuent 2012             20
Build a global replication network




                            NYC




                   London            Tokyo
©Continuent 2012             21
Best Practices

              • Shard your data at the schema level
              • Limit writes to a single location per
                   schema

              • If that is not an option ...
                   •   Use auto_increment options to avoid key
                       conflicts

                   •   Enable ROW replication

                   •   https://docs.continuent.com/wiki/x/24Qk




©Continuent 2012                          22
Support

              • Per server or site-license based support
              • 24/7 coverage for replication failures
              • Includes -
                   •   Clustering

                   •   Advanced replication topologies

                   •   Heterogenous replication such as MySQL ->
                       Oracle or Oracle -> MySQL




©Continuent 2012                          23
We’re Hiring

              • Cluster Implementation Engineer
              • QA Engineer




©Continuent 2012                 24
Jeff Mace
jeff.mace@continuent.com
sales@continuent.com
560 S.Winchester Blvd. Suite 500 San Jose, CA 95128
Tel (866) 998-3642
Fax (408) 668-1009




                            http://www.continuent.com
                   http://code.google.com/p/tungsten-replicator
©Continuent 2012                              25

Mais conteúdo relacionado

Semelhante a Disaster Recovery with MySQL and Tungsten

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 ClustersContinuent
 
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...Continuent
 
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...The Linux Foundation
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionMichael Marth
 
MTBF / MTTR - Energized Work TekTalk, Mar 2012
MTBF / MTTR - Energized Work TekTalk, Mar 2012MTBF / MTTR - Energized Work TekTalk, Mar 2012
MTBF / MTTR - Energized Work TekTalk, Mar 2012Energized Work
 
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 clustersContinuent
 
Monitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightMonitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightC2B2 Consulting
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)Graeme_IBM
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance TuningChristian Posta
 
WillMicroserviceDie.pdf
WillMicroserviceDie.pdfWillMicroserviceDie.pdf
WillMicroserviceDie.pdfEmilyJiang23
 
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Fabrice Bernhard
 
Exploring Stretched Clusters
Exploring Stretched ClustersExploring Stretched Clusters
Exploring Stretched ClustersScott Lowe
 
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]Strangeloop
 
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Owen Mehegan
 
Use Case: Apollo Group at Oracle Open World
Use Case: Apollo Group at Oracle Open WorldUse Case: Apollo Group at Oracle Open World
Use Case: Apollo Group at Oracle Open WorldMongoDB
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
CodiLime Tech Talk - Wojciech Urbański: Cloud Native
CodiLime Tech Talk - Wojciech Urbański: Cloud NativeCodiLime Tech Talk - Wojciech Urbański: Cloud Native
CodiLime Tech Talk - Wojciech Urbański: Cloud NativeCodiLime
 
Flexible heterogenous replication
Flexible heterogenous replicationFlexible heterogenous replication
Flexible heterogenous replicationJeff Mace
 
Step by Step Mobile Optimization
Step by Step Mobile OptimizationStep by Step Mobile Optimization
Step by Step Mobile OptimizationGuy Podjarny
 

Semelhante a Disaster Recovery with MySQL and Tungsten (20)

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...
 
Scaling CQ5
Scaling CQ5Scaling CQ5
Scaling CQ5
 
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem Session
 
MTBF / MTTR - Energized Work TekTalk, Mar 2012
MTBF / MTTR - Energized Work TekTalk, Mar 2012MTBF / MTTR - Energized Work TekTalk, Mar 2012
MTBF / MTTR - Energized Work TekTalk, Mar 2012
 
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
 
Monitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring InsightMonitoring VMware vFabric with Hyperic and Spring Insight
Monitoring VMware vFabric with Hyperic and Spring Insight
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance Tuning
 
WillMicroserviceDie.pdf
WillMicroserviceDie.pdfWillMicroserviceDie.pdf
WillMicroserviceDie.pdf
 
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
 
Exploring Stretched Clusters
Exploring Stretched ClustersExploring Stretched Clusters
Exploring Stretched Clusters
 
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]
2012 Annual State of the Union for Mobile Ecommerce Performance [Velocity EU]
 
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
 
Use Case: Apollo Group at Oracle Open World
Use Case: Apollo Group at Oracle Open WorldUse Case: Apollo Group at Oracle Open World
Use Case: Apollo Group at Oracle Open World
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
CodiLime Tech Talk - Wojciech Urbański: Cloud Native
CodiLime Tech Talk - Wojciech Urbański: Cloud NativeCodiLime Tech Talk - Wojciech Urbański: Cloud Native
CodiLime Tech Talk - Wojciech Urbański: Cloud Native
 
Flexible heterogenous replication
Flexible heterogenous replicationFlexible heterogenous replication
Flexible heterogenous replication
 
Step by Step Mobile Optimization
Step by Step Mobile OptimizationStep by Step Mobile Optimization
Step by Step Mobile Optimization
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Disaster Recovery with MySQL and Tungsten

  • 1. Disaster Recovery with MySQL and Tungsten Jeff Mace ©Continuent 2012.
  • 2. Right now ... • your slaves are 2 hours behind the master. • it takes 30 minutes to recover from a DB failure. • you are running a network of sites from a single datacenter. ©Continuent 2012 2
  • 3. You need to ... • reduce replication lag of your slaves. • automatically failover when a DB crashes. • host sites from many locations, and have a copy of the data everywhere. ©Continuent 2012 3
  • 4. Where does lag come from? www.example.com ©Continuent 2012 4
  • 5. Where does lag come from? www.example.com www.spacely.com ©Continuent 2012 4
  • 6. Where does lag come from? www.example.com www.spacely.com www.widgets.com ©Continuent 2012 4
  • 7. Where does lag come from? www.example.com www.spacely.com www.widgets.com www.bigfoothunter.com Large updates to one site can hold up replication for others ©Continuent 2012 4
  • 8. Reducing replication lag www.example.com www.spacely.com www.widgets.com www.bigfoothunter.com Tungsten can replicate each site in parallel ©Continuent 2012 5
  • 9. Best Practices • Use a separate schema for each site • Avoid updates that affect multiple schemas • We recommend 10 parallel channels max • Manually create channel assignments for each schema to balance the workload ©Continuent 2012 6
  • 10. Bi-directional HA Tungsten allows you to replicate in both directions ©Continuent 2012 7
  • 11. Bi-directional HA Tungsten allows you to replicate in both directions ©Continuent 2012 8
  • 12. Bi-directional HA Tungsten allows you to replicate in both directions ©Continuent 2012 9
  • 13. Best Practices • SET GLOBAL read_only=true; • REVOKE SUPER ON *.* FROM ‘app_user’@‘host.example.com’; • Take your backups from the slave ©Continuent 2012 10
  • 14. What’s wrong with most failover • Recovery of the failed server is tedious and requires careful analysis • Virtual IPs may go to the wrong server even after being moved • Synchronous replication may reduce write performance ©Continuent 2012 11
  • 15. Why connect to a database server ... ©Continuent 2012 12
  • 16. ... when you can connect to a cluster. Tungsten sends connections to the current master ©Continuent 2012 13
  • 17. Failover is hidden inside the cluster Tungsten will automatically trigger a failover ©Continuent 2012 14
  • 18. Failover is hidden inside the cluster and promote a new master. ©Continuent 2012 15
  • 19. Failover is hidden inside the cluster The failed server can be restored later ©Continuent 2012 16
  • 20. Planning for disaster recovery NYC London Tokyo ©Continuent 2012 17
  • 21. Planning for disaster recovery NYC London Tokyo ©Continuent 2012 18
  • 22. Planning for disaster recovery NYC London Tokyo ©Continuent 2012 19
  • 23. Planning for disaster recovery NYC London Tokyo ©Continuent 2012 20
  • 24. Build a global replication network NYC London Tokyo ©Continuent 2012 21
  • 25. Best Practices • Shard your data at the schema level • Limit writes to a single location per schema • If that is not an option ... • Use auto_increment options to avoid key conflicts • Enable ROW replication • https://docs.continuent.com/wiki/x/24Qk ©Continuent 2012 22
  • 26. Support • Per server or site-license based support • 24/7 coverage for replication failures • Includes - • Clustering • Advanced replication topologies • Heterogenous replication such as MySQL -> Oracle or Oracle -> MySQL ©Continuent 2012 23
  • 27. We’re Hiring • Cluster Implementation Engineer • QA Engineer ©Continuent 2012 24
  • 28. Jeff Mace jeff.mace@continuent.com sales@continuent.com 560 S.Winchester Blvd. Suite 500 San Jose, CA 95128 Tel (866) 998-3642 Fax (408) 668-1009 http://www.continuent.com http://code.google.com/p/tungsten-replicator ©Continuent 2012 25

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n