SlideShare a Scribd company logo
1 of 35
Download to read offline
Colin Charles, colin.charles@galeracluster.com | 4 June 2020
Galera Cluster 4 for MySQL 8
Agenda
• Codership

• What is Galera replication?

• Galera Cluster 4 for MySQL 8

• Comparison of the offerings of Galera Cluster 4

• Conclusion
Codership
• Codership are the original makers and engineers of Galera Cluster, a multi-
master, virtually synchronous replication solution for the MySQL ecosystem

• If you use Percona XtraDB Cluster (PXC) or MariaDB Galera Cluster, you
directly benefit from the work done by the team at Codership

• Remember that beyond engineering, you may also purchase 24/7 support,
training, consulting and a whole lot more!
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.
What is Galera replication?
• A generic replication plugin for database servers

• Uses the replication API to interact with a DBMS (via the wsrep API project,
fully open source on GitHub)

• wsrep == writeset replication

• The database and Galera plugin must have the same wsrep API version
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.)
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
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)
Branch Variants
Galera Replication Versions
• There have been many major releases (1,2,3,4)

• Current production head is at 3.29 for Galera 3, and 4.5 for Galera 4

• There have been many wsrep API versions (1..25)

• Current major version is wsrep API 26 which corresponds with Galera 4
(wsrep API 25 corresponds with Galera 3)

• There are wsrep API changes that require you to perform a rolling upgrade
Galera 4 & MySQL 8
• MySQL 8.0.19 with Galera Cluster 4 was made GA on 21 May 2020 and
announced on 25 May 2020

• Comes with wsrep API 26 and the Galera 4.5 library

• wsrep is integrated into the release of MySQL 8 that is shipped

• You can download and use it now: https://galeracluster.com/downloads/
#downloads
What new features are there?
• Streaming replication

• support for large transactions

• base platform for new features

• Group commit support

• Improved foreign key support

• Network resiliency
Streaming Replication
• The base for supporting huge transactions

• In Galera Cluster 3, a transaction processes on the “master node” (i.e. node
that client connected to, to execute the transaction) until commit time

• For large transactions, the writeset will be large, hard to process

• So wsrep_max_ws_size exists to prevent large transactions
Streaming Replication
• This is new in Galera Cluster 4 to enable running transactions of unlimited size
in a cluster

• You can of course still reject large transactions
What is a large transaction?
• LOAD DATA that is large…?

•  wsrep_max_ws_rows and wsrep_max_ws_size. Limit the transaction rows to
128 KB and the transaction size to 1 GB. wsrep_max_ws_size has a
maximum upper limit of 2GB, beyond which it is rejected 

• Guide to handle large transactions: http://galeracluster.com/library/kb/best/
large-transactions.html including the use of pt-archiver 

• One practical test: https://www.percona.com/blog/2015/10/26/how-big-can-
your-galera-transactions-be/
Streaming Replication
• Transactions are replicated, gradually in small fragments, during transaction
processing

• i.e. before an actual commit, Galera replicates a number of small sized fragments
(transaction fragmentation)

• Size threshold for fragment replication is configurable

• Replicated fragments are applied in slave threads preserving the transaction state in
all cluster nodes

• fragments hold locks in all nodes and cannot be conflicted later

• Streaming replication allows nodes to process writesets greater than 2GB
Configuring Streaming Replication
• Session variables (dynamic):

• wsrep_trx_fragment_unit — unit metrics for fragmenting, options are bytes
(writesets in bytes), rows (number of rows modified), statements (number of
SQL statements issued)

• wsrep_trx_fragment_size — threshold size in units when fragments will be
replicated. 0 means no streaming.
Using Streaming Replication
• Due to excessive logging and elevated replication overhead, streaming
replication will cause degraded transaction throughput rate

• Best use case? Use streaming replication to cut large transactions

• Set the fragment size to around 10,000 rows

• Applications can also set streaming replication on/off on a need-by-need
basis (requires changes to application naturally)
New metadata — wsrep tables in mysql database
• There are some new Galera Cluster system tables

SHOW TABLES FROM mysql LIKE 'wsrep%';

+---------------------------+
| Tables_in_mysql (wsrep%) |
+---------------------------+
| wsrep_cluster |
| wsrep_cluster_members |
| wsrep_streaming_log |
+---------------------------+
wsrep_cluster
• Contains current view of the cluster, some identity information and also cluster capabilities

SELECT COLUMN_NAME FROM information_schema.columns
WHERE table_schema='mysql'
AND table_name='wsrep_cluster';
+------------------+
| COLUMN_NAME |
+------------------+
| cluster_uuid |
| view_id |
| view_seqno |
| protocol_version |
| capabilities |
+------------------+
wsrep_cluster_members
SELECT * FROM mysql.wsrep_cluster_members ORDER BY
node_name G
*************************** 1. row
***************************
node_uuid: e39d1774-7e2b-11e9-
b5b2-7696f81d30fb
cluster_uuid:
bd5fe1c3-7d80-11e9-8913-4f209d688a15
node_name: galera1
node_incoming_address: AUTO
*************************** 2. row
***************************
node_uuid: eb8fc512-7e2b-11e9-
bb74-3281cf207f60
cluster_uuid:
bd5fe1c3-7d80-11e9-8913-4f209d688a15
node_name: galera2
node_incoming_address: AUTO
*************************** 3. row
***************************
node_uuid: 2347a8ac-7e2c-11e9-b6f0-
da90a2d0a563
cluster_uuid:
bd5fe1c3-7d80-11e9-8913-4f209d688a15
node_name: galera3
node_incoming_address: AUTO
wsrep_streaming_log
• contains meta data and row events for ongoing streaming transactions,
writeset fragment per row

• SELECT * FROM mysql.wsrep_streaming_log G
wsrep functions
• WSREP_LAST_SEEN_GTID() — returns GTID for last written transaction
observed by client

• WSREP_LAST_WRITTEN_GTID() — returns GTID of the last write transaction
made by the client

• WSREP_SYNC_WAIT_UPTO_GTID() — blocks the client until the node applies
and commits the given transaction
Improved foreign key support
• Write set certification rules are now optimised to handle foreign keys

• If you have previously seen false conflicts in certification in logs, this will now
disappear as there’s a tremendous reduction in it
Group commit
• Now there is support for group commit that is natively integrated with the
MySQL 8 binary log

• Commit time concurrency controls have been reworked such that the commit
monitor is released as soon as the commit has been queued for a group
commit

• Transactions thus are committed in groups, while respecting the sequential
commit order
Poornetworkconnections?
•GaleraClusterisnowalotmoreresilientwhenitcomestohandlingpoor
networkconnections

•Handlingofirrecoverableerrorsduetopoornetworkconditionshasalsobeen
improved,sothatanodewillalways attempttoleavetheclustergracefullyif
itisnotpossibletorecoverfromerrorswithoutsacrificingdataconsistency

•Thisisgreatforgeo-distributedmulti-masterGaleraClusters
Rolling upgrades are supported
• From an existing wsrep 25 (e.g. MySQL 5.7) 3-node cluster

• Isolate a node (make one read only, you still have a 2-node cluster for read/write),
shutdown the server, upgrade to MySQL 8, start without wsrep_provider, run
mysql_upgrade, shutdown the server, restart with wsrep_provider, allow read only
access

• Now update node 2 as above

• Then shutdown node 1, allow read-write access again, and node 1 upgrade is complete

• Repeat for node 3
What isn’t here yet, but will be coming (esp. after MariaDB Server 10.5)
• Gcache encryption (now in MariaDB Enterprise 10.4)

• XA transaction support (needed for sharding cluster)

• Non-blocking DDL (coincides with other MariaDB Server non-blocking DDL
work)

• Cluster error voting (feature within Galera Cluster library, so might even make
it into a later release of 10.4)
Quick comparisons with other variants of Galera 4
Release dates
• MariaDB Server 10.4.6 was GA with Galera 4 on 18 June 2019

• Percona XtraDB Cluster (PXC) 8.0.18-9.3 was GA with Galera 4 on 29 April
2020

• Galera 4 with MySQL 8 from Codership was GA on 21 May 2020
Quick comparisons with other variants of Galera 4
Features
• MariaDB Server 10.4 includes use of backup locks which you can use with Mariabackup
for an SST with a lightweight lock

• Percona XtraDB Cluster (PXC) 8 includes features that you’d be familiar with Percona
Server…

• comes with ProxySQL

• comes with a Kubernetes operator

• enhanced encryption thanks to a Vault plugin

• mysql_upgrade happens on SST

• pxc_encrypt_cluster_traffic is enabled by default
In summary…
• Who are the developers of Galera Cluster? Codership.

• Who has the most developers of Galera Cluster? Codership.

• Who knows the code better than anyone? Codership.

• Who decides the roadmap for Galera Cluster? Codership. With our main
partner, MariaDB Corporation, and listening closely to the community.
What’s coming next?
• Galera 3.30

• Maintenance releases for 5.6 and 5.7

• More features in MySQL 8

• New management tools

• MariaDB 10.5
Colin Charles, colin.charles@galeracluster.com | 4 June 2020
Thank you. Questions?

More Related Content

What's hot

MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationUlf Wendel
 
MMUG18 - MySQL Failover and Orchestrator
MMUG18 - MySQL Failover and OrchestratorMMUG18 - MySQL Failover and Orchestrator
MMUG18 - MySQL Failover and OrchestratorSimon J Mudd
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices Ted Wennmark
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMiguel Araújo
 
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...Frederic Descamps
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB ClusterKenny Gryp
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Mydbops
 
Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Mydbops
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniZalando Technology
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08Kenny Gryp
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Mydbops
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinWagner Bianchi
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationFrederic Descamps
 
How to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL serversHow to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL serversSimon J Mudd
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 

What's hot (20)

MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MMUG18 - MySQL Failover and Orchestrator
MMUG18 - MySQL Failover and OrchestratorMMUG18 - MySQL Failover and Orchestrator
MMUG18 - MySQL Failover and Orchestrator
 
Using galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wanUsing galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wan
 
Introduction to Galera Cluster
Introduction to Galera ClusterIntroduction to Galera Cluster
Introduction to Galera Cluster
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
 
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...DataOpsbarcelona 2019:  Deep dive into MySQL Group Replication... the magic e...
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
 
Ceph issue 해결 사례
Ceph issue 해결 사례Ceph issue 해결 사례
Ceph issue 해결 사례
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
How to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL serversHow to set up orchestrator to manage thousands of MySQL servers
How to set up orchestrator to manage thousands of MySQL servers
 
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
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 

Similar to Galera Cluster 4 for MySQL 8 Overview

Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...Codership Oy - Creators of Galera Cluster
 
The MySQL High Availability Landscape and where Galera Cluster fits in
The MySQL High Availability Landscape and where Galera Cluster fits inThe MySQL High Availability Landscape and where Galera Cluster fits in
The MySQL High Availability Landscape and where Galera Cluster fits inSakari Keskitalo
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentJean-François Gagné
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentJean-François Gagné
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...Olivier DASINI
 
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 ClusterContinuent
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationMárton Balassi
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
Oracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfOracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfAlex446314
 
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: ClusterControlContinuent
 
Accelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red HatAccelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red HatNetApp
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015Sanjay Manwani
 
Geek Nights Hong Kong
Geek Nights Hong KongGeek Nights Hong Kong
Geek Nights Hong KongRahul Gupta
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansPeter Clapham
 
What’s new in Galera 4
What’s new in Galera 4What’s new in Galera 4
What’s new in Galera 4MariaDB plc
 

Similar to Galera Cluster 4 for MySQL 8 Overview (20)

Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
 
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
 
Running Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft AzureRunning Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft Azure
 
The MySQL High Availability Landscape and where Galera Cluster fits in
The MySQL High Availability Landscape and where Galera Cluster fits inThe MySQL High Availability Landscape and where Galera Cluster fits in
The MySQL High Availability Landscape and where Galera Cluster fits in
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
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
 
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
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integration
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
Oracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfOracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdf
 
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
 
Accelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red HatAccelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
Geek Nights Hong Kong
Geek Nights Hong KongGeek Nights Hong Kong
Geek Nights Hong Kong
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
What’s new in Galera 4
What’s new in Galera 4What’s new in Galera 4
What’s new in Galera 4
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 

Recently uploaded

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

Galera Cluster 4 for MySQL 8 Overview

  • 1. Colin Charles, colin.charles@galeracluster.com | 4 June 2020 Galera Cluster 4 for MySQL 8
  • 2. Agenda • Codership • What is Galera replication? • Galera Cluster 4 for MySQL 8 • Comparison of the offerings of Galera Cluster 4 • Conclusion
  • 3. Codership • Codership are the original makers and engineers of Galera Cluster, a multi- master, virtually synchronous replication solution for the MySQL ecosystem • If you use Percona XtraDB Cluster (PXC) or MariaDB Galera Cluster, you directly benefit from the work done by the team at Codership • Remember that beyond engineering, you may also purchase 24/7 support, training, consulting and a whole lot more!
  • 4. 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.
  • 5. What is Galera replication? • A generic replication plugin for database servers • Uses the replication API to interact with a DBMS (via the wsrep API project, fully open source on GitHub) • wsrep == writeset replication • The database and Galera plugin must have the same wsrep API version
  • 6.
  • 7.
  • 8. 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.)
  • 9. 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
  • 10. 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)
  • 12. Galera Replication Versions • There have been many major releases (1,2,3,4) • Current production head is at 3.29 for Galera 3, and 4.5 for Galera 4 • There have been many wsrep API versions (1..25) • Current major version is wsrep API 26 which corresponds with Galera 4 (wsrep API 25 corresponds with Galera 3) • There are wsrep API changes that require you to perform a rolling upgrade
  • 13. Galera 4 & MySQL 8 • MySQL 8.0.19 with Galera Cluster 4 was made GA on 21 May 2020 and announced on 25 May 2020 • Comes with wsrep API 26 and the Galera 4.5 library • wsrep is integrated into the release of MySQL 8 that is shipped • You can download and use it now: https://galeracluster.com/downloads/ #downloads
  • 14. What new features are there? • Streaming replication • support for large transactions • base platform for new features • Group commit support • Improved foreign key support • Network resiliency
  • 15. Streaming Replication • The base for supporting huge transactions • In Galera Cluster 3, a transaction processes on the “master node” (i.e. node that client connected to, to execute the transaction) until commit time • For large transactions, the writeset will be large, hard to process • So wsrep_max_ws_size exists to prevent large transactions
  • 16. Streaming Replication • This is new in Galera Cluster 4 to enable running transactions of unlimited size in a cluster • You can of course still reject large transactions
  • 17. What is a large transaction? • LOAD DATA that is large…? •  wsrep_max_ws_rows and wsrep_max_ws_size. Limit the transaction rows to 128 KB and the transaction size to 1 GB. wsrep_max_ws_size has a maximum upper limit of 2GB, beyond which it is rejected • Guide to handle large transactions: http://galeracluster.com/library/kb/best/ large-transactions.html including the use of pt-archiver • One practical test: https://www.percona.com/blog/2015/10/26/how-big-can- your-galera-transactions-be/
  • 18. Streaming Replication • Transactions are replicated, gradually in small fragments, during transaction processing • i.e. before an actual commit, Galera replicates a number of small sized fragments (transaction fragmentation) • Size threshold for fragment replication is configurable • Replicated fragments are applied in slave threads preserving the transaction state in all cluster nodes • fragments hold locks in all nodes and cannot be conflicted later • Streaming replication allows nodes to process writesets greater than 2GB
  • 19. Configuring Streaming Replication • Session variables (dynamic): • wsrep_trx_fragment_unit — unit metrics for fragmenting, options are bytes (writesets in bytes), rows (number of rows modified), statements (number of SQL statements issued) • wsrep_trx_fragment_size — threshold size in units when fragments will be replicated. 0 means no streaming.
  • 20. Using Streaming Replication • Due to excessive logging and elevated replication overhead, streaming replication will cause degraded transaction throughput rate • Best use case? Use streaming replication to cut large transactions • Set the fragment size to around 10,000 rows • Applications can also set streaming replication on/off on a need-by-need basis (requires changes to application naturally)
  • 21. New metadata — wsrep tables in mysql database • There are some new Galera Cluster system tables SHOW TABLES FROM mysql LIKE 'wsrep%'; +---------------------------+ | Tables_in_mysql (wsrep%) | +---------------------------+ | wsrep_cluster | | wsrep_cluster_members | | wsrep_streaming_log | +---------------------------+
  • 22. wsrep_cluster • Contains current view of the cluster, some identity information and also cluster capabilities SELECT COLUMN_NAME FROM information_schema.columns WHERE table_schema='mysql' AND table_name='wsrep_cluster'; +------------------+ | COLUMN_NAME | +------------------+ | cluster_uuid | | view_id | | view_seqno | | protocol_version | | capabilities | +------------------+
  • 23. wsrep_cluster_members SELECT * FROM mysql.wsrep_cluster_members ORDER BY node_name G *************************** 1. row *************************** node_uuid: e39d1774-7e2b-11e9- b5b2-7696f81d30fb cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15 node_name: galera1 node_incoming_address: AUTO *************************** 2. row *************************** node_uuid: eb8fc512-7e2b-11e9- bb74-3281cf207f60 cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15 node_name: galera2 node_incoming_address: AUTO *************************** 3. row *************************** node_uuid: 2347a8ac-7e2c-11e9-b6f0- da90a2d0a563 cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15 node_name: galera3 node_incoming_address: AUTO
  • 24. wsrep_streaming_log • contains meta data and row events for ongoing streaming transactions, writeset fragment per row • SELECT * FROM mysql.wsrep_streaming_log G
  • 25. wsrep functions • WSREP_LAST_SEEN_GTID() — returns GTID for last written transaction observed by client • WSREP_LAST_WRITTEN_GTID() — returns GTID of the last write transaction made by the client • WSREP_SYNC_WAIT_UPTO_GTID() — blocks the client until the node applies and commits the given transaction
  • 26. Improved foreign key support • Write set certification rules are now optimised to handle foreign keys • If you have previously seen false conflicts in certification in logs, this will now disappear as there’s a tremendous reduction in it
  • 27. Group commit • Now there is support for group commit that is natively integrated with the MySQL 8 binary log • Commit time concurrency controls have been reworked such that the commit monitor is released as soon as the commit has been queued for a group commit • Transactions thus are committed in groups, while respecting the sequential commit order
  • 29. Rolling upgrades are supported • From an existing wsrep 25 (e.g. MySQL 5.7) 3-node cluster • Isolate a node (make one read only, you still have a 2-node cluster for read/write), shutdown the server, upgrade to MySQL 8, start without wsrep_provider, run mysql_upgrade, shutdown the server, restart with wsrep_provider, allow read only access • Now update node 2 as above • Then shutdown node 1, allow read-write access again, and node 1 upgrade is complete • Repeat for node 3
  • 30. What isn’t here yet, but will be coming (esp. after MariaDB Server 10.5) • Gcache encryption (now in MariaDB Enterprise 10.4) • XA transaction support (needed for sharding cluster) • Non-blocking DDL (coincides with other MariaDB Server non-blocking DDL work) • Cluster error voting (feature within Galera Cluster library, so might even make it into a later release of 10.4)
  • 31. Quick comparisons with other variants of Galera 4 Release dates • MariaDB Server 10.4.6 was GA with Galera 4 on 18 June 2019 • Percona XtraDB Cluster (PXC) 8.0.18-9.3 was GA with Galera 4 on 29 April 2020 • Galera 4 with MySQL 8 from Codership was GA on 21 May 2020
  • 32. Quick comparisons with other variants of Galera 4 Features • MariaDB Server 10.4 includes use of backup locks which you can use with Mariabackup for an SST with a lightweight lock • Percona XtraDB Cluster (PXC) 8 includes features that you’d be familiar with Percona Server… • comes with ProxySQL • comes with a Kubernetes operator • enhanced encryption thanks to a Vault plugin • mysql_upgrade happens on SST • pxc_encrypt_cluster_traffic is enabled by default
  • 33. In summary… • Who are the developers of Galera Cluster? Codership. • Who has the most developers of Galera Cluster? Codership. • Who knows the code better than anyone? Codership. • Who decides the roadmap for Galera Cluster? Codership. With our main partner, MariaDB Corporation, and listening closely to the community.
  • 34. What’s coming next? • Galera 3.30 • Maintenance releases for 5.6 and 5.7 • More features in MySQL 8 • New management tools • MariaDB 10.5
  • 35. Colin Charles, colin.charles@galeracluster.com | 4 June 2020 Thank you. Questions?