Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL

Similar documents
High Availability Solutions for the MariaDB and MySQL Database

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

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

MySQL High-Availability and Scale-Out architectures

High Availability Solutions with MySQL

MySQL Reference Architectures for Massively Scalable Web Infrastructure

Tushar Joshi Turtle Networks Ltd

MySQL Replication. openark.org

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

High Availability and Scalability for Online Applications with MySQL


Eloquence Training What s new in Eloquence B.08.00

Module 14: Scalability and High Availability

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

Eliminate SQL Server Downtime Even for maintenance

How To Build A Fault Tolerant Mythrodmausic Installation

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

Mail-SeCure Load Balancing

Red Hat Cluster Suite

Comparing MySQL and Postgres 9.0 Replication

Best Practices for Using MySQL in the Cloud

End-to-End Availability for Microsoft SQL Server

The Future of PostgreSQL High Availability Robert Hodges - Continuent, Inc. Simon Riggs - 2ndQuadrant

Contents. SnapComms Data Protection Recommendations

INUVIKA TECHNICAL GUIDE

High Availability with Postgres Plus Advanced Server. An EnterpriseDB White Paper

How to evaluate which MySQL High Availability solution best suits you

The Evolution of Database Management Systems

Cisco Active Network Abstraction Gateway High Availability Solution

Appendix A Core Concepts in SQL Server High Availability and Replication

ScaleArc for SQL Server

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Implementing and Managing Windows Server 2008 Clustering

Cloud Based Application Architectures using Smart Computing

Data Replication INSTALATION GUIDE. Open-E Data Storage Server (DSS ) Integrated Data Replication reduces business downtime.

MySQL Enterprise Backup

High Availability and Disaster Recovery for Exchange Servers Through a Mailbox Replication Approach

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Senior Operational DBA

High Availability Using MySQL in the Cloud:

Database High Availability. Solutions 2010

Library Recovery Center

Administering and Managing Failover Clustering

High Availability Storage

High Availability Database Solutions. for PostgreSQL & Postgres Plus

Bosch Video Management System High Availability with Hyper-V

ScaleArc idb Solution for SQL Server Deployments

Ecomm Enterprise High Availability Solution. Ecomm Enterprise High Availability Solution (EEHAS) Page 1 of 7

Integrated Application and Data Protection. NEC ExpressCluster White Paper

Westek Technology Snapshot and HA iscsi Replication Suite

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

IP Storage On-The-Road Seminar Series

Key Benefits. R1Soft CDP Server Software. R1Soft Continuous Data Protection for Linux and Windows Systems. Bare-Metal Disaster Recovery

Using Hitachi Protection Manager and Hitachi Storage Cluster software for Rapid Recovery and Disaster Recovery in Microsoft Environments

SanDisk ION Accelerator High Availability

One Solution for Real-Time Data protection, Disaster Recovery & Migration

Red Hat Enterprise linux 5 Continuous Availability

Solving Large-Scale Database Administration with Tungsten

High Availability & Disaster Recovery Development Project. Concepts, Design and Implementation

Enterprise Linux Business Continuity Solutions for Critical Applications

Pervasive PSQL Meets Critical Business Requirements

Flash Databases: High Performance and High Availability

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

Software Performance, Scalability, and Availability Specifications V 3.0

TECHNICAL WHITE PAPER: DATA AND SYSTEM PROTECTION. Achieving High Availability with Symantec Enterprise Vault. Chris Dooley January 3, 2007

MySQL Cluster New Features. Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com

Mirror File System for Cloud Computing

Neverfail for Windows Applications June 2010

Vess A2000 Series HA Surveillance with Milestone XProtect VMS Version 1.0

Redefining Microsoft SQL Server Data Management. PAS Specification

...DYNAMiC INTERNET SOLUTiONS >> Reg.No. 1995/020215/23

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

Online Transaction Processing in SQL Server 2008

Real-time Protection for Hyper-V

Application Brief: Using Titan for MS SQL

SAP HANA Operation Expert Summit BUILD - High Availability & Disaster Recovery

GoGrid Implement.com Configuring a SQL Server 2012 AlwaysOn Cluster

Redefining Microsoft SQL Server Data Management

High Availability, Disaster Recovery and Extreme Read Scaling using Binlog Servers. Jean-François Gagné jeanfrancois DOT gagne AT booking.

High Availability And Disaster Recovery

MySQL Strategy. Morten Andersen, MySQL Enterprise Sales. Copyright 2014 Oracle and/or its affiliates. All rights reserved.

High Availability Configuration Guide

Techniques for implementing & running robust and reliable DB-centric Grid Applications

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

Three Ways Enterprises are Protecting SQL Server in the Cloud

SCALABILITY AND AVAILABILITY

How To Use A Recoverypoint Server Appliance For A Disaster Recovery

Informatica MDM High Availability Solution

ORACLE DATABASE HIGH AVAILABILITY STRATEGY, ARCHITECTURE AND SOLUTIONS

EMC: The Virtual Data Center

StoneFly SCVM TM for ESXi

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

Zero Downtime Deployments with Database Migrations. Bob Feldbauer

Tier Architectures. Kathleen Durant CS 3200

MySQL Cluster Deployment Best Practices

Leveraging Virtualization in Data Centers

High-Availability User s Guide v2.00

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

SCALABLE DATA SERVICES

Deploying Global Clusters for Site Disaster Recovery via Symantec Storage Foundation on Infortrend Systems

Transcription:

Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL 04.20111

High Availability with MySQL Higher Availability Shared nothing distributed cluster with MySQL Cluster Storage snapshots for disaster recoverygeographical Replication for disaster recovery Virtualised Environments Active/Passive Clusters + Local Asynchronous ReplicationActive/Passive Clusters through shared storage DRBD + Local Asynchronous Replication Synchronous Replication through DRBDLocal Semi-synchronous ReplicationLocal Asynchronous Replication 2

Local Asynchronous Replication Data written on the master is written into the binary log The I/O thread on the slave collects logs from the master binary log and writes a relay log on the slave The SQL thread on the slave reads the relay log and apply the writes on the slave Slave writes are optionally added to the binary log on the slave It can be statement-based (SBR), row-based (RBR) or mixed (MBR) In case of fault: Read-Write The master server is taken down The slave server is updated up to the last position in the relay log The clients point at the Read-Only Read-Only designated slave server binlog The designated slave server becomes the master server 99 3 relaylog relaylog relaylog relaylog

Local Asynchronous Replication 1. A write transaction is sent to the Master INSERT INTO binlog relaylog relaylog relaylog relaylog 4

Local Asynchronous Replication 2. The transaction is stored into the binlog INSERT INTO binlog relaylog relaylog relaylog relaylog 5

Local Asynchronous Replication 3. The client receives the ACK from the server TXN OK! binlog relaylog relaylog relaylog relaylog 6

Local Asynchronous Replication 4. The I/O thread on the slave(s) pulls the transaction and it stores it in the relaylog binlog INSERT INTO INSERT INTO INSERT INTO INSERT INTO relaylog relaylog relaylog relaylog 7

Local Asynchronous Replication 5. The SQL thread reads the transaction from the relay log and applies the transaction on the slave(s) binlog INSERT INTO INSERT INTO INSERT INTO INSERT INTO relaylog relaylog relaylog relaylog 8

Local Asynchronous Replication Typical Usage High availability with manual failover Easy to implement and maintain, provides a good level of availability Non-intrusive backup Backups can be executed on a slave server The binlog and provides incremental backup and possible point-in-time recovery Scalability for read-intensive applications Read-only transactions can be executed on the slave servers Systems and applications upgrades Chains of Master/Slaves reduce to virtually 0 the downtime for upgrades 9

Local Asynchronous Replication Other Features Out-of-the box with MySQL Server Platform independent Master and Slaves can be heterogeneous in OS and version Storage engine independent Master and Slaves can be heterogeneous in storage engines Multiple topologies Works with transactional and non-transactional engines Advanced settings can define a selection of data to replicate 10

Local Asynchronous Replication Other Features Out-of-the box with MySQL Server Platform independent Master and Slaves can be heterogeneous in OS and version Storage engine independent Master and Slaves can be heterogeneous in storage engines Multiple topologies Works with transactional and non-transactional engines Advanced settings can define a selection of data to replicate 11

Local Semi-Synchronous Replication One or more slaves are defined as semi-synchronous servers the Master server waits until the I/O thread on one of the semi-sync slave(s) has flushed the transaction to disk, or until it receives a timeout, then it returns the ACK to the application. In case of fault: The master server is taken down The slave server is updated up to the last position in the relaylog (the update will be fast) The clients point at the designated slave server The designated slave server becomes the master server binlog Read-Write Read-Only Read-Only 12 relaylog relaylog relaylog relaylog

Local Semi-Synchronous Replication 1. A write transaction is sent to the Master INSERT INTO binlog relaylog relaylog relaylog relaylog 13

Local Asynchronous Replication 2. The transaction is stored into the binlog INSERT INTO binlog relaylog relaylog relaylog relaylog 14

Local Asynchronous Replication 3. The I/O thread on the slave(s) pulls the transaction and it stores it in the relaylog binlog INSERT INTO INSERT INTO INSERT INTO INSERT INTO relaylog relaylog relaylog relaylog 15

Local Asynchronous Replication 4. The client receives the ACK from the server TXN OK! binlog relaylog relaylog relaylog relaylog 16

Local Asynchronous Replication 5. The SQL thread reads the transaction from the relay log and applies the transaction on the slave(s) binlog INSERT INTO INSERT INTO INSERT INTO INSERT INTO relaylog relaylog relaylog relaylog 17

Synchronous Replication through DRBD One server is designated as active and another server as passive or stand-by The active server owns a virtual IP address. Applications refer to the virtual IP address to connect to the database server. Data is synchronously replicated at block level from the active to the stand-by server In case of fault: The master server is taken down The block device on the stand-by server is mounted The mysqld on the stand-by server starts The virtual IP address moves to the stand-by server The stand-by server becomes active Block Device Active/Hot Server Block Device Passive/Std-by Server 18

Synchronous Replication through DRBD 1. A write transaction is sent to the active Server INSERT INTO Active/Hot Server Passive/Std-by Server Block Device Block Device 19

Synchronous Replication through DRBD 2. The transaction is written to the block device Active/Hot Server Passive/Std-by Server INSERT INTO Block Device Block Device 20

Synchronous Replication through DRBD 3. The blocks modified by the transaction are replicated to the stand-by server Active/Hot Server Passive/Std-by Server Block Device Block Device 21

Synchronous Replication through DRBD 4. The client receives the ACK from the server TXN OK! Active/Hot Server Passive/Std-by Server Block Device Block Device 22

Synchronous Replication through DRBD Typical Usage High availability with automatic failover Fully redundant solution with no loss of data and no single points of failure Point-in-time snapshots One or more servers can be updated at regular intervals to provide historical analysis 23

Synchronous Replication through DRBD Other Features Fully certified, Linux-only environment Works with Pacemaker and Heartbeat Works with InnoDB only Inexpensive solution 24

DRBD + MySQL Replication The combination of DRBD and MySQL Replication provides more availability for scheduled and unscheduled downtime In case of fault of the master server, DRBD switches over to the stand-by server During the switchover, clients can still read from the slaves For planned downtime and upgrades, DBAs can apply rolling upgrades Block Device binlog relaylog relaylog relaylog relaylog 25

Active/Passive Clusters through Shared Storage Similar to DRBD, but data is not replicated through the network. Redundancy and replication must be guaranteed by the shared storage Shared storage is usually Storage Area Networks (SAN) or Network Attached Storage (NAS) InnoDB only, available with Linux, Windows or Solaris Used with FS like GFS or OCFS2 In case of fault: The master server is taken down The mysqld on the stand-by server starts The virtual IP address moves to the stand-by server The stand-by server becomes active Active/Hot Server Shared Storage Passive/Std-by Server 26

Active/Passive Clusters through Shared Storage Large Deployments VIP0 1VIP0 5 VIP0 VIP0 VIP0 2VIP0 3VIP0 4VIP0 6 7 8 in01 in02 in03 in04 in05 in06 in07 in08 04 01 07 05 02 08 06 03 Shared Storage 27

Active/Passive Clusters through Shared Storage Failover in Large Deployments VIP0 1VIP0 2VIP0 6 VIP0 VIP0 5 VIP0 3VIP0 4VIP0 7 8 in02 in03 in04 in06 in07 in08 in01 in05 04 01 07 05 02 08 06 03 Shared Storage 28

Active/Passive Clusters plus Replication The combination of active/passive cluster + MySQL Replication provides more availability for scheduled and unscheduled downtime In case of fault, the master, active server switches over to the stand-by server Slaves will pull data from the new slave Replication can also be used for planned downtime and rolling upgrades Replicated data may be stored on shared storage Passive/Std-by Server Active/Hot Server Shared Storage relaylog relaylog relaylog relaylog 29

Active/Passive Clusters plus Replication through Shared Storage Large Deployments VIP0 1VIP0 5 VIP0 VIP0 VIP0 2VIP0 3VIP0 4VIP0 6 7 8 M01 S02 S03 M04 S05 S06 M07 S08 M01 > S02, S03 M04 > S05, S06 04 01 07 05 02 08 06 03 Shared Storage 30

Virtualised Environments MySQL Servers - masters or slaves - are located on any available physical server High availability and load balancing are provided by the virtualised software Data storage is usually managed by the virtualised software but it is masked as local storage In case of fault, the virtualised software restarts on any other physical server 01 03 05 07 02 04 06 08 08 07 06 05 02 01 InnoDB only Shared Storage 31 04 03

Geographical Replication for Disaster Recovery Active Data Centre Master-Master Asynchronous Replication is used to update the backup data centre In case of fault, the network traffic is redirected to the backup data centre. Failback must be executed manually Cross-platform and crossengine Backup Data Centre 32

Storage Snapshots for Disaster Recovery Active Data Centre Snapshots are managed by the NAS and SAN firmware. There is usually a short read-only freeze Snapshots can be used as run-time backup InnoDB only, NetApp NASs and firmware are certified using Snapshot and Snapmirror Backup Data Centre 33

MySQL Cluster Shared-nothing, fully transactional and distributed architecture used for high volume and small transactions. MySQL Cluster is based on the NDB (Network DataBase) Storage Engine Data is distributed for scalability and performance, and it is replicated for redundancy on multiple data nodes. Nodes in a cluster: SQL Nodes: provide the SQL interface to NDB API Nodes: provide the native NDB API Data Nodes: store and retrieve data, manage transactions Management Nodes: manage the Cluster Load balanced Memory or disk-based Geographically replicated for disaster recovery Full online operation for maintenance and administration Application Nodes NDB API, ClusterJ/JPA Data Nodes SQL Nodes Management Nodes 34

Thank You! Joffrey MICHAÏE Consultant MySQL joffrey@skysql.com 35