MySQL High-Availability and Scale-Out architectures



Similar documents
Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL


High Availability Solutions with MySQL

Tushar Joshi Turtle Networks Ltd

MySQL High Availability Solutions. Lenz Grimmer OpenSQL Camp St. Augustin Germany

High Availability Solutions for MySQL. Lenz Grimmer DrupalCon 2008, Szeged, Hungary

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

High Availability Solutions for the MariaDB and MySQL Database

MySQL synchronous replication in practice with Galera

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

White Paper. Optimizing the Performance Of MySQL Cluster

SCALABLE DATA SERVICES

Top 10 Reasons why MySQL Experts Switch to SchoonerSQL - Solving the common problems users face with MySQL

MySQL Reference Architectures for Massively Scalable Web Infrastructure

Database Scalability {Patterns} / Robert Treat

SCALABILITY AND AVAILABILITY

Module 14: Scalability and High Availability

Building a Flash Fabric

High Availability and Scalability for Online Applications with MySQL

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

High Availability Using MySQL in the Cloud:

Availability Digest. MySQL Clusters Go Active/Active. December 2006

Cloud DBMS: An Overview. Shan-Hung Wu, NetDB CS, NTHU Spring, 2015

How to evaluate which MySQL High Availability solution best suits you

Active/Active DB2 Clusters for HA and Scalability

Synchronous multi-master clusters with MySQL: an introduction to Galera

Tier Architectures. Kathleen Durant CS 3200

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Cloud Based Application Architectures using Smart Computing

Inge Os Sales Consulting Manager Oracle Norway

Microsoft SQL Server Acceleration with SanDisk

Solid State Storage in Massive Data Environments Erik Eyberg

MySQL CLUSTER. Scaling write operations, as well as reads, across commodity hardware. Low latency for a real-time user experience

HGST Virident Solutions 2.0

High-availability with Galera Cluster for MySQL

Performance Baseline of Oracle Exadata X2-2 HR HC. Part II: Server Performance. Benchware Performance Suite Release 8.4 (Build ) September 2013

In Memory Accelerator for MongoDB

MySQL and Hadoop Big Data Integration

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

How To Build A Fault Tolerant Mythrodmausic Installation

MySQL Cluster Delivering Scalable & Highly Available Session Management

TOP FIVE REASONS WHY CUSTOMERS USE EMC AND VMWARE TO VIRTUALIZE ORACLE ENVIRONMENTS

Preparing for the Big Oops! Disaster Recovery Sites for MySQL. Robert Hodges, CEO, Continuent MySQL Conference 2011

Scaling DBMail with MySQL

Welcome to Virtual Developer Day MySQL!

SAP HANA - Main Memory Technology: A Challenge for Development of Business Applications. Jürgen Primsch, SAP AG July 2011

Guide to Scaling OpenLDAP

Flash Databases: High Performance and High Availability

SQL Server Virtualization

Essentials Guide CONSIDERATIONS FOR SELECTING ALL-FLASH STORAGE ARRAYS

Oracle Acceleration with the SanDisk ION Accelerator Solution

MakeMyTrip CUSTOMER SUCCESS STORY

MySQL Replication. openark.org

HP ProLiant BL660c Gen9 and Microsoft SQL Server 2014 technical brief

Comparing TCO for Mission Critical Linux and NonStop

Oracle Database 12c Plug In. Switch On. Get SMART.

Practical Cassandra. Vitalii

Hadoop: Embracing future hardware

CAT: Azure SQL DB Premium Deep Dive and Mythbuster

StarWind Virtual SAN for Microsoft SOFS

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

MySQL always-up with Galera Cluster

SOFTWARE DEFINED STORAGE IN ACTION

<Insert Picture Here> Oracle Database Directions Fred Louis Principal Sales Consultant Ohio Valley Region

Solving Large-Scale Database Administration with Tungsten

High Availability Storage

MySQL Administration and Management Essentials

How to Choose Between Hadoop, NoSQL and RDBMS

MySQL Cluster Deployment Best Practices

Eloquence Training What s new in Eloquence B.08.00

SOFTWARE-DEFINED STORAGE IN ACTION

Advances in Virtualization In Support of In-Memory Big Data Applications

Overview: X5 Generation Database Machines

Parallel Replication for MySQL in 5 Minutes or Less

VERITAS Business Solutions. for DB2

ScaleArc for SQL Server

How to choose High Availability solutions for MySQL MySQL UC 2010 Yves Trudeau Read by Peter Zaitsev. Percona Inc MySQLPerformanceBlog.

F1: A Distributed SQL Database That Scales. Presentation by: Alex Degtiar (adegtiar@cmu.edu) /21/2013

Table of Contents. Overview... 1 Introduction... 2 Common Architectures Technical Challenges with Magento ChinaNetCloud's Experience...

<Insert Picture Here> Oracle Cloud Storage. Morana Kobal Butković Principal Sales Consultant Oracle Hrvatska

The Evolution of Database Management Systems

PolyServe Matrix Server for Linux

Real-Time Big Data Analytics SAP HANA with the Intel Distribution for Apache Hadoop software

System Architecture. In-Memory Database

Realizing the True Potential of Software-Defined Storage

Investing Strategically in All Flash Arrays

Nutanix Tech Note. Configuration Best Practices for Nutanix Storage with VMware vsphere

How to Build a Sanbolic Platform User Manual

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Best Practices for Using MySQL in the Cloud

Portable Scale-Out Benchmarks for MySQL. MySQL User Conference 2008 Robert Hodges CTO Continuent, Inc.

Is there any alternative to Exadata X5? March 2015

Transcription:

MySQL High-Availability and Scale-Out architectures Oli Sennhauser Senior Consultant osennhauser@mysql.com 1

Introduction Who we are? What we want? 2

Table of Contents Scale-Up vs. Scale-Out MySQL Replication MySQL HA solution MySQL Cluster Application architectural solutions Other architectural stuff It's your turn... Let us build a replication 3

When do we think about architecture? Performance problems HA requirements 4

Scale-up vs. Scale-Out Scale-up Scale-out t Relaxation of constraints 5

MySQL Replication The MySQL answer: Master-Slave-Replication: Application r t w 2 types of sessions!!! Master Slave 1 Slave 2 Slave 3... LB ro Even Oracle uses the expression scale-out now! 6

MySQL Replication in detail Appl r t w M ro asynchronous! S IO thread SQL thread... bin-log bin-log relay-log relay-log wide distance possible! thin line possible! 7

MySQL Replication varieties Cascaded replication: M S I S I S I... black hole SE! S 1 S 2 S 3 S 4 S 5 S 6 S 7 S 8... for example Yahoo! 8

MySQL Replication varieties HA with hot standby Slave: Appl VIP HA solution S backup M S standby S 1 S 2 S 3 active active fail over! 9

HA with MySQL: MySQL HA solution Appl VIP heartbeat M M' DRBD S 1 S 2 S 3 99.99% HA (four nine) active passive fail over! 10

MySQL HA solution HA with MySQL and SAN: Appl VIP heartbeat M M' S 1 S 2 S 3 SAN 11

Multi-Master Replication actually Master-Master Replication Appl Appl VIP/LB M 1 M 2 S 11 S 12 S 13 S 21 S 22 S 23 This architecture does NOT solve your write problems!!! 12

Multi-Master Replication HA Multi-Master Replication Appl Appl VIP VIP/LB VIP M 1 ' M 1 M 2 M 2 ' DRBD DRBD S 11 S 12 S 13 S 21 S 22 S 23 13

Shared disk cluster DB 1 DB 2 ro! shared disk DB 2 This is in 99.9% of the cases NOT your solution!!! It looks like Oracle RAC but MySQL does NOT (yet) have the instruments needed! Can be useful in some special kinds of reporting. 14

Where are we now? The architectures above solved: your read problems. some HA requirements. But they did not solve: your write problems! And what when we need: higher HA? synchronous replication? more write speed? 15

MySQL Cluster Shared-nothing architecture Synchronous replication (2-Phase commit) Fast automatic fail over High performance (also writing) High transactional throughput No special components required In-Memory database (in 5.1 also disk support) Scalable, 1000's of transactions per second 99.999% HA (five nine) On-line upgrade path (at least on GA within same version) 16

MySQL Cluster architecture Application Application Application Application SQL Nodes MySQL Server MySQL Server MySQL Server my.cnf NDB Cluster (Data nodes) config.ini Data Nodes DB DB MGM Server DB DB MGM client Mgmt Nodes 17

MySQL Cluster HA features MySQL Server X MySQL Server X MySQL Server X MySQL Server X MySQL Server NDB API Data Node NDB Storage Engine Data Node Management Server X Data Node X Data Node X Management Server MySQL Cluster 18

Cluster with Replication for read scale-out (Reporting): Appl rw mysqld mysqld mysqld S 1 S 2 S 3 Reporting 19

Cluster with Replication Cluster-Cluster replication for disaster fail over (MySQL 5.0): Appl rw fail over mysqld mysqld mysqld mysqld mysqld mysqld 20

Cluster with Replication Cluster-Cluster replication for disaster fail over (MySQL 5.1): Appl rw fail over mysqld mysqld mysqld mysqld mysqld mysqld 21

Cluster with Replication circular Cluster-Cluster replication (>= MySQL 5.1.18?): 22

Session handling Telecom (Mobile) VoIP RSS-Feed aggregation Mail On-line Games Cluster examples Use cluster where you need HA you have high write load you do little Joins and Grouping 23

How to go on? Read is a caching problem! More RAM or scale-out. Write is a batching problem! Batch your load, Buy stronger I/O system. Use MySQL Cluster. SSD! What then? 24

SSD disruption I/O system without any movable parts! SSD = Solid State disk (Flash memory, NAND, NOR chips, RAM-SAN). During the last year(s) Price from 15'000 USD / 160 Gbyte -> 100 USD / 32 Gbyte 10-50 times faster than mechanical I/O systems 1 Mio write cycles dead :-( (special FS!) RAM: Huge amount of memory is cheap! This will disrupt the database world! 25

What then? With or without SSD we will reach a physical limit. What then? Application partitioning: Split applications OLTP vs. OLAP all in one Segment your application 26

Application partitioning OLTP vs. OLAP hot business data (trx) vs. old reporting data All in one Sessions, user tracking, ads, chat, booking Segment split by for example 1 Mio users (split by user_id). 27

Architecture examples 28

Architecture examples 29

Architecture examples 30

Architecture examples 31

Some more architecture stuff? Databases are slow!!! Whenever possible try to avoid databases! Use memcached for example. The SP trap. Stored Procedures are a lock in! Try to avoid SP! Use Materialized Views (MV) and/or shadow tables. VM/SAN is nice for consolidation but not for performance/scale-out! Backup and Staging MySQL Proxy 32

Your problems? Now it's your turn... Let us build a replication... 33