SlideShare a Scribd company logo
Galera Cluster Installation
And Quick Start
Philip Stoev
Codership Oy
2
Codership
Established 2007 (Galera development started)
3 co-founder engineers:
Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect
Team have developed three MySQL cluster software earlier.
Based on: http://www.dsn.jhu.edu/~yairamir/Yair_phd.pdf
http://www.inf.usi.ch/faculty/pedone/Paper/199x/These-2090-Pedone.pdf
Product: Galera Cluster for MySQL, open source
Thousands of users in e-commerce, telecom, gaming, insurance, betting healthcare,
media, marketing, advertising, travel, universities, software-as-service, Paas, Iaas, etc
Galera Cluster is included and will be included in Linux and OpenStack distros
3
Galera Cluster variants
API
MySQL
Coderhips’s Galera Replication plugin
API
Percona
Server
API
MariaDB
merge
merge
Percona calls Galera
Percona XtraDB Cluster
Galera Cluster for MySQL by Codership
MariaDB calls Galera
MariaDB Galera Cluster or
MariaDB Enterprise Cluster
Agenda
• A very quick overview of Galera Cluster
• Adding the Galera package repository
• Installing packages
• Creating a configuration file
• Bootstrapping a 3-node cluster
• Monitoring
Galera Cluster Overview
Synchronous
– each transaction is immediately replicated on all nodes at commit
– no stale slaves
Multi-Master
– read from and write to any node
– automatic transaction conflict detection
Replication
– a copy of the entire dataset is available on all nodes
– new nodes can join automatically
For MySQL
– based on a modified version of MySQL (5.5, 5.6 with 5.7 coming up)
– InnoDB storage engine
And more …
• Recovers from node failures within seconds
• Data consistency protections
– avoids reading stale data
– prevents unsafe data modifications
• WAN support
– nodes can be on different continents
– end-to-end encryption
– optimized communication with least latency
Package Installation (CentOS, RHEL)
1. Remove existing MySQL server packages
2. Configure the Galera Cluster repository
Add a .repo file in /etc/yum.repos.d/:
[galera]
name = Galera
baseurl = http://releases.galeracluster.com/centos/7/x86_64
gpgkey = http://releases.galeracluster.com/GPG-KEY-galeracluster.com
gpgcheck = 1
(note distribution name and release number are specified)
1. Install Galera Cluster Packages
yum –y upgrade mysql-wsrep-shared-5.6
yum –y install galera-3 mysql-wsrep-5.6
Preparing the System
• Nodes should have identical hardware
• Firewall ports to open:
3306, 4567, 4568, 4444
• Disable SELinux
– a policy can be created and enabled later
The my.cnf Configuration File
• All Galera configuration is in my.cnf
• Keep the my.cnf files on all nodes identical
• InnoDB settings are important
optimize individual nodes as you normally would:
– InnoDB buffer size
– InnoDB log file size
• Galera-specific settings:
default_storage_engine=InnoDB
binlog_format=ROW
innodb_autoinc_lock_mode=2
wsrep_provider=/usr/lib64/galera-3/libgalera_smm.so
wsrep_cluster_address="gcomm://node1,node2,node3... "
Bootstrap
1. Start first node with –wsrep-new-cluster:
sudo service mysql start --wsrep-new-cluster
1. Confirm a single-node cluster:
SHOW STATUS LIKE 'wsrep_%'
| wsrep_cluster_status | Primary |
| wsrep_cluster_size | 1 |
1. Start all other nodes normally
sudo service mysql start
1. Confirm nodes have joined:
SHOW STATUS LIKE 'wsrep_%'
| wsrep_cluster_size | 3 |
Monitoring
Traditional MySQL monitoring methods are used:
• SHOW STATUS
• SHOW PROCESSLIST
• The MySQL error log
– all Galera messages go there
• Queries against INFORMATION_SCHEMA
SHOW STATUS
• Node health variables:
– wsrep_ready = ON
– wsrep_cluster_size
– wsrep_cluster_status = Primary
– wsrep_local_status = Synced
• Replication health variables:
– wsrep_flow_control_paused < 0.05
– wsrep_local_bf_aborts + wsrep_local_cert_failures
(do not forget periodic FLUSH STATUS)
SHOW PROCESSLIST
• Queries to watch out for:
– long “Query end” phase
• replication takes place during that phase
– long-running DDL
• under default settings may block cluster
INFORMATION_SCHEMA
• Avoid non-InnoDB tables:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE != 'InnoDB'
AND TABLE_SCHEMA NOT IN ('mysql','performance_schema',
'information_schema');
• Avoid tables with no primary key:
SELECT T.TABLE_SCHEMA, T.TABLE_NAME
FROM information_schema.tables AS T
WHERE (table_schema, table_name)
NOT IN (SELECT table_schema, table_name
FROM information_schema.table_constraints AS C
WHERE T.table_name = C.table_name
AND T.table_schema = C.table_schema )
AND table_schema NOT IN
('mysql','information_schema','performance_schema');
Thank You
Downloads, documentation:
http://www.galeracluster.com
Discussion group:
codership-team@googlegroups.com

More Related Content

PPTX
Creating Elasticsearch Snapshots
Vic Hargrave
 
PDF
Setting up a MySQL Docker Container
Victor S. Recio
 
PPTX
Cassandra installation
PritamKathar
 
PPT
Codership's galera cluster installation and quickstart webinar march 2016
Sakari Keskitalo
 
PDF
Linux system administration - part-2
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
PDF
Mastering VMware Datacenter - 15 Modules
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
PPTX
Deploying OpenStack with Ansible
Kevin Carter
 
Creating Elasticsearch Snapshots
Vic Hargrave
 
Setting up a MySQL Docker Container
Victor S. Recio
 
Cassandra installation
PritamKathar
 
Codership's galera cluster installation and quickstart webinar march 2016
Sakari Keskitalo
 
Linux system administration - part-2
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
Mastering VMware Datacenter - 15 Modules
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
Deploying OpenStack with Ansible
Kevin Carter
 

What's hot (20)

PDF
My sql 5.6 master slave and master-master replication.step by step configurat...
Pawan Kumar
 
PDF
Dockerの準備
koedoyoshida
 
PDF
Simple flexible deployments with openstack ansible
Jean-Philippe Evrard
 
PDF
20121204 open technet_openstack_이틀만하면나처럼할수있다
Nalee Jang
 
PPTX
vCloudSync – Hybrid disaster recovery for Openstack
Vinothini Raju
 
PDF
Dev stacklabguide
openstackcisco
 
PDF
OpenStack-Ansible Project Update
Jesse Pretorius
 
PPTX
Intro to OpenStack
donnieh1
 
PDF
My sql 5.6 installation and upgradation steps in centos
Pawan Kumar
 
PDF
SUSE Expert Days Paris 2018 – SLE 15
SUSE
 
PDF
MySQL Usability Guidelines
Morgan Tocker
 
PDF
How to Install nRF51 IPv6 over Bluetooth using MDK-ARM+IoT SDK
Naoto MATSUMOTO
 
PDF
TryStack: A Sandbox for OpenStack Users and Admins
Anne Gentle
 
PPT
Applying OpenStack at iNET use case
Vietnam Open Infrastructure User Group
 
PDF
Flexible, simple deployments with OpenStack-Ansible
Major Hayden
 
PPTX
DevCloud - Setup and Demo on Apache CloudStack
buildacloud
 
PPTX
Cloud stack monitoring with zenoss
Shanker Balan
 
PPTX
Installing hive on ubuntu 16
Enrique Davila
 
ODP
Manage Virtual Machines with WebVirtMgr on openSUSE
Dendy P. Delly
 
PDF
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Cumulus Networks
 
My sql 5.6 master slave and master-master replication.step by step configurat...
Pawan Kumar
 
Dockerの準備
koedoyoshida
 
Simple flexible deployments with openstack ansible
Jean-Philippe Evrard
 
20121204 open technet_openstack_이틀만하면나처럼할수있다
Nalee Jang
 
vCloudSync – Hybrid disaster recovery for Openstack
Vinothini Raju
 
Dev stacklabguide
openstackcisco
 
OpenStack-Ansible Project Update
Jesse Pretorius
 
Intro to OpenStack
donnieh1
 
My sql 5.6 installation and upgradation steps in centos
Pawan Kumar
 
SUSE Expert Days Paris 2018 – SLE 15
SUSE
 
MySQL Usability Guidelines
Morgan Tocker
 
How to Install nRF51 IPv6 over Bluetooth using MDK-ARM+IoT SDK
Naoto MATSUMOTO
 
TryStack: A Sandbox for OpenStack Users and Admins
Anne Gentle
 
Applying OpenStack at iNET use case
Vietnam Open Infrastructure User Group
 
Flexible, simple deployments with OpenStack-Ansible
Major Hayden
 
DevCloud - Setup and Demo on Apache CloudStack
buildacloud
 
Cloud stack monitoring with zenoss
Shanker Balan
 
Installing hive on ubuntu 16
Enrique Davila
 
Manage Virtual Machines with WebVirtMgr on openSUSE
Dendy P. Delly
 
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Cumulus Networks
 
Ad

Viewers also liked (15)

PDF
Accenture uk-graduates-infographic
Angela Gardner
 
PPTX
Roadmix MOBILEjobsite App
Ross Telford
 
PDF
HOMECARE NEW
Maraheb Medical Services
 
PDF
SIGGA Consultoria Ambiental
Eduardo Reis Rosa
 
DOC
Mina-Adel-Fahmy-Iskander
Mina Adel
 
PDF
Using galera replication to create geo distributed clusters on the wan
Sakari Keskitalo
 
PDF
1998278
Jérôme Lemoyne
 
DOC
Wilson_Karen_Gyrphon
Karen Wilson
 
PDF
TomBertlingVNH
Jessica Roos
 
PDF
Slidos
stanos8810
 
PPTX
la amistad
cristiancoboss
 
PDF
Using galera replication to create geo distributed clusters on the wan
Sakari Keskitalo
 
PDF
POLAPRAGADA-THESIS
Chaitanya Polapragada
 
PDF
Mindfulness in business
Dara Handelman
 
DOCX
Italy Cross Cultural paper
Bridget Lutz
 
Accenture uk-graduates-infographic
Angela Gardner
 
Roadmix MOBILEjobsite App
Ross Telford
 
SIGGA Consultoria Ambiental
Eduardo Reis Rosa
 
Mina-Adel-Fahmy-Iskander
Mina Adel
 
Using galera replication to create geo distributed clusters on the wan
Sakari Keskitalo
 
Wilson_Karen_Gyrphon
Karen Wilson
 
TomBertlingVNH
Jessica Roos
 
Slidos
stanos8810
 
la amistad
cristiancoboss
 
Using galera replication to create geo distributed clusters on the wan
Sakari Keskitalo
 
POLAPRAGADA-THESIS
Chaitanya Polapragada
 
Mindfulness in business
Dara Handelman
 
Italy Cross Cultural paper
Bridget Lutz
 
Ad

Similar to Codership's galera cluster installation and quickstart webinar march 2016 (20)

PPT
Galera webinar migration to galera cluster from my sql async replication
Codership Oy - Creators of Galera Cluster
 
PPTX
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
thelabdude
 
DOCX
OTRS
Muhammad Qazi
 
PDF
Mastering VMware Datacenter Part-1
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
PDF
MySQL on Docker and Kubernetes
Balasubramanian Kandasamy
 
PPTX
Build MySQL virtual enviroment
Taras Vasylyuk
 
PPTX
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Leighton Nelson
 
PPT
EM12C High Availability without SLB and RAC
Secure-24
 
PDF
Oracle 11g R2 RAC setup on rhel 5.0
Santosh Kangane
 
PDF
Elastic101tutorial Percona Live Europe 2018
Alex Cercel
 
PDF
Elastic 101 tutorial - Percona Europe 2018
Antonios Giannopoulos
 
PDF
An introduction to Apache Hive CI and QA
Stamatis Zampetakis
 
PDF
Test complex database systems in your laptop with dbdeployer
Giuseppe Maxia
 
PPT
les_02.ppt of the Oracle course train_2 file
YulinLiu27
 
PDF
Dbdeployer
Giuseppe Maxia
 
PPTX
Room 1 - 6 - Trần Quốc Sang - Autoscaling for multi cloud platform based on S...
Vietnam Open Infrastructure User Group
 
PDF
les03.pdf
VAMSICHOWDARY61
 
PDF
Dbdeployer, the universal installer
Giuseppe Maxia
 
DOCX
Install elasticsearch, logstash and kibana
Chanaka Lasantha
 
PDF
Commit to excellence - Java in containers
Red Hat Developers
 
Galera webinar migration to galera cluster from my sql async replication
Codership Oy - Creators of Galera Cluster
 
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
thelabdude
 
Mastering VMware Datacenter Part-1
M.M.Rahman Munna, Linux, VMware and Mail Server Expert
 
MySQL on Docker and Kubernetes
Balasubramanian Kandasamy
 
Build MySQL virtual enviroment
Taras Vasylyuk
 
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Leighton Nelson
 
EM12C High Availability without SLB and RAC
Secure-24
 
Oracle 11g R2 RAC setup on rhel 5.0
Santosh Kangane
 
Elastic101tutorial Percona Live Europe 2018
Alex Cercel
 
Elastic 101 tutorial - Percona Europe 2018
Antonios Giannopoulos
 
An introduction to Apache Hive CI and QA
Stamatis Zampetakis
 
Test complex database systems in your laptop with dbdeployer
Giuseppe Maxia
 
les_02.ppt of the Oracle course train_2 file
YulinLiu27
 
Dbdeployer
Giuseppe Maxia
 
Room 1 - 6 - Trần Quốc Sang - Autoscaling for multi cloud platform based on S...
Vietnam Open Infrastructure User Group
 
les03.pdf
VAMSICHOWDARY61
 
Dbdeployer, the universal installer
Giuseppe Maxia
 
Install elasticsearch, logstash and kibana
Chanaka Lasantha
 
Commit to excellence - Java in containers
Red Hat Developers
 

Recently uploaded (20)

PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Exploring AI Agents in Process Industries
amoreira6
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Presentation about variables and constant.pptx
safalsingh810
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 

Codership's galera cluster installation and quickstart webinar march 2016

  • 1. Galera Cluster Installation And Quick Start Philip Stoev Codership Oy
  • 2. 2 Codership Established 2007 (Galera development started) 3 co-founder engineers: Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect Team have developed three MySQL cluster software earlier. Based on: http://www.dsn.jhu.edu/~yairamir/Yair_phd.pdf http://www.inf.usi.ch/faculty/pedone/Paper/199x/These-2090-Pedone.pdf Product: Galera Cluster for MySQL, open source Thousands of users in e-commerce, telecom, gaming, insurance, betting healthcare, media, marketing, advertising, travel, universities, software-as-service, Paas, Iaas, etc Galera Cluster is included and will be included in Linux and OpenStack distros
  • 3. 3 Galera Cluster variants API MySQL Coderhips’s Galera Replication plugin API Percona Server API MariaDB merge merge Percona calls Galera Percona XtraDB Cluster Galera Cluster for MySQL by Codership MariaDB calls Galera MariaDB Galera Cluster or MariaDB Enterprise Cluster
  • 4. Agenda • A very quick overview of Galera Cluster • Adding the Galera package repository • Installing packages • Creating a configuration file • Bootstrapping a 3-node cluster • Monitoring
  • 5. Galera Cluster Overview Synchronous – each transaction is immediately replicated on all nodes at commit – no stale slaves Multi-Master – read from and write to any node – automatic transaction conflict detection Replication – a copy of the entire dataset is available on all nodes – new nodes can join automatically For MySQL – based on a modified version of MySQL (5.5, 5.6 with 5.7 coming up) – InnoDB storage engine
  • 6. And more … • Recovers from node failures within seconds • Data consistency protections – avoids reading stale data – prevents unsafe data modifications • WAN support – nodes can be on different continents – end-to-end encryption – optimized communication with least latency
  • 7. Package Installation (CentOS, RHEL) 1. Remove existing MySQL server packages 2. Configure the Galera Cluster repository Add a .repo file in /etc/yum.repos.d/: [galera] name = Galera baseurl = http://releases.galeracluster.com/centos/7/x86_64 gpgkey = http://releases.galeracluster.com/GPG-KEY-galeracluster.com gpgcheck = 1 (note distribution name and release number are specified) 1. Install Galera Cluster Packages yum –y upgrade mysql-wsrep-shared-5.6 yum –y install galera-3 mysql-wsrep-5.6
  • 8. Preparing the System • Nodes should have identical hardware • Firewall ports to open: 3306, 4567, 4568, 4444 • Disable SELinux – a policy can be created and enabled later
  • 9. The my.cnf Configuration File • All Galera configuration is in my.cnf • Keep the my.cnf files on all nodes identical • InnoDB settings are important optimize individual nodes as you normally would: – InnoDB buffer size – InnoDB log file size • Galera-specific settings: default_storage_engine=InnoDB binlog_format=ROW innodb_autoinc_lock_mode=2 wsrep_provider=/usr/lib64/galera-3/libgalera_smm.so wsrep_cluster_address="gcomm://node1,node2,node3... "
  • 10. Bootstrap 1. Start first node with –wsrep-new-cluster: sudo service mysql start --wsrep-new-cluster 1. Confirm a single-node cluster: SHOW STATUS LIKE 'wsrep_%' | wsrep_cluster_status | Primary | | wsrep_cluster_size | 1 | 1. Start all other nodes normally sudo service mysql start 1. Confirm nodes have joined: SHOW STATUS LIKE 'wsrep_%' | wsrep_cluster_size | 3 |
  • 11. Monitoring Traditional MySQL monitoring methods are used: • SHOW STATUS • SHOW PROCESSLIST • The MySQL error log – all Galera messages go there • Queries against INFORMATION_SCHEMA
  • 12. SHOW STATUS • Node health variables: – wsrep_ready = ON – wsrep_cluster_size – wsrep_cluster_status = Primary – wsrep_local_status = Synced • Replication health variables: – wsrep_flow_control_paused < 0.05 – wsrep_local_bf_aborts + wsrep_local_cert_failures (do not forget periodic FLUSH STATUS)
  • 13. SHOW PROCESSLIST • Queries to watch out for: – long “Query end” phase • replication takes place during that phase – long-running DDL • under default settings may block cluster
  • 14. INFORMATION_SCHEMA • Avoid non-InnoDB tables: SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE != 'InnoDB' AND TABLE_SCHEMA NOT IN ('mysql','performance_schema', 'information_schema'); • Avoid tables with no primary key: SELECT T.TABLE_SCHEMA, T.TABLE_NAME FROM information_schema.tables AS T WHERE (table_schema, table_name) NOT IN (SELECT table_schema, table_name FROM information_schema.table_constraints AS C WHERE T.table_name = C.table_name AND T.table_schema = C.table_schema ) AND table_schema NOT IN ('mysql','information_schema','performance_schema');