Various MySQL High Availability (HA) Solutions

Similar documents
MySQL HA vs. HA. DOAG Konferenz 2016, Nürnberg. Oli Sennhauser. Senior MySQL Consultant, FromDual GmbH.

FromDual Annual Company Meeting

MySQL Database Scalability

Percona XtraDB Cluster powered by Galera. Peter Zaitsev CEO, Percona Slide Credits: Vadim Tkachenko Percona University, Washington,DC Sep 12,2013

Percona XtraDB Cluster

MySQL Replication. Rick Golba and Stephane Combaudon April 15, 2015

Choosing a MySQL HA Solution Today. Choosing the best solution among a myriad of options

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia

MySQL Architecture Design Patterns for Performance, Scalability, and Availability

Xtrabackup in a nutshell

Percona XtraDB Cluster MySQL Scaling and High Availability with PXC 5.7 Tibor Korocz

Choosing a MySQL HA Solution Today

The Hazards of Multi-writing in a Dual-Master Setup

Choosing a MySQL High Availability Solution. Marcos Albe, Percona Inc. Live Webinar June 2017

MySQL HA Solutions. Keeping it simple, kinda! By: Chris Schneider MySQL Architect Ning.com

Using MySQL for Distributed Database Architectures

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

Which technology to choose in AWS?

Performance comparisons and trade-offs for various MySQL replication schemes

High Availability Solutions for the MySQL Database

MySQL High Availability Solutions. Alex Poritskiy Percona

MySQL usage of web applications from 1 user to 100 million. Peter Boros RAMP conference 2013

MySQL High Availability

Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

MySQL HA Solutions Selecting the best approach to protect access to your data

HA for OpenStack: Connecting the dots

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

MySQL InnoDB Cluster. New Feature in MySQL >= Sergej Kurakin

Future-Proofing MySQL for the Worldwide Data Revolution

MySQL Architecture Options:

Beyond MySQL 5.1 What is happening in MySQL Space. Feb 16, 2011 Percona Live San Francisco,CA by Peter Zaitsev, Percona Inc

Switching to Innodb from MyISAM. Matt Yonkovit Percona

Building a Scalable Architecture for Web Apps - Part I (Lessons Directi)

Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution

MySQL Replication Advanced Features In 20 minutes

Percona Live Europe 2016 Use ProxySQL to Improve Your MySQL High Availability Solution Marco Tusa Manager Consulting Amsterdam, Netherlands October 3

Galera in MariaDB 10.4 State of the Art and Plans

How to evaluate which MySQL High Availability solution best suits you

MariaDB 10.3 MySQL with PL/SQL

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona

Geographically Dispersed Percona XtraDB Cluster Deployment. Marco (the Grinch) Tusa September 2017 Dublin

A Guide to Architecting the Active/Active Data Center

MySQL Multi-Site/Multi-Master Done Right

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

What s new in Percona Xtradb Cluster 5.6. Jay Janssen Lead Consultant February 5th, 2014

Lessons from database failures

Choosing a MySQL HA Solution. Ernie Souhrada, Senior Consultant Webinar Presentation 05 June 2013

Building Highly Available and Scalable Real- Time Services with MySQL Cluster

Migrating to XtraDB Cluster 2014 Edition

Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More

Use Cases for Partitioning. Bill Karwin Percona, Inc

G a l e r a C l u s t e r Schema Upgrades

MySQL Cluster An Introduction

Matthias Wobben working in Berlin, Germany. Senior Sales Engineer at Nextcloud

MySQL InnoDB Cluster. MySQL HA Made Easy! Miguel Araújo Senior Software Developer MySQL Middleware and Clients. FOSDEM 18 - February 04, 2018

Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011

MySQL Cluster for Real Time, HA Services

State of the Dolphin Developing new Apps in MySQL 8

Upgrading MySQL Best Practices. Apr 11-14, 2011 MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

MySQL In the Cloud. Migration, Best Practices, High Availability, Scaling. Peter Zaitsev CEO Los Angeles MySQL Meetup June 12 th, 2017.

Multi-Data Center MySQL with Continuent Tungsten

Exploring the replication in MongoDB. Date: Oct

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar

<Insert Picture Here> Oracle Coherence & Extreme Transaction Processing (XTP)

Percona XtraDB Cluster

Migrating to Aurora MySQL and Monitoring with PMM. Percona Technical Webinars August 1, 2018

Understanding Percona XtraDB Cluster 5.7 Operation and Key Algorithms. Krunal Bauskar PXC Product Lead (Percona Inc.)

Kenny Gryp. Ramesh Sivaraman. MySQL Practice Manager. QA Engineer 2 / 60

Performance improvements in MySQL 5.5

Enterprise Open Source Databases

Running MySQL on AWS. Michael Coburn Wednesday, April 15th, 2015

~3333 write ops/s ms response

Architecture and Design of MySQL Powered Applications. Peter Zaitsev CEO, Percona Highload Moscow, Russia 31 Oct 2014

MySQL Replication Update

ProxySQL - GTID Consistent Reads. Adaptive query routing based on GTID tracking

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

Mysql Cluster Global Schema Lock

MySQL As A Service. Operationalizing 19 Years of Infrastructure at GoDaddy

High Availability Overview Paper

Tips from the Trenches Preventing downtime for the over extended DBA. Andrew Moore Senior Remote DBA Percona Managed Services

Real-time Replication in the Real World. Richard E. Baum C. Thomas Tyler

MySQL for Database Administrators Ed 4

High availability with MariaDB TX: The definitive guide

How Facebook Got Consistency with MySQL in the Cloud Sam Dunster

SCALABLE DATABASES. Sergio Bossa. From Relational Databases To Polyglot Persistence.

What s New in MySQL and MongoDB Ecosystem Year 2017

App Engine: Datastore Introduction

Jailbreaking MySQL Replication Featuring Tungsten Replicator. Robert Hodges, CEO, Continuent

Introduction to MySQL InnoDB Cluster

High Noon at AWS. ~ Amazon MySQL RDS versus Tungsten Clustering running MySQL on AWS EC2

Setting up Multi-Source Replication in MariaDB 10.0

MySQL Reference Architectures for Massively Scalable Web Infrastructure

Maximizing MySQL Availability, Data Integrity, Performance, and Scalability

Scaling Without Sharding. Baron Schwartz Percona Inc Surge 2010

Amazon AWS and RDS, moving towards it. Dimitri Vanoverbeke Solution Percona

Percona XtraDB Cluster ProxySQL. For your high availability and clustering needs

Everything You Need to Know About MySQL Group Replication

MySQL Cluster (NDB) An Introduc+on and Overview. Ma3hew Boehm April

Mix n Match Async and Group Replication for Advanced Replication Setups. Pedro Gomes Software Engineer

Transcription:

Various MySQL High Availability (HA) Solutions Percona Live MySQL Conference, London, Oct 24 th and 25 th, 2011 Oli Sennhauser Senior MySQL Consultant at FromDual GmbH oli.sennhauser@fromdual.com www.fromdual.com 1

About FromDual GmbH (LLC) FromDual provides neutral and independent: Consulting for MySQL (on-site and remote) Remote-DBA Services / MySQL Operations Premium Support (ex. MySQL Basic and Silver) Training for MySQL Consulting partner of the Open Database Alliance (ODBA.org) Oracle Silver Partner (OPN) More information you can find at: http://www.fromdual.com www.fromdual.com 2

Contents Various MySQL High Availability (HA) Solutions MySQL Replication / MySQL Scale-Out High-Availability with Replication Master-Master Replication Active/passive fail-over with SAN Active/passive fail-over with DRBD Galera (synchronous) Replication MySQL Cluster Tungsten Replicator www.fromdual.com 3

MySQL Scale-Out vs Scale-Up Scale-Up Costs MySQL Design Physical bottlenecks Relaxation of Constraints Scale-Out www.fromdual.com 4

High-Availability with Replication read only Application VIP r t w Slave M Master async! Slave Reporting Slave Backup Slave 1 Slave 2 Slave 3... Fail-over? Load balancer www.fromdual.com 5

Replication fail-over read only Application VIP r t w Slave M Master async! Slave Reporting Slave Backup Slave 1 Slave 2 Slave 3... Load balancer www.fromdual.com 6

Advantages / Disadvantages Simple standard Set-up Master is a SpoF! (Single Point of Failure) If master fails which Slave becomes new master? Switch a lot of work, delicate! There are tools to help (MMM v1/v2, MHA, Tungsten,...) Fail-over Site is already warm/hot! Works very well if r >> w Data inconsistencies (mk-table-check/sync) Delay Master/Slave Slave lagging (Slave as bottleneck) www.fromdual.com 7

Master-Master Replikation App App App VIP M 1 M 2 Slave 1 Slave 2 Slave 3 Slave Backup Load balancer (LB) www.fromdual.com 8

Master-Master Replication App App App VIP M 1 M 2 Slave 1 Slave 2 Slave 3 Slave Backup Load balancer (LB) www.fromdual.com 9

Advantages / Disadvantages Only slightly more complex than Master/Slave Careful when writing on both Masters! For a balanced system at least 2 Slaves are needed You will NOT get more I/O throughput! Data in-consitency possible because of asynchronous replication Fail-over Site is already warm/hot! Works very well if r >> w Data inconsistencies (mk-table-check/sync) If Master fails, half of the Slave are out of sync! A little more complicated to (re-)set-up Delay Master/Slave Slave lagging (Slave as bottleneck) www.fromdual.com 10

Active/passive fail-over with SAN App App App VIP M ' M SAN Slave 1 Slave 2 Slave 3 Load balancing (LB) www.fromdual.com 11

Active/passive fail-over with SAN SPOF! App App App VIP M ' M!!! SAN Slave 1 Slave 2 Slave 3 Load balancing (LB) www.fromdual.com 12

Advantages / Disadvantages Synchronous replication I/O throughput depends on SAN (I/O system) No data IN-consistencies possible SAN is a SpoF! Expensive if SAN is not available yet. SAN's are not easy to handle! Fail-over Site is still cold! Half of the hardware is idling Only one possible Data source Slaves are automatically and properly fail-overed Far more complex to set-up www.fromdual.com 13

Active/passive fail-over with DRBD App App App VIP M ' M Poor man's SAN DRBD Slave 1 Slave 2 Slave 3 Load balancing (LB) www.fromdual.com 14

Active/passive fail-over with DRBD App App App VIP M ' M DRBD Slave 1 Slave 2 Slave 3 Load balancing (LB) www.fromdual.com 15

Advantages / Disadvantages Synchronous replication No data IN-consistencies possible I/O throughput lower Slaves are automatically and properly failovered Fail-over Site is still cold! Half of the hardware is idling Only one possible Data source Far more complex to set-up www.fromdual.com 16

Galera (synchronous) Replication App App App Load balancing (LB) Node 1 Node 2 Node 3 wsrep wsrep wsrep Galera replication www.fromdual.com 17

Galera (synchronous) Replication App App App Load balancing (LB) Node 1 Node 2 Node 3 wsrep wsrep wsrep Galera replication www.fromdual.com 18

Advantages / Disadvantages Synchronous replication Based on InnoDB SE (other SE theoretically possible) Active-active real multi-master topology Read and write to any cluster node Automatic membership control True parallel replication, on row level No slave lag No lost transactions Read AND write scalability (Read Scale-Out!) Patch off MySQL binaries (Codership provides binaries) Be aware of Hot Spots on rows Higher probability of dead locks Full sync blocks for writing 3 nodes Initial sync for very big databases (>>50 Gbyte) with mysqldump www.fromdual.com 19

MySQL Cluster App App App Load balancing (LB) SQL nodes MySQL Server MySQL Server MySQL Server MGM client mgmd ndbd NDB Cluster (Data nodes) ndbd MGM client mgmd Data nodes / Mgmt nodes ndbd ndbd www.fromdual.com 20

Advantages / Disadvantages Synchronous replication No data IN-consistencies possible Extremely high throughput (if done correctly) Good for read AND write New beast to tame (MySQL Cluster!= MySQL!) More complex to set-up and operate than normal MySQL Not for disaster fail-over (<= 7.1) Bad for complex queries (Joins, <= 7.1) At least 3 machines (better 4) are need. High demand on RAM and Network Only one possible Data source www.fromdual.com 21

Tungsten Replicator www.fromdual.com 22

Advantages / Disadvantages Similar to MySQL Replication Introduces Global Transaction-ID Asynchronous Replication Bases on MySQL Binary Log For: MySQL, PostgreSQL, Oracle and Drizzle Requires Java and Ruby? Multi Source Replication Failover should be easier to handle www.fromdual.com 23

Questions? Discussion? www.fromdual.com 24