際際滷

際際滷Share a Scribd company logo
Galera Cluster 
MySQL/MariaDB-tietokannan 
master-master-klusterointi 
Otto Kek辰l辰inen 
@ottokekalainen 
SUSE & OpenSUSE -ilta 
Helsinki 27.11.2014
LINUX-JRJESTELMIEN 
ASIANTUNTIJA- JA TUKIPALVELUT
Kun master-slave ei riit辰... 
Normaali MySQL/MariaDB pystyy tekem辰辰n replikointia 
siten, ett辰 tietokannan p辰辰kone (master) l辰hett辰辰 tietoja 
varakoneeseen (slave). 
Galera tarjoaa multi-master toiminnon, eli on 
tietokannalla voi olla useampi tietokone, jotka voivat 
vastaanottaa tietoa (kirjoittaa tietokantaan) rinnakkain. 
Kehitt辰j辰 suomalainen Codership Oy
Galera-arkkitehtuuri 
read & write read & write read & write 
MariaDB MariaDB MariaDB 
Read & write mihin tahansa koneeseen 
Master-koneita voi olla useita 
Galera-replikointi Replikointi on synkronista
Galera 
MySQL/MariaDB/Percona-tietokannan 
tulee olla InnoDB/XtraDB-tyyppi辰 
Klusteroinnissa pit辰辰 olla v辰hint辰辰n kolme 
tietokonetta  3. koneessa voi olla koko 
tietokantaohjelman sijasta my旦s pelkk辰 
Galera arbitrator -ohjelma
Galera 
Provisiointi on automaattista 
Koneet voi olla miss辰 vaan (LAN/WAN) 
Galerassa on SSL/TLS-tuki, jonka voi 
tarvittaessa kytke辰 p辰辰lle
Synkroninen replikointi 
Client Master Slave 
COMMIT 
replikointi 
ACK 
OK 
COMMIT 
ylim辰辰r辰inen 
latenssi
Helppo ja halpa skaalautuvuus 
Aloita yhdell辰 tietokantapalvelimella 
Lis辰辰 toinen tietokantapalvelin (ja kolmas kone 
jossa garbd) 
Sovellukseen ei tarvitse tehd辰 muutoksia 
(Galera-klusteri n辰ytt辰辰 99,99 %:sti normaalilta 
InnoDB-taululta) 
Minimaalinen lis辰latenssi vaikuttaa vain 
COMMIT-operaatioihin, eik辰 v辰lt辰tm辰tt辰 edes 
n辰y, koska lis辰palvelin nopeuttaa kaikkea muuta
Migraatio lennossa Galeraan? 
Lis辰辰 MySQL/MariaDB:een Galera-palvelin 
slave-tilassa. Laajenna klusteriksi ja tee 
Galerasta master. 
MySQL 
slave 
MySQL 
master 
Galera 
Node 1 
Galera 
Node 2 
Galera 
Node 3 
1 
2
Asentaminen 
Galeracluster.com: MySQL-wsrep 
MariaDB: MariaDB Galera Cluster (<10.1) 
Percona: Percona XtraDB Cluster 
Galera 3.6 (wsrep-API versio 25) on oma pakettinsa, 
mutta tulee palvelinten mukana koska API-version 
yhteensopivuus on t辰rke辰辰.
Asentaminen SUSE:een 
SUSE ja OpenSUSE-paketteja ei ole viel辰 virallisesti 
Galeracluster.com:ssa eik辰 Perconalla, ja 
MariaDB.org:stakin l旦ytyy vain MariaDB Galera Cluster 
10.0 OpenSUSE 13:lle. 
Omat (ep辰vakaat!) pakettini: 
https://build.opensuse.org/project/show/home:ottokek
Tukipalvelut 
Suomalainen Codership Oy + kumppanit, 
esim. suomalainen MariaDB 
http://galeracluster.com/support/
Ota yhteytt辰 kun haluat Seravo Oy:n 
kehitt辰m辰辰n tai yll辰pit辰m辰辰n 
Linux-pohjaisia tietoj辰rjestelmi辰nne 
Avaa seravo.f 
Lis辰vinkkej辰 blogissamme
Ad

Recommended

Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Severalnines
Galera cluster for MySQL - Introduction 際際滷s
Galera cluster for MySQL - Introduction 際際滷s
Severalnines
MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentation
Francisco Gon巽alves
Meetup docker paris
Meetup docker paris
Aliou BA
Portainer
Portainer
Anthony Lapenna
螳覦螳 MariaDB 覯蟲豢
螳覦螳 MariaDB 覯蟲豢
Deep Dive Into How To Monitor MySQL or MariaDB Galera Cluster / Percona XtraD...
Deep Dive Into How To Monitor MySQL or MariaDB Galera Cluster / Percona XtraD...
Severalnines
Scalable Django Architecture
Scalable Django Architecture
Rami Sayar
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kek辰l辰inen
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
Otto Kek辰l辰inen
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them ext...
The 5 most common reasons for a slow WordPress site and how to fix them ext...
Otto Kek辰l辰inen
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kek辰l辰inen
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kek辰l辰inen
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kek辰l辰inen
Technical SEO for WordPress
Technical SEO for WordPress
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kek辰l辰inen
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kek辰l辰inen
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kek辰l辰inen
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kek辰l辰inen
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kek辰l辰inen
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
Otto Kek辰l辰inen
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kek辰l辰inen
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
Otto Kek辰l辰inen

More Related Content

More from Otto Kek辰l辰inen (20)

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kek辰l辰inen
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
Otto Kek辰l辰inen
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them ext...
The 5 most common reasons for a slow WordPress site and how to fix them ext...
Otto Kek辰l辰inen
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kek辰l辰inen
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kek辰l辰inen
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kek辰l辰inen
Technical SEO for WordPress
Technical SEO for WordPress
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kek辰l辰inen
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kek辰l辰inen
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kek辰l辰inen
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kek辰l辰inen
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kek辰l辰inen
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
Otto Kek辰l辰inen
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kek辰l辰inen
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
Otto Kek辰l辰inen
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kek辰l辰inen
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kek辰l辰inen
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: Whats New in MariaDB Server 10.5 and Galera 4?
Otto Kek辰l辰inen
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them ext...
The 5 most common reasons for a slow WordPress site and how to fix them ext...
Otto Kek辰l辰inen
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kek辰l辰inen
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kek辰l辰inen
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kek辰l辰inen
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kek辰l辰inen
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kek辰l辰inen
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kek辰l辰inen
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kek辰l辰inen
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kek辰l辰inen
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kek辰l辰inen
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
Otto Kek辰l辰inen
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kek辰l辰inen
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
WordPress security 101 - WP Jyv辰skyl辰 Meetup 21.3.2017
Otto Kek辰l辰inen

Galera Cluster: MySQL/MariaDB-tietokannan master-master-klusterointi

  • 1. Galera Cluster MySQL/MariaDB-tietokannan master-master-klusterointi Otto Kek辰l辰inen @ottokekalainen SUSE & OpenSUSE -ilta Helsinki 27.11.2014
  • 3. Kun master-slave ei riit辰... Normaali MySQL/MariaDB pystyy tekem辰辰n replikointia siten, ett辰 tietokannan p辰辰kone (master) l辰hett辰辰 tietoja varakoneeseen (slave). Galera tarjoaa multi-master toiminnon, eli on tietokannalla voi olla useampi tietokone, jotka voivat vastaanottaa tietoa (kirjoittaa tietokantaan) rinnakkain. Kehitt辰j辰 suomalainen Codership Oy
  • 4. Galera-arkkitehtuuri read & write read & write read & write MariaDB MariaDB MariaDB Read & write mihin tahansa koneeseen Master-koneita voi olla useita Galera-replikointi Replikointi on synkronista
  • 5. Galera MySQL/MariaDB/Percona-tietokannan tulee olla InnoDB/XtraDB-tyyppi辰 Klusteroinnissa pit辰辰 olla v辰hint辰辰n kolme tietokonetta 3. koneessa voi olla koko tietokantaohjelman sijasta my旦s pelkk辰 Galera arbitrator -ohjelma
  • 6. Galera Provisiointi on automaattista Koneet voi olla miss辰 vaan (LAN/WAN) Galerassa on SSL/TLS-tuki, jonka voi tarvittaessa kytke辰 p辰辰lle
  • 7. Synkroninen replikointi Client Master Slave COMMIT replikointi ACK OK COMMIT ylim辰辰r辰inen latenssi
  • 8. Helppo ja halpa skaalautuvuus Aloita yhdell辰 tietokantapalvelimella Lis辰辰 toinen tietokantapalvelin (ja kolmas kone jossa garbd) Sovellukseen ei tarvitse tehd辰 muutoksia (Galera-klusteri n辰ytt辰辰 99,99 %:sti normaalilta InnoDB-taululta) Minimaalinen lis辰latenssi vaikuttaa vain COMMIT-operaatioihin, eik辰 v辰lt辰tm辰tt辰 edes n辰y, koska lis辰palvelin nopeuttaa kaikkea muuta
  • 9. Migraatio lennossa Galeraan? Lis辰辰 MySQL/MariaDB:een Galera-palvelin slave-tilassa. Laajenna klusteriksi ja tee Galerasta master. MySQL slave MySQL master Galera Node 1 Galera Node 2 Galera Node 3 1 2
  • 10. Asentaminen Galeracluster.com: MySQL-wsrep MariaDB: MariaDB Galera Cluster (<10.1) Percona: Percona XtraDB Cluster Galera 3.6 (wsrep-API versio 25) on oma pakettinsa, mutta tulee palvelinten mukana koska API-version yhteensopivuus on t辰rke辰辰.
  • 11. Asentaminen SUSE:een SUSE ja OpenSUSE-paketteja ei ole viel辰 virallisesti Galeracluster.com:ssa eik辰 Perconalla, ja MariaDB.org:stakin l旦ytyy vain MariaDB Galera Cluster 10.0 OpenSUSE 13:lle. Omat (ep辰vakaat!) pakettini: https://build.opensuse.org/project/show/home:ottokek
  • 12. Tukipalvelut Suomalainen Codership Oy + kumppanit, esim. suomalainen MariaDB http://galeracluster.com/support/
  • 13. Ota yhteytt辰 kun haluat Seravo Oy:n kehitt辰m辰辰n tai yll辰pit辰m辰辰n Linux-pohjaisia tietoj辰rjestelmi辰nne Avaa seravo.f Lis辰vinkkej辰 blogissamme