SlideShare a Scribd company logo
Choosing between Codershipโ€™s
MySQL Galera, MariaDB Galera
Cluster and Percona XtraDB Cluster
Colin Charles, colin.charles@galeracluster.com
12 December 2019
https://twitter.com/galeracluster | www.galeracluster.com
Codership Webinar
Agenda
โ€ข What is Galera Cluster?
โ€ข Who develops Galera Cluster?
โ€ข Why are there distributions?
โ€ข Understanding the MySQL/MariaDB bases
โ€ข Going deeper into the cluster differences
โ€ข MySQL 8 + Galera 4
This is a rare webinarโ€ฆ
โ€ข Because we will be introducing and talking about products that arenโ€™t made
by Codership, the makers and engineers behind Galera Cluster
โ€ข We will talk about the various distributions of Galera Cluster that exist
What is Linux?
โ€ข Linux is a kernel
โ€ข There are many distributions of operating systems that include the Linux
kernel that you are familiar with
โ€ข e.g. Red Hat Enterprise Linux (RHEL), Ubuntu, Fedora, etc.
What is Galera Cluster?
โ€ข It is an advanced database clustering software that provides for no data
loss, great uptime, and scalability for growth
โ€ข It is truly multi-master based on (virtually) synchronous replication
โ€ข This is the solution for High Availability
Soโ€ฆ what is Galera then?
โ€ข 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
Who developed it?
โ€ข 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, SaaS, PaaS, IaaS, etc.
Why are there distributions then?
โ€ข Because like Linux, the MySQL ecosystem is wide and varied
โ€ข Codership chooses to make a MySQL version, currently for 5.5, 5.6 and
5.7 (with 8.0 coming)
โ€ข Codership works closely with MariaDB Corporation to make MariaDB
Galera Cluster
โ€ข Percona has a branch (fork?) that ports changes from the MariaDB tree, as
well as the Codership tree
What is different at
the base?
Codership MySQL Galera Cluster
โ€ข MySQL base version + Galera Cluster
โ€ข The latest, greatest, Galera Cluster
โ€ข Codership plans the roadmaps of Galera Cluster and the new features,
bug fixes, etc.
โ€ข This is the most โ€œpristineโ€ and naturally recommended version of Galera
Cluster to use :-)
Percona Server for MySQL
โ€ข Percona Server for MySQL builds on top of MySQL, aims always to be a
more performant branch of MySQL
โ€ข Has some features that are not present in MySQL:
โ€ข MyRocks, TokuDB storage engines (not usable with Galera Cluster),
more instrumentation around user statistics, slow query logging,
improved MEMORY engine (not usable with Galera Cluster), parallel
InnoDB doublewrite buffer (XtraDB), compressed columns with
dictionaries, PAM authentication plugin, audit plugin, Vault plugin for
encryption, changed page tracking in InnoDB, extended SHOW
GRANTS, kill idle transactions, etc.
MariaDB Server
โ€ข Feature compatible, drop-in replacement, fork of MySQL
โ€ข So many storage engines! (e.g. MyRocks, Aria, TokuDB, CONNECT,
SPIDER)
โ€ข Better for DBAs, e.g. group commit in binlog, parallel replication, support
for Oracle syntax, table elimination, and a whole lot more
โ€ข It is a database by itself in itโ€™s own right!
MariaDB Server II
โ€ข Oracle compatibility (including SEQUENCES, PL/SQL)
โ€ข More storage engines but also a completely new (forked) InnoDB
โ€ข Temporal data via system versioned tables
โ€ข Galera Cluster 4.0!
โ€ข Security improvements and changes
โ€ข Optimiser improvements
โ€ข Replication & Backup
โ€ข Compression
โ€ข Invisible columns
โ€ข Instant ADD COLUMN
โ€ข Plus some of the features from 10.2+10.1+10.0+5.5+5.3+5.2+5.1 that may not be in stock MySQL
Soโ€ฆ what about the Galera Cluster enhancements?
โ€ข Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster build on-top of
their existing changes and embed the wsrep library, and provide for Galera
Cluster in their own distributions
โ€ข So in a way, you get the ability to use the threadpool with MariaDB Galera
Cluster (the core server features are also exposed when the replication library
itself gets replaced)
โ€ข SQL_MODE=ORACLE will continue parsing whatever Oracle/PL/SQL that
MariaDB Server can parse, with a Galera Cluster backend too!
โ€ข Possibilities are endless when you start thinking about future SPIDER support
with Galera Cluster
Percona XtraDB Cluster (PXC)
โ€ข Integrated Percona XtraBackup
โ€ข Integrated ProxySQL as a load balancer/proxy (with configuration script)
โ€ข โ€œStrict Modeโ€, e.g. disallow MyISAM, tables without primary keys, ROW binlog_format,
logging to a file (not tables), innodb_autoinc_lock_mode set to 2, etc.
โ€ข Automatic configuration of SSL encryption (pxc-encrypt-cluster-traffic variable)
โ€ข InnoDB improvements (via XtraDB) around full-text search, page fragmentation counters
โ€ข Integration with Percona Monitoring & Management (PMM)
โ€ข Encryption via keyring_vault or keyring_file plugins (considered beta)
MariaDB Galera Cluster
โ€ข Fully integrated into MariaDB Server (all in one download)
โ€ข Only one shipping with Galera 4 (MariaDB 10.4 โ€” before that Galera 3)
โ€ข Can do rolling upgrades from Galera 3 to Galera 4
โ€ข Hint of new Galera 4 features exist:
โ€ข Streaming replication (support for large transactions)
โ€ข Group commit support
โ€ข Use of backup locks (mariabackup SST with a โ€œlightweight lockโ€)
โ€ข Everything in MariaDB Server is available to use in Galera Cluster (as long as Galera supports it, so
not the SPIDER engine, etc.)
Branch variants
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
Galera replication versions
โ€ข There have been many major releases (1,2,3)
โ€ข Current production head is at 3.26
โ€ข There have been many wsrep API versions (1..25)
โ€ข Next major version is wsrep API 26 which corresponds with Galera 4
โ€ข There are wsrep API changes that require you to perform a rolling upgrade
MySQL 8 + Galera 4
โ€ข This is to be released Q1/2020
โ€ข I have already been playing with an internal beta on CentOS 7
โ€ข We are working out some bugs, but it will be done soon!
โ€ข MySQL GTID sequence numbers are generated from Galera seqno, so there can
be holes in the streaming replication fragments, rolled back transactions or
transactions with failed certification
โ€ข wsrep_cluster_address must be set in mysqld_bootstrap script (easyfix)
โ€ข X Protocol/Plugin is not supported yet (but is working in a tree already, so you can
query with Python/JavaScript in theory)
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
gcache encryption
โ€ข Today the logs are all completely encrypted with the exception of the
gcache
โ€ข ibdata, redo log, binlog, etc.
โ€ข now the gcache can also be encrypted
Non-blocking DDL
โ€ข Supremely important, lots of people want this, e.g. shared hosting
companies
โ€ข Need to upgrade a WordPress database? Lock all writes on all databases
served on the cluster when you run wp-upgrade.php
Percona XtraDB Cluster (PXC) 8?
โ€ข Yes, there is a branch of this, early release, based on porting from
MariaDB Server 10.4
โ€ข It does not have all the features of MySQL 8 + Galera 4 that come from
Codership (yet)
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.
Codershipโ€ฆ
โ€ข Buy from us!
โ€ข We have great 24/7 support plans, consulting, training, remote DBA, etc.
โ€ข Speak to our friendly sales consultants!
โ€ข P/S: If there are features you would like to see, speak to us. We are more
than happy to want to implement them
Questions?
Colin Charles, colin.charles@galeracluster.com
https://twitter.com/galeracluster | www.galeracluster.com
37

More Related Content

What's hot (20)

PDF
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Thomas Graf
ย 
PDF
http2 ๆœ€้€ŸๅฎŸ่ฃ… v2
Yoshihiro Iwanaga
ย 
PDF
HA Deployment Architecture with HAProxy and Keepalived
Ganapathi Kandaswamy
ย 
PDF
MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...
Jean-Franรงois Gagnรฉ
ย 
PDF
Locondo 20190215@ec tech_group
Shinya Sugiyama
ย 
PDF
Patroni: Kubernetes-native PostgreSQL companion
Alexander Kukushkin
ย 
PDF
ะžัะฝะพะฒั‹ Git
oelifantiev
ย 
PPTX
NASM Introduction.pptx
AnshKarwa
ย 
PDF
Solving PostgreSQL wicked problems
Alexander Korotkov
ย 
PPTX
Slides du meetup devops aix-marseille d'ocotbre 2023
Frederic Leger
ย 
PDF
Patroni - HA PostgreSQL made easy
Alexander Kukushkin
ย 
PDF
What Is Helm
AMELIAOLIVIA2
ย 
PDF
BPF Hardware Offload Deep Dive
Netronome
ย 
PDF
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Day #2 MySQL Tuning, Replication, Cluster
Ji-Woong Choi
ย 
PDF
InnoDB Architecture and Performance Optimization, Peter Zaitsev
Fuenteovejuna
ย 
PDF
What is new in PostgreSQL 14?
Mydbops
ย 
PDF
Presto User & Admin Guide
JEONGPHIL HAN
ย 
PDF
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
DevOps.com
ย 
PDF
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Altinity Ltd
ย 
PDF
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
Leon Anavi
ย 
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Thomas Graf
ย 
http2 ๆœ€้€ŸๅฎŸ่ฃ… v2
Yoshihiro Iwanaga
ย 
HA Deployment Architecture with HAProxy and Keepalived
Ganapathi Kandaswamy
ย 
MySQL Parallel Replication (LOGICAL_CLOCK): all the 5.7 (and some of the 8.0)...
Jean-Franรงois Gagnรฉ
ย 
Locondo 20190215@ec tech_group
Shinya Sugiyama
ย 
Patroni: Kubernetes-native PostgreSQL companion
Alexander Kukushkin
ย 
ะžัะฝะพะฒั‹ Git
oelifantiev
ย 
NASM Introduction.pptx
AnshKarwa
ย 
Solving PostgreSQL wicked problems
Alexander Korotkov
ย 
Slides du meetup devops aix-marseille d'ocotbre 2023
Frederic Leger
ย 
Patroni - HA PostgreSQL made easy
Alexander Kukushkin
ย 
What Is Helm
AMELIAOLIVIA2
ย 
BPF Hardware Offload Deep Dive
Netronome
ย 
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Day #2 MySQL Tuning, Replication, Cluster
Ji-Woong Choi
ย 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
Fuenteovejuna
ย 
What is new in PostgreSQL 14?
Mydbops
ย 
Presto User & Admin Guide
JEONGPHIL HAN
ย 
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
DevOps.com
ย 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Altinity Ltd
ย 
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
Leon Anavi
ย 

Similar to Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona XtraDB Cluster (20)

PDF
Galera Cluster 4 for MySQL 8 Release Webinar slides
Codership Oy - Creators of Galera Cluster
ย 
PDF
Galera Cluster 4 presentation at Percona Live Austin 2019
Sakari Keskitalo
ย 
PDF
The MySQL High Availability Landscape and where Galera Cluster fits in
Sakari Keskitalo
ย 
PDF
MariaDB Galera Cluster webinar โ€” 2025 Edition.pdf
Sakari Keskitalo
ย 
PDF
Whatโ€™s new in Galera 4
MariaDB plc
ย 
PDF
M|18 Under the Hood: Galera Cluster
MariaDB plc
ย 
PDF
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
NETWAYS
ย 
PPT
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
ย 
PPT
MySQL HA Percona cluster @ MySQL Meetup Mumbai
Karthik .P.R
ย 
PPTX
Migrating to XtraDB Cluster
percona2013
ย 
PDF
Galera Cluster 3.0 Features
Codership Oy - Creators of Galera Cluster
ย 
PPT
Galera webinar migration to galera cluster from my sql async replication
Codership Oy - Creators of Galera Cluster
ย 
PDF
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Severalnines
ย 
PPTX
Overview of some popular distributed databases
sagar chaturvedi
ย 
PDF
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
ย 
PDF
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
Alkin Tezuysal
ย 
PPTX
Maria DB Galera Cluster for High Availability
OSSCube
ย 
PPTX
MariaDB Galera Cluster
Abdul Manaf
ย 
PPTX
Migrating to XtraDB Cluster
percona2013
ย 
PDF
Introducing Galera 3.0
Codership Oy - Creators of Galera Cluster
ย 
Galera Cluster 4 for MySQL 8 Release Webinar slides
Codership Oy - Creators of Galera Cluster
ย 
Galera Cluster 4 presentation at Percona Live Austin 2019
Sakari Keskitalo
ย 
The MySQL High Availability Landscape and where Galera Cluster fits in
Sakari Keskitalo
ย 
MariaDB Galera Cluster webinar โ€” 2025 Edition.pdf
Sakari Keskitalo
ย 
Whatโ€™s new in Galera 4
MariaDB plc
ย 
M|18 Under the Hood: Galera Cluster
MariaDB plc
ย 
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
NETWAYS
ย 
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
ย 
MySQL HA Percona cluster @ MySQL Meetup Mumbai
Karthik .P.R
ย 
Migrating to XtraDB Cluster
percona2013
ย 
Galera Cluster 3.0 Features
Codership Oy - Creators of Galera Cluster
ย 
Galera webinar migration to galera cluster from my sql async replication
Codership Oy - Creators of Galera Cluster
ย 
Webinar slides: Introducing Galera 3.0 - Now supporting MySQL 5.6
Severalnines
ย 
Overview of some popular distributed databases
sagar chaturvedi
ย 
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
ย 
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
Alkin Tezuysal
ย 
Maria DB Galera Cluster for High Availability
OSSCube
ย 
MariaDB Galera Cluster
Abdul Manaf
ย 
Migrating to XtraDB Cluster
percona2013
ย 
Ad

More from Codership Oy - Creators of Galera Cluster (10)

PDF
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
PDF
Running Galera Cluster on Microsoft Azure
Codership Oy - Creators of Galera Cluster
ย 
PDF
Galera Cluster DDL and Schema Upgrades 220217
Codership Oy - Creators of Galera Cluster
ย 
PPT
Taking Full Advantage of Galera Multi Master Cluster
Codership Oy - Creators of Galera Cluster
ย 
PPT
Galera Cluster Best Practices for DBA's and DevOps Part 1
Codership Oy - Creators of Galera Cluster
ย 
PPT
Using galera replication to create geo distributed clusters on the wan
Codership Oy - Creators of Galera Cluster
ย 
PPT
Codership's galera cluster installation and quickstart webinar march 2016
Codership Oy - Creators of Galera Cluster
ย 
PDF
Introduction to Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
PDF
How to understand Galera Cluster - 2013
Codership Oy - Creators of Galera Cluster
ย 
PDF
Zero Downtime Schema Changes in Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
Running Galera Cluster on Microsoft Azure
Codership Oy - Creators of Galera Cluster
ย 
Galera Cluster DDL and Schema Upgrades 220217
Codership Oy - Creators of Galera Cluster
ย 
Taking Full Advantage of Galera Multi Master Cluster
Codership Oy - Creators of Galera Cluster
ย 
Galera Cluster Best Practices for DBA's and DevOps Part 1
Codership Oy - Creators of Galera Cluster
ย 
Using galera replication to create geo distributed clusters on the wan
Codership Oy - Creators of Galera Cluster
ย 
Codership's galera cluster installation and quickstart webinar march 2016
Codership Oy - Creators of Galera Cluster
ย 
Introduction to Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
How to understand Galera Cluster - 2013
Codership Oy - Creators of Galera Cluster
ย 
Zero Downtime Schema Changes in Galera Cluster
Codership Oy - Creators of Galera Cluster
ย 
Ad

Recently uploaded (20)

PPTX
computer forensics encase emager app exp6 1.pptx
ssuser343e92
ย 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
ย 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
ย 
PDF
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
ย 
PPTX
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
ย 
PDF
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
ย 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
PPTX
Seamless-Image-Conversion-From-Raster-to-wrt-rtx-rtx.pptx
Quick Conversion Services
ย 
PDF
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
ย 
PDF
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
ย 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
ย 
PPTX
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
ย 
PDF
Code Once; Run Everywhere - A Beginnerโ€™s Journey with React Native
Hasitha Walpola
ย 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
ย 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
ย 
PDF
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
PDF
Power BI vs Tableau vs Looker - Which BI Tool is Right for You?
MagnusMinds IT Solution LLP
ย 
PDF
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
ย 
PPTX
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
ย 
PDF
IDM Crack with Internet Download Manager 6.42 Build 41
utfefguu
ย 
computer forensics encase emager app exp6 1.pptx
ssuser343e92
ย 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
ย 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
ย 
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
ย 
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
ย 
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
ย 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
Seamless-Image-Conversion-From-Raster-to-wrt-rtx-rtx.pptx
Quick Conversion Services
ย 
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
ย 
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
ย 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
ย 
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
ย 
Code Once; Run Everywhere - A Beginnerโ€™s Journey with React Native
Hasitha Walpola
ย 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
ย 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
ย 
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
Power BI vs Tableau vs Looker - Which BI Tool is Right for You?
MagnusMinds IT Solution LLP
ย 
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
ย 
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
ย 
IDM Crack with Internet Download Manager 6.42 Build 41
utfefguu
ย 

Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona XtraDB Cluster

  • 1. Choosing between Codershipโ€™s MySQL Galera, MariaDB Galera Cluster and Percona XtraDB Cluster Colin Charles, [email protected] 12 December 2019 https://twitter.com/galeracluster | www.galeracluster.com Codership Webinar
  • 2. Agenda โ€ข What is Galera Cluster? โ€ข Who develops Galera Cluster? โ€ข Why are there distributions? โ€ข Understanding the MySQL/MariaDB bases โ€ข Going deeper into the cluster differences โ€ข MySQL 8 + Galera 4
  • 3. This is a rare webinarโ€ฆ โ€ข Because we will be introducing and talking about products that arenโ€™t made by Codership, the makers and engineers behind Galera Cluster โ€ข We will talk about the various distributions of Galera Cluster that exist
  • 4. What is Linux? โ€ข Linux is a kernel โ€ข There are many distributions of operating systems that include the Linux kernel that you are familiar with โ€ข e.g. Red Hat Enterprise Linux (RHEL), Ubuntu, Fedora, etc.
  • 5. What is Galera Cluster? โ€ข It is an advanced database clustering software that provides for no data loss, great uptime, and scalability for growth โ€ข It is truly multi-master based on (virtually) synchronous replication โ€ข This is the solution for High Availability
  • 6. Soโ€ฆ what is Galera then? โ€ข 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
  • 7. Who developed it? โ€ข 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, SaaS, PaaS, IaaS, etc.
  • 8. Why are there distributions then? โ€ข Because like Linux, the MySQL ecosystem is wide and varied โ€ข Codership chooses to make a MySQL version, currently for 5.5, 5.6 and 5.7 (with 8.0 coming) โ€ข Codership works closely with MariaDB Corporation to make MariaDB Galera Cluster โ€ข Percona has a branch (fork?) that ports changes from the MariaDB tree, as well as the Codership tree
  • 9. What is different at the base?
  • 10. Codership MySQL Galera Cluster โ€ข MySQL base version + Galera Cluster โ€ข The latest, greatest, Galera Cluster โ€ข Codership plans the roadmaps of Galera Cluster and the new features, bug fixes, etc. โ€ข This is the most โ€œpristineโ€ and naturally recommended version of Galera Cluster to use :-)
  • 11. Percona Server for MySQL โ€ข Percona Server for MySQL builds on top of MySQL, aims always to be a more performant branch of MySQL โ€ข Has some features that are not present in MySQL: โ€ข MyRocks, TokuDB storage engines (not usable with Galera Cluster), more instrumentation around user statistics, slow query logging, improved MEMORY engine (not usable with Galera Cluster), parallel InnoDB doublewrite buffer (XtraDB), compressed columns with dictionaries, PAM authentication plugin, audit plugin, Vault plugin for encryption, changed page tracking in InnoDB, extended SHOW GRANTS, kill idle transactions, etc.
  • 12. MariaDB Server โ€ข Feature compatible, drop-in replacement, fork of MySQL โ€ข So many storage engines! (e.g. MyRocks, Aria, TokuDB, CONNECT, SPIDER) โ€ข Better for DBAs, e.g. group commit in binlog, parallel replication, support for Oracle syntax, table elimination, and a whole lot more โ€ข It is a database by itself in itโ€™s own right!
  • 13. MariaDB Server II โ€ข Oracle compatibility (including SEQUENCES, PL/SQL) โ€ข More storage engines but also a completely new (forked) InnoDB โ€ข Temporal data via system versioned tables โ€ข Galera Cluster 4.0! โ€ข Security improvements and changes โ€ข Optimiser improvements โ€ข Replication & Backup โ€ข Compression โ€ข Invisible columns โ€ข Instant ADD COLUMN โ€ข Plus some of the features from 10.2+10.1+10.0+5.5+5.3+5.2+5.1 that may not be in stock MySQL
  • 14. Soโ€ฆ what about the Galera Cluster enhancements? โ€ข Percona XtraDB Cluster (PXC) and MariaDB Galera Cluster build on-top of their existing changes and embed the wsrep library, and provide for Galera Cluster in their own distributions โ€ข So in a way, you get the ability to use the threadpool with MariaDB Galera Cluster (the core server features are also exposed when the replication library itself gets replaced) โ€ข SQL_MODE=ORACLE will continue parsing whatever Oracle/PL/SQL that MariaDB Server can parse, with a Galera Cluster backend too! โ€ข Possibilities are endless when you start thinking about future SPIDER support with Galera Cluster
  • 15. Percona XtraDB Cluster (PXC) โ€ข Integrated Percona XtraBackup โ€ข Integrated ProxySQL as a load balancer/proxy (with configuration script) โ€ข โ€œStrict Modeโ€, e.g. disallow MyISAM, tables without primary keys, ROW binlog_format, logging to a file (not tables), innodb_autoinc_lock_mode set to 2, etc. โ€ข Automatic configuration of SSL encryption (pxc-encrypt-cluster-traffic variable) โ€ข InnoDB improvements (via XtraDB) around full-text search, page fragmentation counters โ€ข Integration with Percona Monitoring & Management (PMM) โ€ข Encryption via keyring_vault or keyring_file plugins (considered beta)
  • 16. MariaDB Galera Cluster โ€ข Fully integrated into MariaDB Server (all in one download) โ€ข Only one shipping with Galera 4 (MariaDB 10.4 โ€” before that Galera 3) โ€ข Can do rolling upgrades from Galera 3 to Galera 4 โ€ข Hint of new Galera 4 features exist: โ€ข Streaming replication (support for large transactions) โ€ข Group commit support โ€ข Use of backup locks (mariabackup SST with a โ€œlightweight lockโ€) โ€ข Everything in MariaDB Server is available to use in Galera Cluster (as long as Galera supports it, so not the SPIDER engine, etc.)
  • 18. 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
  • 19. Galera replication versions โ€ข There have been many major releases (1,2,3) โ€ข Current production head is at 3.26 โ€ข There have been many wsrep API versions (1..25) โ€ข Next major version is wsrep API 26 which corresponds with Galera 4 โ€ข There are wsrep API changes that require you to perform a rolling upgrade
  • 20. MySQL 8 + Galera 4 โ€ข This is to be released Q1/2020 โ€ข I have already been playing with an internal beta on CentOS 7 โ€ข We are working out some bugs, but it will be done soon! โ€ข MySQL GTID sequence numbers are generated from Galera seqno, so there can be holes in the streaming replication fragments, rolled back transactions or transactions with failed certification โ€ข wsrep_cluster_address must be set in mysqld_bootstrap script (easyfix) โ€ข X Protocol/Plugin is not supported yet (but is working in a tree already, so you can query with Python/JavaScript in theory)
  • 21. 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
  • 22. 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
  • 23. 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/
  • 24. 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
  • 25. 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.
  • 26. 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)
  • 27. 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 | +---------------------------+
  • 28. 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 | +------------------+
  • 29. 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
  • 30. wsrep_streaming_log โ€ข contains meta data and row events for ongoing streaming transactions, writeset fragment per row โ€ข SELECT * FROM mysql.wsrep_streaming_log G
  • 31. 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
  • 32. gcache encryption โ€ข Today the logs are all completely encrypted with the exception of the gcache โ€ข ibdata, redo log, binlog, etc. โ€ข now the gcache can also be encrypted
  • 33. Non-blocking DDL โ€ข Supremely important, lots of people want this, e.g. shared hosting companies โ€ข Need to upgrade a WordPress database? Lock all writes on all databases served on the cluster when you run wp-upgrade.php
  • 34. Percona XtraDB Cluster (PXC) 8? โ€ข Yes, there is a branch of this, early release, based on porting from MariaDB Server 10.4 โ€ข It does not have all the features of MySQL 8 + Galera 4 that come from Codership (yet)
  • 35. 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.
  • 36. Codershipโ€ฆ โ€ข Buy from us! โ€ข We have great 24/7 support plans, consulting, training, remote DBA, etc. โ€ข Speak to our friendly sales consultants! โ€ข P/S: If there are features you would like to see, speak to us. We are more than happy to want to implement them