SlideShare a Scribd company logo
© SkySQL Corporation Ab. Company Confidential.09/06/2014
© SkySQL Corporation Ab. Company Confidential.
High Availability with MariaDB Enterprise
Stephane Varoqui
Professional Services, SkySQL
* *09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Agenda
❏ Introduction to High Availability
❏ Different services that need HA
❏ Different components of High Availability
❏ Different MariaDB HA Solutions
❏ HA using MariaDB Replication
❏ HA using MariaDB Galera Cluster
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Introduction to High Availability
High availability is a system design
protocol and associated
implementation that ensures a certain
degree of operational continuity during
a given measurement period
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Introduction to High Availability
09/06/2014
❏ High Availability != Long Uptime
“up” might still not be accessible
“down” just once, but for a long time
❏ High Availability rather means
Long Mean Time Between Failures (MTBF)
Short Mean Time To Recover (MTTR)
© SkySQL Corporation Ab. Company Confidential.
Introduction to High Availability
❏ Availability level is measured as the ratio of time
the system is available over a year, expressed as a
percentage
❏ 99.9% availability means that the system is available
at least 8751 of 8760 hours in a year, or that it is
unavailable at the most 9 hours per year
❏ 99.999% availability means that the system is
available at least 525595 or 525600 minutes in a
year, or that it is unavailable at the most 5 minutes
per year
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Maintaining High Availability
❏ There are two common situations that we try to
protect ourselves from using an HA solution
❏ Datacenter failure – A whole datacenter
becomes unavailable for some reason, like
power failure, network failure, a virus or similar
situations
❏ Server failure – An individual
server fails because of a
hardware failure or something
similar
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Layers in HA Solution
❏ All services that make up the application stack
needs HA for the system to achieve HA
Web servers
Application servers
Applications
Database servers
Storage
Network
09/06/2014
TCO for
Unbreakable
Hardware
© SkySQL Corporation Ab. Company Confidential.
Services in an HA Solution
❏ Of the different types of services, there are
two types
Stateless services
These servers has no state beyond the current operation. If such a
server fails, another server of the same type can replace it without
having to transfer any set of data. Webservers and application
servers are typical stateless services
Stateful services
These services maintains a state, and that state needs to be
preserved if a server fails, and has to be made available to any
other server that takes it place. A database service such as a
MariaDB server is a typical stateful service
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Components of High Availability
❏ Monitoring and Management
Availability of the services needs to be monitored, to be able
to take action when there is a failure.
A failover can be manual or automatic, but it has to be
managed
❏ Failover / Load Balancing mechanism
Some mechanism to redirect traffic from the failed server or
Datacenter and to a working one
❏ Data redundancy
For stateful services, we need to make sure that data is
somehow made redundant
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Monitoring and Management
❏ There are many different solutions here, some
focused on specific services (in particular
database), some as part of a Load Balancing
software solution of an Appliance or a pure
software based solution such as LinuxHA,
HaProxy, MaxScale, Mha
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Failover mechanism
❏ There is a wide range of options here too, in
particular when it comes to Datacenter
failover, which can be more complicated
❏ Common mechanisms range from application
based failover and DNS failover to Load
Balancing and Network Failover
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Data Redundancy
❏ Providing Data Redundancy is complex, error
prone and takes a toll on performance
❏ It also has to be mentioned that a SAN does
not provide redundancy just because a disk
set can be failed over from one server to
another. A SAN might be a SPOF, but in some
cases that is a risk that some customers is
willing to take
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Data Redundancy with MariaDB
❏ MariaDB Internal Replication
❏ Assync
❏ Semi-sync
❏ Sync per table with spider
❏ MariaDB Galera Cluster
❏ Storage based redundancy (Active / Passive setups)
❏ DRBD (Distributed Replicated Block Device)
❏ SAN (Storage Area Network)
❏ VMWare replication
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB Replication
❏ In many cases best solution
❏ Well known and easy to use technology
❏ The cluster is very loosely coupled, not all nodes are
aware of all the other nodes for example it’s self healing
solution, no sensibility to network latency, and
replication node speed (hardware variability)
❏ Offer the lowest master performance impact so far
❏ Multi node read scalability with best possible query
latency, network data distribution still slow vs in memory
scale up (photonic bus & memory is for 2020)
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB Replication
❏ In many cases the best solution
❏ Logical replication no corruption propagated
❏ Various topologies using multi source , storage engine
switching, multi master , peer to peer
❏ Row vs Statement for strong network compression
❏ MariaDB fixing the gotcha
❏ Parallel replication , group commit, checksum, heartbeat
❏ Can be extended with per session consistency using
GTID_POS_WAIT
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
HA MariaDB Replication GTID
SET GLOBAL GTID_SLAVE_POS = BINLOG_GTID_POS("master-bin.00024", 1600);
CHANGE MASTER TO master_host="10.2.3.4", master_use_gtid=slave_pos; START SLAVE;
CHANGE MASTER TO master_host="10.2.3.5";
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB Replication
❏ Replication gotcha
❏ Can lose data on master crash without semi-sync and
semi sync performance should be address in next release
❏ Adding a slave stay manual and complex (MyISAM)
❏ Failover is more complex, found the most up to date
slave, depends external product like MHA and scripting
to LB or HA solutions (maxscale can fix)
❏ Automatic Strong consistency (maxscale can fix)
❏ No map reduce queries (spider temporary table can fix)
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB
❏ This a software-only solution
09/06/2014
MariaDB Server MariaDB Server MariaDB Server
Galera wsrep Library Galera wsrep Library Galera wsrep Library
Synchronous Replication
Load Balancer / Failover
Application / Application server
© SkySQL Corporation Ab. Company Confidential.
Installing MariaDB
❏ MariaDB Galera Cluster consists of separate MariaDB binary
that in turns talks to the Galera wsrep library
❏ Once set up, Galera is configured using the usual my.cnf file,
and is monitored using the SHOW GLOBAL STATUS
command
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB
09/06/2014
❏ Scales reads
❏ Limited impact on concurrent writes, despite long
distance network latency
❏ Proper Cluster with easy failover, optimistic locking, split-
brain protection, no possible data lost on failover
❏ Synchronous replication with low overhead due to
optimistic locking , paxos queue, parallel event replication
❏ Transparent provisioning
❏ Galera best point
© SkySQL Corporation Ab. Company Confidential.
HA using MariaDB
09/06/2014
❏ InnoDB only solution
❏ Network architecture reliability
❏ Local Committed Read only (select for update)
❏ Deadlock error prone
❏ Galera dark side
For transactional scenarios it may still
need read write splitting !
© SkySQL Corporation Ab. Company Confidential.
Failover with MariaDB
❏ MariaDB Galera Cluster handles failed servers internally
provide a status, that tells about membership of the cluster
❏ MariaDB Galera Cluster also handles split-brain protection
and this requires at least 3 servers
❏ MariaDB Galera Cluster can also be configured without
split-brain protection, for example when failover is manual
or is handled in some other way
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Setting up MariaDB
❏ Necessary to allow for protection against split-brain
scenarios, but only using 2 database servers, a third server
can be set up with a Galera specific arbitration agent (grbd)
❏ Galera also can be used with it’s own simple Load Balancer,
(glb) , auto detect new nodes, although it is much more
common that other technologies are used, such as HA aware
Connectors or a Load Balancer, in this case use a backup
policy and no load balancing for write
❏ For advance setup without application control, auto
balancing reads and write to a single node we advise you to
try out our maxscale proxy
09/06/2014
© SkySQL Corporation Ab. Company Confidential.
Questions?
09/06/2014

More Related Content

PPTX
Maria DB Galera Cluster for High Availability
PDF
Choosing a MySQL High Availability solution - Percona Live UK 2011
PDF
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
PPTX
MariaDB Galera Cluster
PDF
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
PDF
MySQL High Availability Solutions
PDF
MySQL highav Availability
PPTX
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...
Maria DB Galera Cluster for High Availability
Choosing a MySQL High Availability solution - Percona Live UK 2011
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
MariaDB Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
MySQL High Availability Solutions
MySQL highav Availability
Choosing between Codership's MySQL Galera, MariaDB Galera Cluster and Percona...

What's hot (20)

PPTX
Tips to drive maria db cluster performance for nextcloud
PPTX
Running MariaDB in multiple data centers
PDF
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
PDF
MariaDB Galera Cluster - Simple, Transparent, Highly Available
PDF
Webinar slides: Introduction to Database Proxies (for MySQL)
PPTX
MySQL Multi Master Replication
PPTX
MySQL Options in OpenStack
PDF
Running Galera Cluster on Microsoft Azure
PDF
MariaDB on Docker
PDF
Methods of Sharding MySQL
PDF
Using and Benchmarking Galera in different architectures (PLUK 2012)
PDF
Galera Cluster 4 for MySQL 8 Release Webinar slides
PDF
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
PPTX
Deploying MariaDB databases with containers at Nokia Networks
PDF
MySQL InnoDB Cluster and NDB Cluster
PDF
High Performance Drupal with MariaDB
PPTX
Skalierbarkeit mit MariaDB und MaxScale - MariaDB Roadshow Summer 2014 Hambur...
PDF
Galera Cluster 4 presentation at Percona Live Austin 2019
PPTX
MariaDB High Availability
PDF
Mysql User Camp : 20-June-14 : Mysql Fabric
Tips to drive maria db cluster performance for nextcloud
Running MariaDB in multiple data centers
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
MariaDB Galera Cluster - Simple, Transparent, Highly Available
Webinar slides: Introduction to Database Proxies (for MySQL)
MySQL Multi Master Replication
MySQL Options in OpenStack
Running Galera Cluster on Microsoft Azure
MariaDB on Docker
Methods of Sharding MySQL
Using and Benchmarking Galera in different architectures (PLUK 2012)
Galera Cluster 4 for MySQL 8 Release Webinar slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
Deploying MariaDB databases with containers at Nokia Networks
MySQL InnoDB Cluster and NDB Cluster
High Performance Drupal with MariaDB
Skalierbarkeit mit MariaDB und MaxScale - MariaDB Roadshow Summer 2014 Hambur...
Galera Cluster 4 presentation at Percona Live Austin 2019
MariaDB High Availability
Mysql User Camp : 20-June-14 : Mysql Fabric
Ad

Similar to High Availability with MariaDB Enterprise (20)

PPTX
Hochverfügbarkeit mit MariaDB Enterprise - MariaDB Roadshow Summer 2014 Hambu...
PDF
High Availability with MariaDB Enterprise
PDF
The MySQL High Availability Landscape and where Galera Cluster fits in
PDF
Best Practice for Achieving High Availability in MariaDB
PDF
Choosing a MySQL High Availability Solution.pdf
PDF
02 2017 emea_roadshow_milan_ha
PDF
MariaDB High Availability Webinar
PDF
Choosing the right high availability strategy
PDF
M|18 Choosing the Right High Availability Strategy for You
PDF
Using all of the high availability options in MariaDB
PDF
Choosing the right high availability strategy
PDF
High-level architecture of a complete MariaDB deployment
PDF
Breda Development Meetup 2016-06-08 - High Availability
PDF
Become a MySQL DBA - webinar series - slides: Which High Availability solution?
PDF
Best practices for MySQL High Availability Tutorial
PDF
Choosing the right high availability strategy
PDF
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
PDF
mariadb-platform-high-availability-guide_whitepaper_1001.pdf
PDF
High Availability in GCE
PDF
Pl2017 High Availability in GCE
Hochverfügbarkeit mit MariaDB Enterprise - MariaDB Roadshow Summer 2014 Hambu...
High Availability with MariaDB Enterprise
The MySQL High Availability Landscape and where Galera Cluster fits in
Best Practice for Achieving High Availability in MariaDB
Choosing a MySQL High Availability Solution.pdf
02 2017 emea_roadshow_milan_ha
MariaDB High Availability Webinar
Choosing the right high availability strategy
M|18 Choosing the Right High Availability Strategy for You
Using all of the high availability options in MariaDB
Choosing the right high availability strategy
High-level architecture of a complete MariaDB deployment
Breda Development Meetup 2016-06-08 - High Availability
Become a MySQL DBA - webinar series - slides: Which High Availability solution?
Best practices for MySQL High Availability Tutorial
Choosing the right high availability strategy
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
mariadb-platform-high-availability-guide_whitepaper_1001.pdf
High Availability in GCE
Pl2017 High Availability in GCE
Ad

More from MariaDB Corporation (20)

PPTX
MaxScale - The Pluggable Router
PPTX
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
PDF
Automatisierung & Verwaltung von Datenbank - Clustern mit Severalnines - Mari...
PPTX
The New MariaDB Offering: MariaDB 10, MaxScale and More
PPTX
MaxScale - The Pluggibale Router MariaDB Roadshow 2014 Paris
PPTX
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014 F...
PPTX
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
PPTX
Galaxy Big Data with MariaDB
PDF
Automatisation et Gestion de Cluster de Bases de Données MariaDB Roadshow
PDF
Automation and Management of Database Clusters MariaDB Roadshow 2014
PDF
Automation and Management of Database Clusters
PDF
The New MariaDB Offering - MariaDB 10, MaxScale and more
PDF
MaxScale - The Pluggable Router
PDF
MariaDB 10 and Beyond
PDF
MaxScale - the pluggable router
PDF
CCM Escape Case Study - SkySQL Paris Meetup 17.12.2013
PPT
Galera cluster - SkySQL Paris Meetup 17.12.2013
PDF
MariaDB 10.0 - SkySQL Paris Meetup
PDF
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
PDF
MySQL & MariaDB - Innovation happens here - London Roadshow 2013
MaxScale - The Pluggable Router
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
Automatisierung & Verwaltung von Datenbank - Clustern mit Severalnines - Mari...
The New MariaDB Offering: MariaDB 10, MaxScale and More
MaxScale - The Pluggibale Router MariaDB Roadshow 2014 Paris
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014 F...
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
Galaxy Big Data with MariaDB
Automatisation et Gestion de Cluster de Bases de Données MariaDB Roadshow
Automation and Management of Database Clusters MariaDB Roadshow 2014
Automation and Management of Database Clusters
The New MariaDB Offering - MariaDB 10, MaxScale and more
MaxScale - The Pluggable Router
MariaDB 10 and Beyond
MaxScale - the pluggable router
CCM Escape Case Study - SkySQL Paris Meetup 17.12.2013
Galera cluster - SkySQL Paris Meetup 17.12.2013
MariaDB 10.0 - SkySQL Paris Meetup
High Availability with Galera Cluster - SkySQL Road Show 2013 in Berlin
MySQL & MariaDB - Innovation happens here - London Roadshow 2013

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
Reach Out and Touch Someone: Haptics and Empathic Computing
The AUB Centre for AI in Media Proposal.docx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

High Availability with MariaDB Enterprise

  • 1. © SkySQL Corporation Ab. Company Confidential.09/06/2014
  • 2. © SkySQL Corporation Ab. Company Confidential. High Availability with MariaDB Enterprise Stephane Varoqui Professional Services, SkySQL * *09/06/2014
  • 3. © SkySQL Corporation Ab. Company Confidential. Agenda ❏ Introduction to High Availability ❏ Different services that need HA ❏ Different components of High Availability ❏ Different MariaDB HA Solutions ❏ HA using MariaDB Replication ❏ HA using MariaDB Galera Cluster 09/06/2014
  • 4. © SkySQL Corporation Ab. Company Confidential. Introduction to High Availability High availability is a system design protocol and associated implementation that ensures a certain degree of operational continuity during a given measurement period 09/06/2014
  • 5. © SkySQL Corporation Ab. Company Confidential. Introduction to High Availability 09/06/2014 ❏ High Availability != Long Uptime “up” might still not be accessible “down” just once, but for a long time ❏ High Availability rather means Long Mean Time Between Failures (MTBF) Short Mean Time To Recover (MTTR)
  • 6. © SkySQL Corporation Ab. Company Confidential. Introduction to High Availability ❏ Availability level is measured as the ratio of time the system is available over a year, expressed as a percentage ❏ 99.9% availability means that the system is available at least 8751 of 8760 hours in a year, or that it is unavailable at the most 9 hours per year ❏ 99.999% availability means that the system is available at least 525595 or 525600 minutes in a year, or that it is unavailable at the most 5 minutes per year 09/06/2014
  • 7. © SkySQL Corporation Ab. Company Confidential. Maintaining High Availability ❏ There are two common situations that we try to protect ourselves from using an HA solution ❏ Datacenter failure – A whole datacenter becomes unavailable for some reason, like power failure, network failure, a virus or similar situations ❏ Server failure – An individual server fails because of a hardware failure or something similar 09/06/2014
  • 8. © SkySQL Corporation Ab. Company Confidential. Layers in HA Solution ❏ All services that make up the application stack needs HA for the system to achieve HA Web servers Application servers Applications Database servers Storage Network 09/06/2014 TCO for Unbreakable Hardware
  • 9. © SkySQL Corporation Ab. Company Confidential. Services in an HA Solution ❏ Of the different types of services, there are two types Stateless services These servers has no state beyond the current operation. If such a server fails, another server of the same type can replace it without having to transfer any set of data. Webservers and application servers are typical stateless services Stateful services These services maintains a state, and that state needs to be preserved if a server fails, and has to be made available to any other server that takes it place. A database service such as a MariaDB server is a typical stateful service 09/06/2014
  • 10. © SkySQL Corporation Ab. Company Confidential. Components of High Availability ❏ Monitoring and Management Availability of the services needs to be monitored, to be able to take action when there is a failure. A failover can be manual or automatic, but it has to be managed ❏ Failover / Load Balancing mechanism Some mechanism to redirect traffic from the failed server or Datacenter and to a working one ❏ Data redundancy For stateful services, we need to make sure that data is somehow made redundant 09/06/2014
  • 11. © SkySQL Corporation Ab. Company Confidential. Monitoring and Management ❏ There are many different solutions here, some focused on specific services (in particular database), some as part of a Load Balancing software solution of an Appliance or a pure software based solution such as LinuxHA, HaProxy, MaxScale, Mha 09/06/2014
  • 12. © SkySQL Corporation Ab. Company Confidential. Failover mechanism ❏ There is a wide range of options here too, in particular when it comes to Datacenter failover, which can be more complicated ❏ Common mechanisms range from application based failover and DNS failover to Load Balancing and Network Failover 09/06/2014
  • 13. © SkySQL Corporation Ab. Company Confidential. Data Redundancy ❏ Providing Data Redundancy is complex, error prone and takes a toll on performance ❏ It also has to be mentioned that a SAN does not provide redundancy just because a disk set can be failed over from one server to another. A SAN might be a SPOF, but in some cases that is a risk that some customers is willing to take 09/06/2014
  • 14. © SkySQL Corporation Ab. Company Confidential. Data Redundancy with MariaDB ❏ MariaDB Internal Replication ❏ Assync ❏ Semi-sync ❏ Sync per table with spider ❏ MariaDB Galera Cluster ❏ Storage based redundancy (Active / Passive setups) ❏ DRBD (Distributed Replicated Block Device) ❏ SAN (Storage Area Network) ❏ VMWare replication 09/06/2014
  • 15. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB Replication ❏ In many cases best solution ❏ Well known and easy to use technology ❏ The cluster is very loosely coupled, not all nodes are aware of all the other nodes for example it’s self healing solution, no sensibility to network latency, and replication node speed (hardware variability) ❏ Offer the lowest master performance impact so far ❏ Multi node read scalability with best possible query latency, network data distribution still slow vs in memory scale up (photonic bus & memory is for 2020) 09/06/2014
  • 16. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB Replication ❏ In many cases the best solution ❏ Logical replication no corruption propagated ❏ Various topologies using multi source , storage engine switching, multi master , peer to peer ❏ Row vs Statement for strong network compression ❏ MariaDB fixing the gotcha ❏ Parallel replication , group commit, checksum, heartbeat ❏ Can be extended with per session consistency using GTID_POS_WAIT 09/06/2014
  • 17. © SkySQL Corporation Ab. Company Confidential. HA MariaDB Replication GTID SET GLOBAL GTID_SLAVE_POS = BINLOG_GTID_POS("master-bin.00024", 1600); CHANGE MASTER TO master_host="10.2.3.4", master_use_gtid=slave_pos; START SLAVE; CHANGE MASTER TO master_host="10.2.3.5";
  • 18. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB Replication ❏ Replication gotcha ❏ Can lose data on master crash without semi-sync and semi sync performance should be address in next release ❏ Adding a slave stay manual and complex (MyISAM) ❏ Failover is more complex, found the most up to date slave, depends external product like MHA and scripting to LB or HA solutions (maxscale can fix) ❏ Automatic Strong consistency (maxscale can fix) ❏ No map reduce queries (spider temporary table can fix) 09/06/2014
  • 19. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB ❏ This a software-only solution 09/06/2014 MariaDB Server MariaDB Server MariaDB Server Galera wsrep Library Galera wsrep Library Galera wsrep Library Synchronous Replication Load Balancer / Failover Application / Application server
  • 20. © SkySQL Corporation Ab. Company Confidential. Installing MariaDB ❏ MariaDB Galera Cluster consists of separate MariaDB binary that in turns talks to the Galera wsrep library ❏ Once set up, Galera is configured using the usual my.cnf file, and is monitored using the SHOW GLOBAL STATUS command 09/06/2014
  • 21. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB 09/06/2014 ❏ Scales reads ❏ Limited impact on concurrent writes, despite long distance network latency ❏ Proper Cluster with easy failover, optimistic locking, split- brain protection, no possible data lost on failover ❏ Synchronous replication with low overhead due to optimistic locking , paxos queue, parallel event replication ❏ Transparent provisioning ❏ Galera best point
  • 22. © SkySQL Corporation Ab. Company Confidential. HA using MariaDB 09/06/2014 ❏ InnoDB only solution ❏ Network architecture reliability ❏ Local Committed Read only (select for update) ❏ Deadlock error prone ❏ Galera dark side For transactional scenarios it may still need read write splitting !
  • 23. © SkySQL Corporation Ab. Company Confidential. Failover with MariaDB ❏ MariaDB Galera Cluster handles failed servers internally provide a status, that tells about membership of the cluster ❏ MariaDB Galera Cluster also handles split-brain protection and this requires at least 3 servers ❏ MariaDB Galera Cluster can also be configured without split-brain protection, for example when failover is manual or is handled in some other way 09/06/2014
  • 24. © SkySQL Corporation Ab. Company Confidential. Setting up MariaDB ❏ Necessary to allow for protection against split-brain scenarios, but only using 2 database servers, a third server can be set up with a Galera specific arbitration agent (grbd) ❏ Galera also can be used with it’s own simple Load Balancer, (glb) , auto detect new nodes, although it is much more common that other technologies are used, such as HA aware Connectors or a Load Balancer, in this case use a backup policy and no load balancing for write ❏ For advance setup without application control, auto balancing reads and write to a single node we advise you to try out our maxscale proxy 09/06/2014
  • 25. © SkySQL Corporation Ab. Company Confidential. Questions? 09/06/2014