SlideShare a Scribd company logo
www.fromdual.com 
1 / 21 
High-availability with 
Galera Cluster 
for MySQL 
FromDual Company Meeting 
10. September 2014, Barcelona 
by oli.sennhauser@fromdual.com 
www.fromdual.com
www.fromdual.com 
2 / 21 
About FromDual GmbH 
● FromDual provides neutral and independent: 
● Consulting for MySQL, Galera Cluster, MariaDB and 
Percona Server 
● Support for all MySQL and Galera Cluster 
● Remote-DBA Services for all MySQL 
● MySQL Training 
● Open Source Business Alliance (OSBA) 
● Member of SOUG, DOAG, /ch/open 
www.fromdual.com
www.fromdual.com 
3 / 21 
High-Availability :-( 
● Who loves night-shifts? 
● Who loves weekend-work? 
● Who does regular upgrade (DB, kernel, 
etc.)? 
● Who does regular reboots (after kernel 
upgrade)? 
● Why are you not doing it in your office 
hours?
www.fromdual.com 
4 / 21 
The Galera Cluster for MySQL
www.fromdual.com 
5 / 21 
Maintenance time... 
App 
Load balancing (LB) 
Upgrade 
RAM/HW 
O/S 
DB? 
pG 
Node 1 Node 2 
wsrewsrep 
alera replication 
Node 3 
wsrep
www.fromdual.com 
6 / 21 
Advantages / Disadvantages 
Based on InnoDB SE 
Synchronous replication → No lost transaction 
Active-active multi-master Cluster 
→ Read and write to any cluster node (no r/w split any more!) 
Read scalability and higher write throughput (Flash-Cache?) 
Automatic node membership control 
Rolling Restart (Upgrade of Hardware, O/S, DB release, etc.) 
True parallel replication, on row level 
→ No slave lag 
A bit more complicated than normal MySQL, but similar 
complexity as M/S Replication! 
No original MySQL binaries → Codership MySQL binaries 
Be aware of Hot Spots on rows: Higher probability of deadlocks
www.fromdual.com 
7 / 21 
Quorum and split-brain 
● What is the problem? 
● Split-brain → bad! 
? 
● Galera is a pessimistic Cluster → good! 
● Quorum: FLOOR(n/2+1) 
→ more than half! → 3-node Cluster (or 2+1)
www.fromdual.com 
8 / 21 
Quorum
www.fromdual.com 
9 / 21 
Installation and Configuration
www.fromdual.com 
10 / 21 
Installation 
● Galera Cluster consists of: 
● A patched Codership MySQL (mysqld) 
● Or MariaDB Galera Cluster 
● Or Percona XtraDB Cluster 
● The Galera Plugin (libgalera_smm.so) 
● Ways of installation 
● Packets (RPM, DEB) 
● Binary tar-ball 
● Patch MySQL source and compile both 
● Download http://galeracluster.com/downloads/
www.fromdual.com 
11 / 21 
MySQL Configuration 
my.cnf 
[mysqld] 
default_storage_engine = InnoDB 
binlog_format = row 
innodb_autoinc_lock_mode = 2 # parallel applying 
innodb_flush_log_at_trx_commit = 0 # performance only! 
query_cache_size = 0 # Galera 3 → experimental 
query_cache_type = 0 # Mutex! Consistency!
www.fromdual.com 
12 / 21 
Galera Configuration 
my.cnf (conf.d/wsrep.cnf) 
[mysqld] 
# wsrep_provider = none 
wsrep_provider = …/lib/plugin/libgalera_smm.so 
# wsrep_cluster_address = "gcomm://" 
wsrep_cluster_address = "gcomm://ip_node2,ip_node3" 
wsrep_cluster_name = 'Galera Cluster' 
wsrep_node_name = 'Node A' 
wsrep_sst_method = mysqldump 
wsrep_sst_auth = sst:secret
www.fromdual.com 
13 / 21 
Operations
www.fromdual.com 
14 / 21 
Initial Cluster start 
● Start very 1st node with: 
wsrep_cluster_address = "gcomm://" 
or 
mysqld_safe ­­wsrep­cluster­address=" 
gcomm://" 
● → this tells the node to be the first one! 
● All other nodes normal: 
service mysqld start
www.fromdual.com 
15 / 21 
Rolling Restart 
● Scenario: 
● Hardware-, O/S-, DB- and Galera-Upgrade 
● MySQL configuration change 
● During full operation!!! (99.999% HA, 5x9 HA) 
● → Rolling Restart 
● Start one node after the other in a cycle 
● New features or settings are used after Rolling 
Restart is completed
www.fromdual.com 
16 / 21 
Load Balancing 
● Connectors 
● Connector/J 
● PHP: MySQLnd replication and load balancing 
plug-in 
● SW Load Balancer 
● GLB, LVS/IPVS/Ldirector, HAProxy 
● HW Load Balancer
www.fromdual.com 
17 / 21 
Location of Load Balancing
www.fromdual.com 
18 / 21 
Online Schema Upgrade (OSU) 
● Schema Upgrade = DDL run against the DB 
● Change DB structure 
● Non transactional 
● 2 Methods: 
● Total Order Isolation (TOI) (default) 
● Rolling Schema Upgrade (RSU) 
● wsrep_osu_method = {TOI|RSU}
www.fromdual.com 
19 / 21 
Online Schema Upgrade 
● Total Order Isolation (TOI) (default) 
● Part of the database is locked for the duration of the DDL. 
● + Simple, predictable and guaranteed data consistency. 
● - Locking operation 
● Good for fast DDL operations 
● Rolling Schema Upgrade (RSU) 
● DDL will be only processed locally at the node. 
● Node is desynchronized for the duration of the DDL processing. 
● After DDL completion, delayed write sets are applied (similar to IST). 
● DDL should be manually executed at each node. 
● + only blocking one node at a time 
● - potentially unsafe and may fail if new and old schema are incompatible 
● Good for slow DDL operations
www.fromdual.com 
20 / 21 
We want you! 
● Database enthusiast for support / 
remote-DBA / consulting
www.fromdual.com 
21 / 21 
Q & A 
Questions ? 
Discussion? 
We have time for some face-to-face talks... 
● FromDual provides neutral and independent: 
● Consulting 
● Remote-DBA 
● Support for MySQL, Galera, Percona Server and MariaDB 
● Training www.fromdual.com

More Related Content

What's hot

Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
ShapeBlue
 
Customizing Virtual Machine Images - Javier Fontán
Customizing Virtual Machine Images - Javier FontánCustomizing Virtual Machine Images - Javier Fontán
Customizing Virtual Machine Images - Javier Fontán
OpenNebula Project
 
Gluster volume snapshot
Gluster volume snapshotGluster volume snapshot
Gluster volume snapshot
Rajesh Joseph
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
ShapeBlue
 
NUMA and Java Databases
NUMA and Java DatabasesNUMA and Java Databases
NUMA and Java Databases
Raghavendra Prabhu
 
TechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
TechDay - Cambridge 2016 - OpenNebula at Harvard UniverityTechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
TechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
OpenNebula Project
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd
Marian Marinov
 
Speeding up ps and top
Speeding up ps and topSpeeding up ps and top
Speeding up ps and top
Kirill Kolyshkin
 
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving FastOpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
OpenNebula Project
 
MySQL Galera 集群
MySQL Galera 集群MySQL Galera 集群
MySQL Galera 集群
YUCHENG HU
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
NETWAYS
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
Ceph Community
 
Live migration: pros, cons and gotchas -- Pavel Emelyanov
Live migration: pros, cons and gotchas -- Pavel EmelyanovLive migration: pros, cons and gotchas -- Pavel Emelyanov
Live migration: pros, cons and gotchas -- Pavel Emelyanov
OpenVZ
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
FromDual GmbH
 
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
OpenNebula Project
 
Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit Austin
Ed Balduf
 
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebula Project
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
Maxence Dunnewind
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with Gluster
Vijay Bellur
 
4. v sphere big data extensions hadoop
4. v sphere big data extensions   hadoop4. v sphere big data extensions   hadoop
4. v sphere big data extensions hadoop
Chiou-Nan Chen
 

What's hot (20)

Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
Customizing Virtual Machine Images - Javier Fontán
Customizing Virtual Machine Images - Javier FontánCustomizing Virtual Machine Images - Javier Fontán
Customizing Virtual Machine Images - Javier Fontán
 
Gluster volume snapshot
Gluster volume snapshotGluster volume snapshot
Gluster volume snapshot
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
NUMA and Java Databases
NUMA and Java DatabasesNUMA and Java Databases
NUMA and Java Databases
 
TechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
TechDay - Cambridge 2016 - OpenNebula at Harvard UniverityTechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
TechDay - Cambridge 2016 - OpenNebula at Harvard Univerity
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd
 
Speeding up ps and top
Speeding up ps and topSpeeding up ps and top
Speeding up ps and top
 
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving FastOpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
OpenNebula TechDay Waterloo 2015 - OpenNebula is Evolving Fast
 
MySQL Galera 集群
MySQL Galera 集群MySQL Galera 集群
MySQL Galera 集群
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
 
Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt Building AuroraObjects- Ceph Day Frankfurt
Building AuroraObjects- Ceph Day Frankfurt
 
Live migration: pros, cons and gotchas -- Pavel Emelyanov
Live migration: pros, cons and gotchas -- Pavel EmelyanovLive migration: pros, cons and gotchas -- Pavel Emelyanov
Live migration: pros, cons and gotchas -- Pavel Emelyanov
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
OpenNebulaConf2015 2.14 Cloud Service Experience in TeideHPC Infrastructure -...
 
Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit Austin
 
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with Gluster
 
4. v sphere big data extensions hadoop
4. v sphere big data extensions   hadoop4. v sphere big data extensions   hadoop
4. v sphere big data extensions hadoop
 

Similar to High-availability with Galera Cluster for MySQL

MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
FromDual GmbH
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
Valerii Kravchuk
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningFromDual GmbH
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
FromDual GmbH
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Lenz Grimmer
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsLenz Grimmer
 
Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02Louis liu
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
Linux Huge Pages
Linux Huge PagesLinux Huge Pages
Linux Huge Pages
Geraldo Netto
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
OSInet
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard way
Laurent Bernaille
 
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitationsMySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Coredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS serverCoredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS server
Yann Hamon
 
Monitoring with Ganglia
Monitoring with GangliaMonitoring with Ganglia
Monitoring with Ganglia
Fastly
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
Federico Razzoli
 
MariaDB Server on macOS - FOSDEM 2022 MariaDB Devroom
MariaDB Server on macOS -  FOSDEM 2022 MariaDB DevroomMariaDB Server on macOS -  FOSDEM 2022 MariaDB Devroom
MariaDB Server on macOS - FOSDEM 2022 MariaDB Devroom
Valeriy Kravchuk
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
RedWireServices
 

Similar to High-availability with Galera Cluster for MySQL (20)

MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL TuningUKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL Tuning
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
Linux Huge Pages
Linux Huge PagesLinux Huge Pages
Linux Huge Pages
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard way
 
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitationsMySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
 
Coredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS serverCoredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS server
 
Monitoring with Ganglia
Monitoring with GangliaMonitoring with Ganglia
Monitoring with Ganglia
 
MySQL and MariaDB Backups
MySQL and MariaDB BackupsMySQL and MariaDB Backups
MySQL and MariaDB Backups
 
MariaDB Server on macOS - FOSDEM 2022 MariaDB Devroom
MariaDB Server on macOS -  FOSDEM 2022 MariaDB DevroomMariaDB Server on macOS -  FOSDEM 2022 MariaDB Devroom
MariaDB Server on macOS - FOSDEM 2022 MariaDB Devroom
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 

More from FromDual GmbH

PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
FromDual GmbH
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
FromDual GmbH
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
FromDual GmbH
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schema
FromDual GmbH
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
FromDual GmbH
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
FromDual GmbH
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
FromDual GmbH
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
FromDual GmbH
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
FromDual GmbH
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
FromDual GmbH
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
FromDual GmbH
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
FromDual GmbH
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
FromDual GmbH
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
FromDual GmbH
 
Reading MySQL fingerprints
Reading MySQL fingerprintsReading MySQL fingerprints
Reading MySQL fingerprints
FromDual GmbH
 
MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014
FromDual GmbH
 
MySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLMySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQL
FromDual GmbH
 
MySQL Backup
MySQL BackupMySQL Backup
MySQL Backup
FromDual GmbH
 
Need for Speed: Mysql indexing
Need for Speed: Mysql indexingNeed for Speed: Mysql indexing
Need for Speed: Mysql indexing
FromDual GmbH
 

More from FromDual GmbH (20)

PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schema
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
 
Reading MySQL fingerprints
Reading MySQL fingerprintsReading MySQL fingerprints
Reading MySQL fingerprints
 
MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014
 
MySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLMySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQL
 
MySQL Backup
MySQL BackupMySQL Backup
MySQL Backup
 
Need for Speed: Mysql indexing
Need for Speed: Mysql indexingNeed for Speed: Mysql indexing
Need for Speed: Mysql indexing
 

Recently uploaded

Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AwangAniqkmals
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
SkillCertProExams
 

Recently uploaded (19)

Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
 

High-availability with Galera Cluster for MySQL

  • 1. www.fromdual.com 1 / 21 High-availability with Galera Cluster for MySQL FromDual Company Meeting 10. September 2014, Barcelona by oli.sennhauser@fromdual.com www.fromdual.com
  • 2. www.fromdual.com 2 / 21 About FromDual GmbH ● FromDual provides neutral and independent: ● Consulting for MySQL, Galera Cluster, MariaDB and Percona Server ● Support for all MySQL and Galera Cluster ● Remote-DBA Services for all MySQL ● MySQL Training ● Open Source Business Alliance (OSBA) ● Member of SOUG, DOAG, /ch/open www.fromdual.com
  • 3. www.fromdual.com 3 / 21 High-Availability :-( ● Who loves night-shifts? ● Who loves weekend-work? ● Who does regular upgrade (DB, kernel, etc.)? ● Who does regular reboots (after kernel upgrade)? ● Why are you not doing it in your office hours?
  • 4. www.fromdual.com 4 / 21 The Galera Cluster for MySQL
  • 5. www.fromdual.com 5 / 21 Maintenance time... App Load balancing (LB) Upgrade RAM/HW O/S DB? pG Node 1 Node 2 wsrewsrep alera replication Node 3 wsrep
  • 6. www.fromdual.com 6 / 21 Advantages / Disadvantages Based on InnoDB SE Synchronous replication → No lost transaction Active-active multi-master Cluster → Read and write to any cluster node (no r/w split any more!) Read scalability and higher write throughput (Flash-Cache?) Automatic node membership control Rolling Restart (Upgrade of Hardware, O/S, DB release, etc.) True parallel replication, on row level → No slave lag A bit more complicated than normal MySQL, but similar complexity as M/S Replication! No original MySQL binaries → Codership MySQL binaries Be aware of Hot Spots on rows: Higher probability of deadlocks
  • 7. www.fromdual.com 7 / 21 Quorum and split-brain ● What is the problem? ● Split-brain → bad! ? ● Galera is a pessimistic Cluster → good! ● Quorum: FLOOR(n/2+1) → more than half! → 3-node Cluster (or 2+1)
  • 9. www.fromdual.com 9 / 21 Installation and Configuration
  • 10. www.fromdual.com 10 / 21 Installation ● Galera Cluster consists of: ● A patched Codership MySQL (mysqld) ● Or MariaDB Galera Cluster ● Or Percona XtraDB Cluster ● The Galera Plugin (libgalera_smm.so) ● Ways of installation ● Packets (RPM, DEB) ● Binary tar-ball ● Patch MySQL source and compile both ● Download http://galeracluster.com/downloads/
  • 11. www.fromdual.com 11 / 21 MySQL Configuration my.cnf [mysqld] default_storage_engine = InnoDB binlog_format = row innodb_autoinc_lock_mode = 2 # parallel applying innodb_flush_log_at_trx_commit = 0 # performance only! query_cache_size = 0 # Galera 3 → experimental query_cache_type = 0 # Mutex! Consistency!
  • 12. www.fromdual.com 12 / 21 Galera Configuration my.cnf (conf.d/wsrep.cnf) [mysqld] # wsrep_provider = none wsrep_provider = …/lib/plugin/libgalera_smm.so # wsrep_cluster_address = "gcomm://" wsrep_cluster_address = "gcomm://ip_node2,ip_node3" wsrep_cluster_name = 'Galera Cluster' wsrep_node_name = 'Node A' wsrep_sst_method = mysqldump wsrep_sst_auth = sst:secret
  • 13. www.fromdual.com 13 / 21 Operations
  • 14. www.fromdual.com 14 / 21 Initial Cluster start ● Start very 1st node with: wsrep_cluster_address = "gcomm://" or mysqld_safe ­­wsrep­cluster­address=" gcomm://" ● → this tells the node to be the first one! ● All other nodes normal: service mysqld start
  • 15. www.fromdual.com 15 / 21 Rolling Restart ● Scenario: ● Hardware-, O/S-, DB- and Galera-Upgrade ● MySQL configuration change ● During full operation!!! (99.999% HA, 5x9 HA) ● → Rolling Restart ● Start one node after the other in a cycle ● New features or settings are used after Rolling Restart is completed
  • 16. www.fromdual.com 16 / 21 Load Balancing ● Connectors ● Connector/J ● PHP: MySQLnd replication and load balancing plug-in ● SW Load Balancer ● GLB, LVS/IPVS/Ldirector, HAProxy ● HW Load Balancer
  • 17. www.fromdual.com 17 / 21 Location of Load Balancing
  • 18. www.fromdual.com 18 / 21 Online Schema Upgrade (OSU) ● Schema Upgrade = DDL run against the DB ● Change DB structure ● Non transactional ● 2 Methods: ● Total Order Isolation (TOI) (default) ● Rolling Schema Upgrade (RSU) ● wsrep_osu_method = {TOI|RSU}
  • 19. www.fromdual.com 19 / 21 Online Schema Upgrade ● Total Order Isolation (TOI) (default) ● Part of the database is locked for the duration of the DDL. ● + Simple, predictable and guaranteed data consistency. ● - Locking operation ● Good for fast DDL operations ● Rolling Schema Upgrade (RSU) ● DDL will be only processed locally at the node. ● Node is desynchronized for the duration of the DDL processing. ● After DDL completion, delayed write sets are applied (similar to IST). ● DDL should be manually executed at each node. ● + only blocking one node at a time ● - potentially unsafe and may fail if new and old schema are incompatible ● Good for slow DDL operations
  • 20. www.fromdual.com 20 / 21 We want you! ● Database enthusiast for support / remote-DBA / consulting
  • 21. www.fromdual.com 21 / 21 Q & A Questions ? Discussion? We have time for some face-to-face talks... ● FromDual provides neutral and independent: ● Consulting ● Remote-DBA ● Support for MySQL, Galera, Percona Server and MariaDB ● Training www.fromdual.com