SlideShare a Scribd company logo
The MySQL High Availability
Landscape and where Galera
Cluster fits in
Colin Charles, colin.charles@galeracluster.com

9 April 2019

https://twitter.com/galeracluster | www.galeracluster.com 

Codership Webinar
!1
Agenda
• Codership

• What is High Availability?

• Redundancy through MySQL replication

• Failover frameworks

• Proxies

• Galera Cluster

• Cloud-based solutions

• Conclusion
!2
Codership
• The developers and experts of Galera Cluster

• Established in 2007, 3 founders, all engineers

• Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect

• Services business model, producing 100% open source software

• Thousands of users in various industries: e-commerce, betting/gambling,
telecoms, banking, insurance, gaming, healthcare, media, marketing,
advertising, travel, education, software as a service, PaaS, IaaS, etc.
!3
What is High Availability?
!4
Myriad solutions
• Galera Cluster (which includes MariaDB Galera Cluster and Percona XtraDB Cluster
(PXC))

• Linbit DRBD

• Failover frameworks: MHA, mysqlfailover, Orchestrator

• MySQL NDB Cluster

• Group replication and MySQL InnoDB Cluster

• The cloud with “HA-out-of-the-box”

• Proxies: MySQL Router, MariaDB MaxScale, ProxySQL
!5
Uptime
Percentile target Max downtime per year
90% 36 days
99% 3.65 days
99.5% 1.83 days
99.9% 8.76 hours
99.99% 52.56 minutes
99.999% 5.25 minutes
99.9999% 31.5 seconds
!6
Estimating levels of availability
Method
Levels of
Availability
Regular asynchronous
replication
98-99.9%
SAN 99.5-99.9%
DRBD, MHA 99.9%
NDBCluster, Galera Cluster 99.999%
!7
High Availability is about redundancy
• RAID: disk crashes? Another works

• Clustering: server crashes? Another works

• Power: fuse blows? Redundant power supplies

• Network: Switch/NIC crashes? 2nd network route

• Geographical: Datacenter offline/destroyed? Computation to another DC
!8
High Availability is about Durability in your data
• Data stored on disks

• Is it really written to the disk?

• being durable means calling fsync() on each commit

• Is it written in a transactional way to guarantee atomicity, crash safety,
integrity?
!9
High Availability for databases
• HA is harder for databases

• Hardware resources and data need to be redundant

• Remember, this isn’t just data - constantly changing data

• HA means the operation can continue uninterrupted, not
by restoring a new/backup server

• uninterrupted: measured in percentiles
!10
High Availability solutions we won’t cover
• Client-side XA transactions

• Shared storage via a SAN (scale up vs. scale out, expensive!)

• Virtual Machine (VM) based failover

• MySQL NDB Cluster (niche)

• Commercial solutions

• SeveralNines ClusterControl while not a High Availability solution, has a GUI that
works well with Galera Cluster 

• Continuent Tungsten Replicator is no longer an open source solution
!11
Redundancy through disk replication
• DRBD

• Linux administration vs. DBA skills

• Synchronous

• Second set of data inaccessible for use

• Passive server acting as hot standby

• Failover: 1-30 minutes

• Performance hit: DRBD is worse than single node performance, with higher average
latencies
!12
Redundancy through MySQL replication
• Replication is asynchronous and was statement-based till row-based was
introduced in MySQL 5.1, and it became the default in MySQL 5.7

• MariaDB Server uses mixed-mode replication, which is STATEMENT unless
calling dangerous statements which then switches to ROW based (e.g.
server variable used in statement, USER function, etc.)

• Semi-synchronous introduced as a plugin in MySQL 5.5+, and built into
MariaDB Server 10.3+

• semi-sync nowadays has no phantom read issues (5.7+), as it only
acknowledges a transaction event after written to the relay log and
flushed to disk
!13
Failover frameworks
• When you use asynchronous or semi-synchronous (preferred) replication, you can use a failover
framework to help with automated failovers (i.e. when the primary dies, a secondary takes over
as the new primary)

• Orchestrator has a GUI 

• MHA has been tried and tested

• MySQL Utilities comes with mysqlfailover 

• Linux chops? Pacemaker Resource Agents exist 

• Beware that not all these tools work with the GTID of MariaDB Server (they tend to be tuned for
MySQL)

• Replication Manager works with both GTIDs
!14
Proxies
• MySQL Router — part of InnoDB Cluster, transparent routing between
application and MySQL backends

• MariaDB MaxScale — database proxy, well suited for MariaDB Server
deployments 

• ProxySQL — supports Galera Cluster hostgroups 

• HAProxy — does not understand the SQL protocol, but is commonly used
as a load balancer in front of MySQL
!15
Galera Cluster
• MariaDB Server (which comes with Galera Cluster) has over 12 million downloads as of
March 2017; Percona XtraDB Cluster (PXC) has over 1.3 million downloads; more from
galeracluster.com; we can’t count distributions!

• Cloud platforms recommend Galera Cluster usage for High Availability — e.g.
OpenStack

• Thousands of users in various industries (e-commerce, gaming, telecom, banking,
insurance, healthcare, SaaS, IaaS, PaaS, etc) have trusted Galera Cluster over a decade. 

• MySQL Community Award: Application of the Year 2014 

• Included in many mainstream Linux/BSD distributions (Ubuntu, Debian, Fedora, RHEL8,
openSUSE, FreeBSD, etc.)
!16
!17
Galera Cluster is all about multi-master replication
• Can be described as virtually synchronous replication

• High Availability with no data loss, and consistent data across all nodes — no Single Point of Failure (SPoF)

• Quorum based failure handling 

• Optimistic concurrency control

• 100% multi-master cluster (all nodes are equal in terms of having the data, so no lagging secondaries, 24/7
availability, etc.)

• This is a core feature of the product by design, has automatic transaction conflict detection and management,
and your application can issue any transaction to any Galera Cluster node. Works well in WAN/Clouds 

• Parallel replication

• You do not need automatic failovers via a framework, no need to designate single nodes for writes and the rest for
reads, configuration is simple, easier handling of scheduled downtime
!18
Galera Cluster optimised for the cloud
• Optimised network protocol as packets are only exchanged over the WAN at
transaction commit time

• Topology-aware replication, so each transaction is sent to the data centre only
once

• Detection and automatic eviction of unreliable nodes

• eviction if due to network flaps or node failure, will not be able to rejoin without
manual intervention

• Split brain recovery/management

• Traffic encryption (key in the cloud)
!19
MySQL InnoDB Cluster and group replication
• While the underlying protocol is different, the paper it is based on is similar to Galera Cluster

• Newer kid on the block, Galera Cluster has been around for a long time (since 2007)

• e.g. features like failover consistency (eventual or “read your writes”) only appear in 8.0.14+

• You will have to use the MySQL Shell for administration, so something new to learn

• Single primary mode with automatic primary election or multi-primary mode (multi-master), where all servers
can accept updates issued concurrently (but this is sold as an advanced use case)

• There are limitations, e.g. around very large transactions to be executed, some of which get mitigated in an
unreleased 8.0.16 (where large messages are automatically fragmented). Also support for TLSv1.3 exists in
8.0.16, but this is not baked yet for group replication.

• Maximum of 9 servers in a group

• However, it does work on Microsoft Windows
!20
Galera Cluster branches
• Upstream: galeracluster.com 

• Built-into MariaDB Galera Cluster — we work actively with MariaDB
Corporation, from roadmaps, testing systems together as well as working
with customers together.

• MariaDB Server 10.4 is the first release candidate to include Galera
Cluster 4! 

• Separate download as Percona XtraDB Cluster (PXC)
!21
Branch variants
!22
Some feature highlights of Galera 3.x and 4
• Intelligent donor selection, preferring a donor that can do an Incremental
State Transfer (IST)

• Cluster crash recovery, say, after a power failure via pc.recovery=ON so all
nodes maintain cluster information persistently, not requiring a bootstrap

• Streaming replication, which replicates transactions of any size; transaction
replicated in small increments. Huge transaction support!

• Consistency voting protocol in the event of inconsistencies, all nodes vote
when such is detected

• DDL optimisation, so the lock only applies to the affected table
!23
!24
Cloud solutions
• By far, the most popular is Amazon Web Services Relational Database
Service (RDS) for MySQL / MariaDB Server

• Multi-AZ gives you High Availability, but no second readable node; it
makes use of DRBD for failover

• Amazon Aurora is gaining popularity for those that outgrow RDS, but
you’re not getting 100% MySQL (it is a branch of 5.6 and 5.7 with physical
replication)

• Google Cloud SQL offers semi-synchronous replication
!25
Conclusion
• Codership: The developers and experts of Galera Cluster

• Galera Cluster used and deployed for over a decade in thousands of
environments

• If you’re looking for 5 9’s uptime, cannot tolerate downtime, data loss or a
loss in transactions, Galera Cluster could be the right solution for you!
!26
Questions?
Colin Charles, colin.charles@galeracluster.com

https://twitter.com/galeracluster | www.galeracluster.com
!27
Ad

More Related Content

What's hot (20)

High Availability with MariaDB Enterprise
High Availability with MariaDB EnterpriseHigh Availability with MariaDB Enterprise
High Availability with MariaDB Enterprise
MariaDB Corporation
 
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
 
Galera cluster - SkySQL Paris Meetup 17.12.2013
Galera cluster - SkySQL Paris Meetup 17.12.2013Galera cluster - SkySQL Paris Meetup 17.12.2013
Galera cluster - SkySQL Paris Meetup 17.12.2013
MariaDB Corporation
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Lenz Grimmer
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB Corporation
 
Galera Cluster 4 for MySQL 8 Release Webinar slides
Galera Cluster 4 for MySQL 8 Release Webinar slidesGalera Cluster 4 for MySQL 8 Release Webinar slides
Galera Cluster 4 for MySQL 8 Release Webinar slides
Codership Oy - Creators of Galera Cluster
 
High Performance Drupal with MariaDB
High Performance Drupal with MariaDBHigh Performance Drupal with MariaDB
High Performance Drupal with MariaDB
MariaDB Corporation
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Severalnines
 
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
MariaDB Corporation
 
Deploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia NetworksDeploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia Networks
MariaDB plc
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
MariaDB Corporation
 
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
Severalnines
 
How to understand Galera Cluster - 2013
How to understand Galera Cluster - 2013How to understand Galera Cluster - 2013
How to understand Galera Cluster - 2013
Codership Oy - Creators of Galera Cluster
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDB
MariaDB Corporation
 
Galera Cluster 3.0 Features
Galera Cluster 3.0 FeaturesGalera Cluster 3.0 Features
Galera Cluster 3.0 Features
Codership Oy - Creators of Galera Cluster
 
Running Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft AzureRunning Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft Azure
Codership Oy - Creators of Galera Cluster
 
Introducing Galera 3.0
Introducing Galera 3.0Introducing Galera 3.0
Introducing Galera 3.0
Codership Oy - Creators of Galera Cluster
 
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
Codership Oy - Creators of Galera Cluster
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Colin Charles
 
High Availability with MariaDB Enterprise
High Availability with MariaDB EnterpriseHigh Availability with MariaDB Enterprise
High Availability with MariaDB Enterprise
MariaDB Corporation
 
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
 
Galera cluster - SkySQL Paris Meetup 17.12.2013
Galera cluster - SkySQL Paris Meetup 17.12.2013Galera cluster - SkySQL Paris Meetup 17.12.2013
Galera cluster - SkySQL Paris Meetup 17.12.2013
MariaDB Corporation
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Lenz Grimmer
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB Corporation
 
High Performance Drupal with MariaDB
High Performance Drupal with MariaDBHigh Performance Drupal with MariaDB
High Performance Drupal with MariaDB
MariaDB Corporation
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Severalnines
 
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
MariaDB Corporation
 
Deploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia NetworksDeploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia Networks
MariaDB plc
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
MariaDB Corporation
 
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
Severalnines
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Colin Charles
 

Similar to The MySQL High Availability Landscape and where Galera Cluster fits in (20)

OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
Matt Lord
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
Tesora
 
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: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
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
 
Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Highly available, scalable and secure data with Cassandra and DataStax Enterp...Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Johnny Miller
 
BigData Developers MeetUp
BigData Developers MeetUpBigData Developers MeetUp
BigData Developers MeetUp
Christian Johannsen
 
CloudStack Overview
CloudStack OverviewCloudStack Overview
CloudStack Overview
sedukull
 
25 snowflake
25 snowflake25 snowflake
25 snowflake
剑飞 陈
 
MariaDB Galera Cluster webinar — 2025 Edition.pdf
MariaDB Galera Cluster webinar — 2025 Edition.pdfMariaDB Galera Cluster webinar — 2025 Edition.pdf
MariaDB Galera Cluster webinar — 2025 Edition.pdf
Sakari Keskitalo
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
OSSCube
 
MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?
Bokowsky + Laymann GmbH
 
Apache Cassandra and The Multi-Cloud by Amanda Moran
Apache Cassandra and The Multi-Cloud by Amanda MoranApache Cassandra and The Multi-Cloud by Amanda Moran
Apache Cassandra and The Multi-Cloud by Amanda Moran
Data Con LA
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
MySQL HA Sharding-Fabric
MySQL HA Sharding-FabricMySQL HA Sharding-Fabric
MySQL HA Sharding-Fabric
Abdul Manaf
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
Ivan Zoratti
 
Cassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction GuideCassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction Guide
Mohammed Fazuluddin
 
End of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph ReplicationEnd of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph Replication
Ceph Community
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
Nitin Mehta
 
MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud
Colin Charles
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
Matt Lord
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
Tesora
 
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: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
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
 
Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Highly available, scalable and secure data with Cassandra and DataStax Enterp...Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Highly available, scalable and secure data with Cassandra and DataStax Enterp...
Johnny Miller
 
CloudStack Overview
CloudStack OverviewCloudStack Overview
CloudStack Overview
sedukull
 
MariaDB Galera Cluster webinar — 2025 Edition.pdf
MariaDB Galera Cluster webinar — 2025 Edition.pdfMariaDB Galera Cluster webinar — 2025 Edition.pdf
MariaDB Galera Cluster webinar — 2025 Edition.pdf
Sakari Keskitalo
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
OSSCube
 
Apache Cassandra and The Multi-Cloud by Amanda Moran
Apache Cassandra and The Multi-Cloud by Amanda MoranApache Cassandra and The Multi-Cloud by Amanda Moran
Apache Cassandra and The Multi-Cloud by Amanda Moran
Data Con LA
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
MySQL HA Sharding-Fabric
MySQL HA Sharding-FabricMySQL HA Sharding-Fabric
MySQL HA Sharding-Fabric
Abdul Manaf
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
Ivan Zoratti
 
Cassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction GuideCassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction Guide
Mohammed Fazuluddin
 
End of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph ReplicationEnd of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph Replication
Ceph Community
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
Nitin Mehta
 
MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud
Colin Charles
 
Ad

Recently uploaded (20)

Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Ad

The MySQL High Availability Landscape and where Galera Cluster fits in

  • 1. The MySQL High Availability Landscape and where Galera Cluster fits in Colin Charles, [email protected] 9 April 2019 https://twitter.com/galeracluster | www.galeracluster.com Codership Webinar !1
  • 2. Agenda • Codership • What is High Availability? • Redundancy through MySQL replication • Failover frameworks • Proxies • Galera Cluster • Cloud-based solutions • Conclusion !2
  • 3. Codership • The developers and experts of Galera Cluster • Established in 2007, 3 founders, all engineers • Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect • Services business model, producing 100% open source software • Thousands of users in various industries: e-commerce, betting/gambling, telecoms, banking, insurance, gaming, healthcare, media, marketing, advertising, travel, education, software as a service, PaaS, IaaS, etc. !3
  • 4. What is High Availability? !4
  • 5. Myriad solutions • Galera Cluster (which includes MariaDB Galera Cluster and Percona XtraDB Cluster (PXC)) • Linbit DRBD • Failover frameworks: MHA, mysqlfailover, Orchestrator • MySQL NDB Cluster • Group replication and MySQL InnoDB Cluster • The cloud with “HA-out-of-the-box” • Proxies: MySQL Router, MariaDB MaxScale, ProxySQL !5
  • 6. Uptime Percentile target Max downtime per year 90% 36 days 99% 3.65 days 99.5% 1.83 days 99.9% 8.76 hours 99.99% 52.56 minutes 99.999% 5.25 minutes 99.9999% 31.5 seconds !6
  • 7. Estimating levels of availability Method Levels of Availability Regular asynchronous replication 98-99.9% SAN 99.5-99.9% DRBD, MHA 99.9% NDBCluster, Galera Cluster 99.999% !7
  • 8. High Availability is about redundancy • RAID: disk crashes? Another works • Clustering: server crashes? Another works • Power: fuse blows? Redundant power supplies • Network: Switch/NIC crashes? 2nd network route • Geographical: Datacenter offline/destroyed? Computation to another DC !8
  • 9. High Availability is about Durability in your data • Data stored on disks • Is it really written to the disk? • being durable means calling fsync() on each commit • Is it written in a transactional way to guarantee atomicity, crash safety, integrity? !9
  • 10. High Availability for databases • HA is harder for databases • Hardware resources and data need to be redundant • Remember, this isn’t just data - constantly changing data • HA means the operation can continue uninterrupted, not by restoring a new/backup server • uninterrupted: measured in percentiles !10
  • 11. High Availability solutions we won’t cover • Client-side XA transactions • Shared storage via a SAN (scale up vs. scale out, expensive!) • Virtual Machine (VM) based failover • MySQL NDB Cluster (niche) • Commercial solutions • SeveralNines ClusterControl while not a High Availability solution, has a GUI that works well with Galera Cluster • Continuent Tungsten Replicator is no longer an open source solution !11
  • 12. Redundancy through disk replication • DRBD • Linux administration vs. DBA skills • Synchronous • Second set of data inaccessible for use • Passive server acting as hot standby • Failover: 1-30 minutes • Performance hit: DRBD is worse than single node performance, with higher average latencies !12
  • 13. Redundancy through MySQL replication • Replication is asynchronous and was statement-based till row-based was introduced in MySQL 5.1, and it became the default in MySQL 5.7 • MariaDB Server uses mixed-mode replication, which is STATEMENT unless calling dangerous statements which then switches to ROW based (e.g. server variable used in statement, USER function, etc.) • Semi-synchronous introduced as a plugin in MySQL 5.5+, and built into MariaDB Server 10.3+ • semi-sync nowadays has no phantom read issues (5.7+), as it only acknowledges a transaction event after written to the relay log and flushed to disk !13
  • 14. Failover frameworks • When you use asynchronous or semi-synchronous (preferred) replication, you can use a failover framework to help with automated failovers (i.e. when the primary dies, a secondary takes over as the new primary) • Orchestrator has a GUI • MHA has been tried and tested • MySQL Utilities comes with mysqlfailover • Linux chops? Pacemaker Resource Agents exist • Beware that not all these tools work with the GTID of MariaDB Server (they tend to be tuned for MySQL) • Replication Manager works with both GTIDs !14
  • 15. Proxies • MySQL Router — part of InnoDB Cluster, transparent routing between application and MySQL backends • MariaDB MaxScale — database proxy, well suited for MariaDB Server deployments • ProxySQL — supports Galera Cluster hostgroups • HAProxy — does not understand the SQL protocol, but is commonly used as a load balancer in front of MySQL !15
  • 16. Galera Cluster • MariaDB Server (which comes with Galera Cluster) has over 12 million downloads as of March 2017; Percona XtraDB Cluster (PXC) has over 1.3 million downloads; more from galeracluster.com; we can’t count distributions! • Cloud platforms recommend Galera Cluster usage for High Availability — e.g. OpenStack • Thousands of users in various industries (e-commerce, gaming, telecom, banking, insurance, healthcare, SaaS, IaaS, PaaS, etc) have trusted Galera Cluster over a decade. • MySQL Community Award: Application of the Year 2014 • Included in many mainstream Linux/BSD distributions (Ubuntu, Debian, Fedora, RHEL8, openSUSE, FreeBSD, etc.) !16
  • 17. !17
  • 18. Galera Cluster is all about multi-master replication • Can be described as virtually synchronous replication • High Availability with no data loss, and consistent data across all nodes — no Single Point of Failure (SPoF) • Quorum based failure handling • Optimistic concurrency control • 100% multi-master cluster (all nodes are equal in terms of having the data, so no lagging secondaries, 24/7 availability, etc.) • This is a core feature of the product by design, has automatic transaction conflict detection and management, and your application can issue any transaction to any Galera Cluster node. Works well in WAN/Clouds • Parallel replication • You do not need automatic failovers via a framework, no need to designate single nodes for writes and the rest for reads, configuration is simple, easier handling of scheduled downtime !18
  • 19. Galera Cluster optimised for the cloud • Optimised network protocol as packets are only exchanged over the WAN at transaction commit time • Topology-aware replication, so each transaction is sent to the data centre only once • Detection and automatic eviction of unreliable nodes • eviction if due to network flaps or node failure, will not be able to rejoin without manual intervention • Split brain recovery/management • Traffic encryption (key in the cloud) !19
  • 20. MySQL InnoDB Cluster and group replication • While the underlying protocol is different, the paper it is based on is similar to Galera Cluster • Newer kid on the block, Galera Cluster has been around for a long time (since 2007) • e.g. features like failover consistency (eventual or “read your writes”) only appear in 8.0.14+ • You will have to use the MySQL Shell for administration, so something new to learn • Single primary mode with automatic primary election or multi-primary mode (multi-master), where all servers can accept updates issued concurrently (but this is sold as an advanced use case) • There are limitations, e.g. around very large transactions to be executed, some of which get mitigated in an unreleased 8.0.16 (where large messages are automatically fragmented). Also support for TLSv1.3 exists in 8.0.16, but this is not baked yet for group replication. • Maximum of 9 servers in a group • However, it does work on Microsoft Windows !20
  • 21. Galera Cluster branches • Upstream: galeracluster.com • Built-into MariaDB Galera Cluster — we work actively with MariaDB Corporation, from roadmaps, testing systems together as well as working with customers together. • MariaDB Server 10.4 is the first release candidate to include Galera Cluster 4! • Separate download as Percona XtraDB Cluster (PXC) !21
  • 23. Some feature highlights of Galera 3.x and 4 • Intelligent donor selection, preferring a donor that can do an Incremental State Transfer (IST) • Cluster crash recovery, say, after a power failure via pc.recovery=ON so all nodes maintain cluster information persistently, not requiring a bootstrap • Streaming replication, which replicates transactions of any size; transaction replicated in small increments. Huge transaction support! • Consistency voting protocol in the event of inconsistencies, all nodes vote when such is detected • DDL optimisation, so the lock only applies to the affected table !23
  • 24. !24
  • 25. Cloud solutions • By far, the most popular is Amazon Web Services Relational Database Service (RDS) for MySQL / MariaDB Server • Multi-AZ gives you High Availability, but no second readable node; it makes use of DRBD for failover • Amazon Aurora is gaining popularity for those that outgrow RDS, but you’re not getting 100% MySQL (it is a branch of 5.6 and 5.7 with physical replication) • Google Cloud SQL offers semi-synchronous replication !25
  • 26. Conclusion • Codership: The developers and experts of Galera Cluster • Galera Cluster used and deployed for over a decade in thousands of environments • If you’re looking for 5 9’s uptime, cannot tolerate downtime, data loss or a loss in transactions, Galera Cluster could be the right solution for you! !26