SlideShare a Scribd company logo
1 of 24
Repair and Recovery for your
MySQL, MariaDB and MongoDB/
TokuMX clusters
January 2013

Johan Andersson
Severalnines AB
johan@severalnines.com
Mobile +46 73 073 60 99
Copyright 2014 Severalnines AB

Agenda
!  Redundancy models for Galera, NDB and MongoDB/
TokuMX
!  Failover & Recovery (Automatic vs Manual)
!  Zooming into Galera recovery procedures
!  Split brains in multi-datacenter setups

2
Copyright 2014 Severalnines AB

Redundancy models for Galera, NDB
and MongoDB/TokuMX
!  Database Clustering can be divided in two areas
!  Asynchronously replicated data
!  MySQL Replication
!  TokuMX/MongoDB
!  Synchronously replicated data
!  Galera for MySQL
!  NDB Cluster (aka MySQL Cluster)

3
Copyright 2014 Severalnines AB

Asynchronous

1

2
3
Copyright 2014 Severalnines AB

Asynchronous
Pros

Cons

!  Read scaling is easy

!  Master handles all writes
!  Read write splitting

!  Lower write latency

!  Automated failover is hard:
!  Elect a new master
!  Slave lag & Data loss
!  Has everything been sent
to the slave when the
master crashes?
!  Has the slave applied all
data?

5
Copyright 2014 Severalnines AB

Synchronous

1

4
2
3
Copyright 2014 Severalnines AB

Synchronous
Pros

Cons

!  All servers are masters

!  Higher write latency

!  Application can read and
write on any server

!  Sensitive to link latency

!  No data loss

!  Network partitioning

!  Simple failover for apps

7
Copyright 2014 Severalnines AB

Redundancy Models
TokuMX/MongoDB ReplicaSet (1/2)
!  Up to 12 members
!  Max 7 voting numbers
!  Primary, Secondary, Arbiter
!  Slave Delay
!  Chaining Allowed
!  Heartbeats every 2 seconds
!  5 missed heartbeats: node dead

Primary

Secondary

Arbiter
8
Copyright 2014 Severalnines AB

Redundancy Models
TokuMX/MongoDB ReplicaSet (2/2)
!  Automatic failover
!  Priority (between 0 and 100.0)
!  Primary has highest priority
!  Influences election of new primary

Data Center 1

Primary

Secondary

Data Center 2

Secondary

9
Copyright 2014 Severalnines AB

Redundancy Models
TokuMX/MongoDB Sharded Cluster

!  Built-in support for sharding
!  Min 2 Query Routers

!  3 Config Servers

Primary Secondary

Arbiter

Primary Secondary

Arbiter
10
Copyright 2014 Severalnines AB

Redundancy Models
MySQL Replication
!  No hard limits on no. of slaves
!  Replication chaining
!  Delayed slave
!  Manual failover
Slave
Master

Slave

11
Copyright 2014 Severalnines AB

Redundancy Models
MySQL Cluster
!  In-built sharding
!  Separate SQL and Data layers
!  Up to 4 replicas/node group
!  Max 48 data nodes
!  Auto-failover

Node Group 1

Node Group 2
12
Copyright 2014 Severalnines AB

Redundancy Models
Galera Cluster
!  Synchronous replication plugin

!  All masters have same dataset
!  Slowest node determines
speed of cluster
!  No hard limits on no. of nodes
!  Auto-failover
!  Galera arbitrator (garbd)

Master

Master

Master
13
Copyright 2014 Severalnines AB

Synchronous Replication
Linear Two-phase commit
!  Used by NDB data nodes
!  Pessimistic locking
!  Works well for cases
with update
contention

1

4
6

3
2
5
1. Prepare transaction
4. commit
14
Copyright 2014 Severalnines AB

Synchronous Replication
Certificate-based
!  Used by Galera/WSREP
!  Optimistic locking
!  Not optimal for cases
with conflicting
updates

1
2
3
4
1. begin transaction
2. commit
15
Copyright 204Severalnines AB

Zooming into Galera recovery
procedures
By Seppo Jaakola @ Codership

16
Copyright 2014 Severalnines AB

Split-brain
!  Network partitioning (aka) split brain. N nodes divided
into M equal parts

Galera Servers - SYNCED
DC1

WAN

Galera Servers - SYNCED
DC2
17
Copyright 2014 Severalnines AB

Split-brain
!  WAN breaks - 2 equal splits (Network partitioning)
!  Non-Primary – cannot handle transactions

Galera – Non-Primary
DC1

WAN

Galera – Non-Primary
DC2
18
Copyright 2014 Severalnines AB

Split-brain prevention
!  Solution: The side with the majority of nodes will win:
!  Add garbd or a galera node to DC1 or DC2
!  Add weight to existing node in DC1:
wsrep_provider_options=“pc.weight=N;” (default = 1 )

Galera – Synced
DC1

WAN

Galera – Synced
DC2
19
Copyright 2014 Severalnines AB

Split-brain prevention
!  Add weight to existing node in DC1:
wsrep_provider_options=“pc.weight=2;”

Galera – Synced
DC1
pc.weight=2

WAN
1

3

Galera – Synced
DC2
1

1
2

20
Copyright 2014 Severalnines AB

Split-brain prevention
!  Final Two Data center setup with an additional node.

Galera – Synced
DC1

WAN

Galera – Synced
DC2
21
Copyright 2014 Severalnines AB

Split-brain prevention
!  Three data centers, split brain unlikely.
!  Galera 3.0 supports segments (gmcast.segment)
!  Only one node in each segment will relay to only one other
node in another segment
!  Segments also applies to Two Data centers, and between
racks in one DC.
WAN

Galera – Segment 3
DC2

Galera – Segment 1
DC1
Galera – Segment 2
DC3
Copyright 2014 Severalnines AB

Q&A

23
Copyright 2014 Severalnines AB

Thank you.
For further questions please contact John-Jerome Schmidt:
jj@severalnines.com

24

More Related Content

What's hot

Webinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera ClusterWebinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera Cluster
Severalnines
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practices
Dimas Prasetyo
 
Percona XtraDB Cluster SF Meetup
Percona XtraDB Cluster SF MeetupPercona XtraDB Cluster SF Meetup
Percona XtraDB Cluster SF Meetup
Vadim Tkachenko
 

What's hot (20)

Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
 
How to understand Galera Cluster - 2013
How to understand Galera Cluster - 2013How to understand Galera Cluster - 2013
How to understand Galera Cluster - 2013
 
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
 
Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?Galera Replication Demystified: How Does It Work?
Galera Replication Demystified: How Does It Work?
 
Introduction to Galera
Introduction to GaleraIntroduction to Galera
Introduction to Galera
 
Galera 3.0 Webinar Slides: Galera Monitoring & Management
Galera 3.0 Webinar Slides: Galera Monitoring & ManagementGalera 3.0 Webinar Slides: Galera Monitoring & Management
Galera 3.0 Webinar Slides: Galera Monitoring & Management
 
Webinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera ClusterWebinar Slides: Migrating to Galera Cluster
Webinar Slides: Migrating to Galera Cluster
 
合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群合并到 XtraDB 存储引擎集群
合并到 XtraDB 存储引擎集群
 
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshellPercon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
 
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly AvailableMariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly Available
 
Galera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replicationGalera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replication
 
Plny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practicesPlny12 galera-cluster-best-practices
Plny12 galera-cluster-best-practices
 
Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1
 
Advanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suiteAdvanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suite
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016
 
Percona XtraDB Cluster SF Meetup
Percona XtraDB Cluster SF MeetupPercona XtraDB Cluster SF Meetup
Percona XtraDB Cluster SF Meetup
 
Oss4b - pxc introduction
Oss4b   - pxc introductionOss4b   - pxc introduction
Oss4b - pxc introduction
 
Taking Full Advantage of Galera Multi Master Cluster
Taking Full Advantage of Galera Multi Master ClusterTaking Full Advantage of Galera Multi Master Cluster
Taking Full Advantage of Galera Multi Master Cluster
 
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in BerlinHigh Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
 
Introduction to Galera Cluster
Introduction to Galera ClusterIntroduction to Galera Cluster
Introduction to Galera Cluster
 

Similar to Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webinar Slides

Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, Whiptail
Internet World
 
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
Severalnines
 

Similar to Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webinar Slides (20)

Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Introduction to NoSQL | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to NoSQL | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to NoSQL | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to NoSQL | Big Data Hadoop Spark Tutorial | CloudxLab
 
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
 
Cassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large NodesCassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large Nodes
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, Whiptail
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB Clusters
 
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
Webinar slides: ClusterControl 1.4: The MySQL Replication & MongoDB Edition -...
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and Patterns
 
Become a MySQL DBA - webinar series - slides: Which High Availability solution?
Become a MySQL DBA - webinar series - slides: Which High Availability solution?Become a MySQL DBA - webinar series - slides: Which High Availability solution?
Become a MySQL DBA - webinar series - slides: Which High Availability solution?
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web app
 
High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)
 
MYSQL
MYSQLMYSQL
MYSQL
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
 
Introducing HerdDB - a distributed JVM embeddable database built upon Apache ...
Introducing HerdDB - a distributed JVM embeddable database built upon Apache ...Introducing HerdDB - a distributed JVM embeddable database built upon Apache ...
Introducing HerdDB - a distributed JVM embeddable database built upon Apache ...
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspective
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master Replication
 

More from Severalnines

Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
Severalnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Severalnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Severalnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Severalnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
Severalnines
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
Severalnines
 

More from Severalnines (20)

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webinar Slides

  • 1. Repair and Recovery for your MySQL, MariaDB and MongoDB/ TokuMX clusters January 2013 Johan Andersson Severalnines AB johan@severalnines.com Mobile +46 73 073 60 99
  • 2. Copyright 2014 Severalnines AB Agenda !  Redundancy models for Galera, NDB and MongoDB/ TokuMX !  Failover & Recovery (Automatic vs Manual) !  Zooming into Galera recovery procedures !  Split brains in multi-datacenter setups 2
  • 3. Copyright 2014 Severalnines AB Redundancy models for Galera, NDB and MongoDB/TokuMX !  Database Clustering can be divided in two areas !  Asynchronously replicated data !  MySQL Replication !  TokuMX/MongoDB !  Synchronously replicated data !  Galera for MySQL !  NDB Cluster (aka MySQL Cluster) 3
  • 4. Copyright 2014 Severalnines AB Asynchronous 1 2 3
  • 5. Copyright 2014 Severalnines AB Asynchronous Pros Cons !  Read scaling is easy !  Master handles all writes !  Read write splitting !  Lower write latency !  Automated failover is hard: !  Elect a new master !  Slave lag & Data loss !  Has everything been sent to the slave when the master crashes? !  Has the slave applied all data? 5
  • 6. Copyright 2014 Severalnines AB Synchronous 1 4 2 3
  • 7. Copyright 2014 Severalnines AB Synchronous Pros Cons !  All servers are masters !  Higher write latency !  Application can read and write on any server !  Sensitive to link latency !  No data loss !  Network partitioning !  Simple failover for apps 7
  • 8. Copyright 2014 Severalnines AB Redundancy Models TokuMX/MongoDB ReplicaSet (1/2) !  Up to 12 members !  Max 7 voting numbers !  Primary, Secondary, Arbiter !  Slave Delay !  Chaining Allowed !  Heartbeats every 2 seconds !  5 missed heartbeats: node dead Primary Secondary Arbiter 8
  • 9. Copyright 2014 Severalnines AB Redundancy Models TokuMX/MongoDB ReplicaSet (2/2) !  Automatic failover !  Priority (between 0 and 100.0) !  Primary has highest priority !  Influences election of new primary Data Center 1 Primary Secondary Data Center 2 Secondary 9
  • 10. Copyright 2014 Severalnines AB Redundancy Models TokuMX/MongoDB Sharded Cluster !  Built-in support for sharding !  Min 2 Query Routers !  3 Config Servers Primary Secondary Arbiter Primary Secondary Arbiter 10
  • 11. Copyright 2014 Severalnines AB Redundancy Models MySQL Replication !  No hard limits on no. of slaves !  Replication chaining !  Delayed slave !  Manual failover Slave Master Slave 11
  • 12. Copyright 2014 Severalnines AB Redundancy Models MySQL Cluster !  In-built sharding !  Separate SQL and Data layers !  Up to 4 replicas/node group !  Max 48 data nodes !  Auto-failover Node Group 1 Node Group 2 12
  • 13. Copyright 2014 Severalnines AB Redundancy Models Galera Cluster !  Synchronous replication plugin !  All masters have same dataset !  Slowest node determines speed of cluster !  No hard limits on no. of nodes !  Auto-failover !  Galera arbitrator (garbd) Master Master Master 13
  • 14. Copyright 2014 Severalnines AB Synchronous Replication Linear Two-phase commit !  Used by NDB data nodes !  Pessimistic locking !  Works well for cases with update contention 1 4 6 3 2 5 1. Prepare transaction 4. commit 14
  • 15. Copyright 2014 Severalnines AB Synchronous Replication Certificate-based !  Used by Galera/WSREP !  Optimistic locking !  Not optimal for cases with conflicting updates 1 2 3 4 1. begin transaction 2. commit 15
  • 16. Copyright 204Severalnines AB Zooming into Galera recovery procedures By Seppo Jaakola @ Codership 16
  • 17. Copyright 2014 Severalnines AB Split-brain !  Network partitioning (aka) split brain. N nodes divided into M equal parts Galera Servers - SYNCED DC1 WAN Galera Servers - SYNCED DC2 17
  • 18. Copyright 2014 Severalnines AB Split-brain !  WAN breaks - 2 equal splits (Network partitioning) !  Non-Primary – cannot handle transactions Galera – Non-Primary DC1 WAN Galera – Non-Primary DC2 18
  • 19. Copyright 2014 Severalnines AB Split-brain prevention !  Solution: The side with the majority of nodes will win: !  Add garbd or a galera node to DC1 or DC2 !  Add weight to existing node in DC1: wsrep_provider_options=“pc.weight=N;” (default = 1 ) Galera – Synced DC1 WAN Galera – Synced DC2 19
  • 20. Copyright 2014 Severalnines AB Split-brain prevention !  Add weight to existing node in DC1: wsrep_provider_options=“pc.weight=2;” Galera – Synced DC1 pc.weight=2 WAN 1 3 Galera – Synced DC2 1 1 2 20
  • 21. Copyright 2014 Severalnines AB Split-brain prevention !  Final Two Data center setup with an additional node. Galera – Synced DC1 WAN Galera – Synced DC2 21
  • 22. Copyright 2014 Severalnines AB Split-brain prevention !  Three data centers, split brain unlikely. !  Galera 3.0 supports segments (gmcast.segment) !  Only one node in each segment will relay to only one other node in another segment !  Segments also applies to Two Data centers, and between racks in one DC. WAN Galera – Segment 3 DC2 Galera – Segment 1 DC1 Galera – Segment 2 DC3
  • 24. Copyright 2014 Severalnines AB Thank you. For further questions please contact John-Jerome Schmidt: jj@severalnines.com 24