Choosing a MySQL Replication & High Availability Solution

Slides:



Advertisements
Similar presentations
ScaleDB Transactional Shared Disk storage engine for MySQL
Advertisements

Replication for Availability & Durability with MySQL and Amazon RDS Grant McAlister.
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
Enterprise Job Scheduling for Clustered Environments Stratos Paulakis, Vassileios Tsetsos, and Stathes Hadjiefthymiades P ervasive C omputing R esearch.
1EMC CONFIDENTIAL—INTERNAL USE ONLY Overview of SQL Server 2012 High Availability and Disaster Recovery (HADR) Wei Fan Technical Partner Management – Microsoft.
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
NoSQL Databases: MongoDB vs Cassandra
1 © Copyright 2010 EMC Corporation. All rights reserved. EMC RecoverPoint/Cluster Enabler for Microsoft Failover Cluster.
© 2011 Citrusleaf. All rights reserved.1 A Real-Time NoSQL DB That Preserves ACID Citrusleaf Srini V. Srinivasan Brian Bulkowski VLDB, 09/01/11.
Keith Burns Microsoft UK Mission Critical Database.
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
National Manager Database Services
Running Your Database in the Cloud Eran Levin VP R&D - Xeround.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Word Wide Cache Distributed Caching for the Distributed Enterprise.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Copyright © 2013 NetEase 马进 app DDB introduce.
Implementing Multi-Site Clusters April Trần Văn Huệ Nhất Nghệ CPLS.
SQL-Server 2012 Always On.
Database Replication Policies for Dynamic Content Applications Gokul Soundararajan, Cristiana Amza, Ashvin Goel University of Toronto EuroSys 2006: Leuven,
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL Cluster Dive into the Latest Developments Andrew clusterdb.com.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
MODIFY THIS SLIDE FOR ACTUAL PRESENTER, DELETE THIS BAR AFTER MODIFICATION.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
1 Moshe Shadmon ScaleDB Scaling MySQL in the Cloud.
1 Yasin N. Silva Arizona State University This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
IMDGs An essential part of your architecture. About me
Copyright 2006 MySQL AB The World’s Most Popular Open Source Database MySQL Cluster: An introduction Geert Vanderkelen MySQL AB.
High-Availability MySQL DB based on DRBD-Heartbeat Ming Yue September 27, 2007 September 27, 2007.
© 2009 IBM Corporation Best Practices in making production - grade applications -A Performance Architect’s View Archanaa Panda, Bharathraj – IBM, HiPODS,
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
Achieving Scalability, Performance and Availability on Linux with Oracle 9iR2-RAC Grant McAlister Senior Database Engineer Amazon.com Paper
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
MySQL Overview Jed Reynolds Write Your Questions on the Board! Landscape, Engines, HA, Performance Questions.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
SQL Server High Availability Introduction to SQL Server high availability solutions.
William Durkin A Gourmet Menu of SQL Server High Availability Options.
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
OSCON How I learned to use SQL and then learned not to use it Henrik Ingo Froscon Please share and re-use this presentation,
MySQL HA An overview Kris Buytaert. ● Senior Linux and Open Source ● „Infrastructure Architect“ ● I don't remember when I started.
MySQL High Availability. Why High Availability Matters – Downtime is expensive – You miss $$$ – Your boss complains – New Users don't return.
USEIMPROVEEVANGELIZE Solutions for High Availability and Disaster Recovery with MySQL ● Detlef Ulherr ● Sun Microsystems.
1 Gaurav Kohli Xebia Breaking with DBMS and Dating with Relational Hbase.
Sponsors.
High Availability in SQL Server 2012
Scaling HDFS to more than 1 million operations per second with HopsFS
Cloud Computing and Architecuture
Introduction to VoltDB
Business Continuity for Virtual SQL Servers
High Availability 24 hours a day, 7 days a week, 365 days a year…
Secrets to Fast, Easy High Availability for SQL Server in AWS
Navigating the options for Data Redundancy
Disaster Recovery Where to Begin
AlwaysOn Mirroring, Clustering
Maximum Availability Architecture Enterprise Technology Centre.
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Group commit and related enhancements to the MariaDB binary log
Introduction to NewSQL
Alejandro Álvarez on behalf of the FTS team
SQL Server High Availability Amit Vaid.
Business Requirements
Disaster Recovery Where to Begin
Predictive Performance
Business Requirements
IST346: Scalability.
NoSQL databases An introduction and comparison between Mongodb and Mysql document store.
The Database World of Azure
Presentation transcript:

Choosing a MySQL Replication & High Availability Solution Henrik Ingo Senior Performance Architect Nokia Percona Live UK 2011-10-25 Please share and re-use this presentation, licensed under Creative Commons Attribution license. 2011-10-25

Senior Performance Architect, Nokia Henrik Ingo Senior Performance Architect, Nokia SOA: Each team does their own thing Nokia and web? App store, music store, Maps, SSO... 200M clients, 100M accounts Architecture reviews, "internal consultant" MySQL improvements: Recommend backup, HA, version etc... best practices open source technology and strategy specialist active in MySQL-forks, Drupal communities author of "Open Life: The Philosophy of Open Source" www.openlife.cc henrik.ingo@openlife.cc 2011-10-25

High Availability Performance Durability Clustering Replication Transactions / second (throughput) Response time (latency) Percentiles (95% - 99%) Speaking of databases Committed data is not lost D in ACID Get any response at all (tps > 0) Measured as percentile (99.999%) Replicas, snapshots point in time, backups High Availability Clustering Replication Monitoring Failover Redundancy 2011-10-25

Beyond system availability: Average downtime per user. Uptime Percentile target Max downtime per year 90% 36 days 99% 3.65 days 99.5% 1.83 days 99.9% 8.76 hours 99.99% 52.56 minutes 99.999% 5.26 minutes 99.9999% 31.5 seconds Beyond system availability: Average downtime per user. 2011-10-25

So we pick a HA solution and are done! ? MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 Tung sten Galera DRBD SAN NDB InnoDB Usability Performance Asynchronous Statement based Row based Semi-sync Synchronous Global trx id Multi threaded Clustering framework 2011-10-25

Ok, so what do I really want? MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 Tung sten Galera DRBD SAN NDB InnoDB + InnoDB We use InnoDB. We want to continue using InnoDB. Which solutions support InnoDB? NDB is it's own storage engine. It's great. It can blow away all others in a benchmark. But it's not InnoDB and is not considered here. 2011-10-25

MySQL level vs disk level replication Tung sten Galera DRBD SAN NDB InnoDB + Usability ++ - Performance (1) <.............. MySQL server level replication ............> < disk level ><engine> Higher level replication is better Competence: Replication = MySQL DBA can manage DRBD = Linux sysadmin can manage SAN = Nobody can manage Performance: SAN has higher latency than local disk DRBD has higher latency than local disk Replication has surprisingly little overhead Operations: Disk level = cold standby = long failover time Replication = hot standby = short failover time ++ for global trx id, easy provisioning Redundancy: Shared disk = Single Point of Failure Shared nothing = redundant = good 2011-10-25

Statement vs Row based Asynchronous vs Synchronous MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 Tung sten Galera DRBD SAN NDB InnoDB + Usability ++ - Performance (1) Asynchronous (2) Statement based Row based (3) Semi-sync Synchronous (4) Global trx id Multi threaded Row based = deterministic = good Asynchronous = data loss on failover Statement based = dangerous Synchronous = good Global trx id = easier setup & failover Multi threaded = scalability for complex topologies 2011-10-25

Clustering frameworks Heartbeat Corosync MMM Oracle/other VM MHA Tungsten Enterprise Solaris Cluster ... Failover 2011-10-25

Synchronous multi-master NDB Galera Failover 2011-10-25

"Causes of Downtime in Production MySQL Servers" by Baron Schwartz: Is a clustering solution part of the solution or the part of the problem? "Causes of Downtime in Production MySQL Servers" by Baron Schwartz: #1: Human error #2: SAN Complex clustering framework + SAN = More problems, not less! Galera (and NDB) = Replication based, no SAN or DRBD No "failover moment", no false positives No clustering framework needed (JDBC loadbalance) Simple and elegant! 2011-10-25

Statement vs Row based Asynchronous vs Synchronous MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 Tung sten Galera DRBD SAN NDB InnoDB + Usability ++ - Performance (1) Asynchronous (2) Statement based Row based +(3) Semi-sync Synchronous +(4) Global trx id Multi threaded Clustering framework 1) Multi-threaded slave, 1 per schema 2) No, but can be combined with MySQL replication 3) Reliability comparable to row based replication 4) Internally slave applier is asynchronous, but exposes synchronous caracteristics 2011-10-25

Benchmarks! Baseline single node performance "group commit bug" when sync_binlog=1 & innodb_flush_log_at_trx_commit=1 wsrep api (Galera module, no replication) adds minimal overhead 2011-10-25

3 node Galera cluster No overhead in master-slave mode (red vs yellow) Small benefit in multi-master mode (depends on read/write ratio) 2011-10-25

Single node, disk bound workload 10% and 20% of data in cache Optimization for dummies: Double amount of RAM, double performance 2011-10-25

3 node Galera cluster, disk bound Again 2x RAM => 2x performance Roughly 50% of single node performance Decreases when writing to multiple masters (weird!) => Blame InnoDB redo log purge weirdness 2011-10-25

Same disk bound cluster, modified Sysbench OLTP Modified sysbench oltp: Same queries as isolated short transactions. - 75% read-only, 25% write-only Performance is same in master-slave and multi-master modes - Limited by write throughput 40% of single node performance 2011-10-25

DRBD vs Single node 60% of single node performance Minimum latency 10x higher but average is not so bad (not shown) Note: This is different HW than the Galera test, and different metric 2011-10-25

Semi sync vs Single node Practically no performance overhead Opportunity to relax sync_binlog setting (green - yellow) 2011-10-25

MySQL level replication is better than DRBD which is better than SAN Conclusions Simpler is better MySQL level replication is better than DRBD which is better than SAN Synchronous replication = no data loss Asynchronous replication = no latency (WAN replication) Multi-master = no clustering frameworks Multi-threaded slave increases performance in disk bound workload Global trx id, autoprovisioning increases operations usability Galera (and NDB) provides all these with good performance and stability 2011-10-25

References http://openlife.cc/blogs/2011/july/ultimate-mysql-high-availability-solution http://openlife.cc/category/topic/galera http://openlife.cc/blogs/2011/may/drbd-and-semi-sync-shootout-large-server http://www.percona.com/about-us/white-papers/ http://www.mysqlperformanceblog.com/2011/09/18/disaster-mysql-5-5-flushing/ 2011-10-25