• Save
MariaDB Galera Cluster - Simple, Transparent, Highly Available
 

MariaDB Galera Cluster - Simple, Transparent, Highly Available

on

  • 3,745 views

MariaDB Galera Cluster Webinar by Ivan Zoratti on 13.11.2013. Also available as on demand webinar at ...

MariaDB Galera Cluster Webinar by Ivan Zoratti on 13.11.2013. Also available as on demand webinar at http://www.skysql.com/why-skysql/webinars/mariadb-galera-cluster-simple-transparent-highly-available

Statistics

Views

Total Views
3,745
Views on SlideShare
3,301
Embed Views
444

Actions

Likes
9
Downloads
0
Comments
0

2 Embeds 444

http://www.skysql.com 443
https://www.skysql.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

MariaDB Galera Cluster - Simple, Transparent, Highly Available MariaDB Galera Cluster - Simple, Transparent, Highly Available Presentation Transcript

  • MariaDB  Galera  Cluster Simple,  Transparent,  Highly  Available Ivan  Zora?,  CTO  -­‐  13.11.2013
  • Who  is  Ivan ?
  • SkySQL •Leading  provider  of  open  source   databases,  services  and   solutions •Home  for  the  founders  and  the   original  developers  of  the  core  of   MySQL •The  creators  of  MariaDB,  the   drop-­‐in,  innovative  replacement   of  MySQL PAGE   3
  • Agenda •Welcome  and  intro •Galera  Cluster  Short  Introduction •Cluster  Topologies •Automatic  Node  Joining  (SST  IST) •Galera  Project •Galera,  MariaDB  and  SkySQL PAGE   4
  • Intro  to  Galera  Cluster
  • Multi-Master Replication MySQL Galera Replication
  • Multi-Master Replication There can be several nodes MySQL MySQL Galera Replication
  • Multi-Master Replication There can be several nodes MySQL MySQL Galera Replication MySQL Automatic node provisioning
  • Multi-Master Replication Client can connect to any node There can be several nodes MySQL MySQL Galera Replication MySQL Automatic node provisioning
  • Multi-Master Replication read & write read & write read & write Read & write access to any node Client can connect to any node There can be several nodes MySQL MySQL Galera Replication MySQL Automatic node provisioning
  • Multi-Master Replication read & write read & write read & write Read & write access to any node Client can connect to any node There can be several nodes MySQL MySQL Galera Replication MySQL Automatic node provisioning Replication is synchronous
  • Multi-Master Replication read & write read & write read & write Multi-master cluster looks like one big database with multiple entry points MySQL
  • Synchronous Replication Transaction is processed locally up to commit time Read & write MySQL MySQL Galera Replication MySQL
  • Synchronous Replication Transaction is replicated to whole cluster commit MySQL MySQL a Galera Replication MySQL
  • Synchronous Replication Client gets OK status OK MySQL MySQL Galera Replication MySQL
  • Synchronous Replication Transaction is applied in slaves MySQL MySQL Galera Replication MySQL
  • How node failures are handled Load Balancing MySQL MySQL MySQL Galera Replication
  • Quorum Galera uses quorum based failure handling: – When cluster partitioning is detected, the majority partition "has quorum" and can continue – A minority partition cannot commit transactions, but will attempt to re-connect to primary partition – Load Balancing Note: 50% is not majority! => Minimum 3 nodes recommended. Load balancer will notice errors & remove node from pool MySQL MySQL MySQL Galera Replication
  • Optimistic Concurrency Control commit commit Trx A Trx B A B Galera Replication
  • Optimistic Concurrency Control ● ● ● Transactions process independently in each cluster node Transaction write sets will be replicated at commit time (before commit) Cluster wide conflicts will be resolved and conflict victim must rollback Optimistic Concurrency Control
  • Galera vs other HA solutions Solid SAN Galera RAC Data integrity DRBD Galera is like... NDB ● 99.999...% ● MySQL replication without integrity issues or slave lag DRBD/SAN without failover downtime and performance penalty ● ● Poor 99 % Slow MySQL replication Failover downtime Fast Oracle RAC without failover downtime NDB, but you get to keep InnoDB
  • Galera Cluster ➢ Synchronous multi-master cluster ➢ Each node full representative of DB ➢ No Single point of failure ➢ For MySQL+InnoDB ➢ 99.99% compatible ➢ 3 or more nodes needed for HA ➢ Automatic node provisioning ➢ Works in LAN / WAN / Cloud No Data Loss No Slave Lag No Failover
  • Cluster  Topologies
  • Cluster Topologies
  • WAN replication ● Works fine ● Use higher timeouts and send windows ● No impact on reads ● No impact within a transaction ● adds 100-300 ms to commit latency ● No major impact on tps ● Quorum between data centers –3 data centers – Distribute nodes evenly
  • WAN with MySQL asynchronous replication ● ● ● ● ● You can mix Galera replication and MySQL replication Good option on poor WAN Remember to watch out for slave lag, etc... "Channel failover" if a master node crashes Mixed replication useful when you want async slave (such as time-delayed, filtered, multi-source...)
  • Migrating to Galera Clustering MySQL master MySQL master slave hierarchy MySQL slave
  • Galera as MySQL Slave MySQL master Add Galera node as normal MySQL slave MySQL slave Galera Node 1
  • Galera as MySQL Slave MySQL master Join more nodes in Galera slave cluster MySQL slave Galera Node 1 Galera Node 2 Galera Node 3
  • Galera as MySQL Slave MySQL master Move traffic to Galera cluster MySQL slave Galera Node 1 Galera Node 2 Galera Node 3
  • Galera as MySQL Slave Drop obsolete MySQL servers Galera Node 1 Galera Node 2 Galera Node 3
  • Automatic  Node  Provisioning
  • State Transfer Joining node needs to get the current database state ➢ Two choices: ➢ IST: incremental state transfer ➢ SST: full state transfer ➢ If joining node has been part of cluster, and has some previous state, and gcache spans to that, then IST can be used ➢
  • State Snapshot Transfer To send full database state ●wsrep_sst_method to choose the method: ➢ mysqldump ➢ rsync ➢ xtrabackup ➢ write your own... ●
  • The  Galera  Project
  • Galera Project ● Galera Cluster for MySQL 5 years development ● Fully open source ● Based on MySQL Community Server ● Active community ● ● ~3 releases per year ● ● Latest release 3.0 MariaDB Galera Cluster
  • Galera Replicator on Launchpad 37
  • Galera 3.0 • WAN Replication support •Connections between cluster segments (previously it was between all the nodes) •Donors for State Transfer will be searched within the segment first •Weighted quorum calculation • Certification Keys refactoring •Reduced memory footprint •Faster key checks •Larger transactions can run in parallel 38
  • Galera 3.0 • GTID Support •MySQL Slaves will see Galera Cluster as one MySQL Master •Pre-ordered Replication •MySQL Replication events and Galera Replication events can be applied without conflicts 39
  • Who is using Galera?
  • Galera Support Galera Cluster MariaDB Galera Cluster SkySQL Support Subscriptions Codership Galera MontyProgram MariaDB, MySQL
  • SkySQL  Support,  Consulting  and  Training • • • The  best  services  and  support   from  the  original  developers   of  MySQL  and  Galera Customized  professional   services  that  adapt  to   customers’  needs,  from  the   smallest  to  the  largest   implementations On  site  and  public  training   classes  delivered  by  certified   trainers  who  have   implemented  Galera  in  many   organizations  worldwide PAGE   42
  • For  More  Information... • • • • • Information  on  Galera: www.galera.com Web,  Doc  &  Knowledge  Base: www.mariadb.org www.mariadb.com Launchpad: launchpad.net/maria launchpad.net/galera Jira  (bugs  and  development): mariadb.atlassian.net IRC: irc.freenode.net  #maria webchat.freenode.net/? randomnick=1&channels=maria PAGE   43
  • Thank  You! www.skysql.com ivan@skysql.com izoratti.blogspot.com www.slideshare.net/izoratti