High Availability Solutions with MySQL



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

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

Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL

MySQL High-Availability and Scale-Out architectures

High Availability Solutions for the MariaDB and MySQL Database

MySQL Reference Architectures for Massively Scalable Web Infrastructure

Active/Active DB2 Clusters for HA and Scalability

High Availability and Scalability for Online Applications with MySQL

Eliminate SQL Server Downtime Even for maintenance

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


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

Module 14: Scalability and High Availability

Guide to Scaling OpenLDAP

High Availability Storage

How To Build A Fault Tolerant Mythrodmausic Installation

Appendix A Core Concepts in SQL Server High Availability and Replication

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Tushar Joshi Turtle Networks Ltd

ACHIEVING 100% UPTIME WITH A CLOUD-BASED CONTACT CENTER

Red Hat Cluster Suite

Network Attached Storage. Jinfeng Yang Oct/19/2015

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

Comparing MySQL and Postgres 9.0 Replication

Tier Architectures. Kathleen Durant CS 3200

SAN Conceptual and Design Basics

OVERVIEW. CEP Cluster Server is Ideal For: First-time users who want to make applications highly available

High Availability of the Polarion Server

SCALABILITY AND AVAILABILITY

Real-time Protection for Hyper-V

Introduction to MPIO, MCS, Trunking, and LACP

What s new in Hyper-V 2012 R2

recovery at a fraction of the cost of Oracle RAC

Open Source High Availability on Linux

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

High Availability Low Dollar Clustered Storage

High Availability and Backup Strategies for the Lustre MDS Server

NEC Corporation of America Intro to High Availability / Fault Tolerant Solutions

High Availability Database Solutions. for PostgreSQL & Postgres Plus

SAP Solutions High Availability on SUSE Linux Enterprise Server for SAP Applications

VERITAS Cluster Server v2.0 Technical Overview

SanDisk ION Accelerator High Availability

SCALABLE DATA SERVICES

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

Release Notes. LiveVault. Contents. Version Revision 0

Network-based Intelligent Data Protection Yossi Mossel, Product Manager

Symantec Storage Foundation and High Availability Solutions Microsoft Clustering Solutions Guide for Microsoft SQL Server

Content Distribution Management

1.0 Hardware Requirements:

MySQL and Virtualization Guide

ORACLE DATABASE HIGH AVAILABILITY STRATEGY, ARCHITECTURE AND SOLUTIONS

Traditionally, a typical SAN topology uses fibre channel switch wiring while a typical NAS topology uses TCP/IP protocol over common networking

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

Veritas Cluster Server from Symantec

Redefining Backup for VMware Environment. Copyright 2009 EMC Corporation. All rights reserved.

An On-line Backup Function for a Clustered NAS System (X-NAS)

Administering a Microsoft SQL Server 2000 Database

(Scale Out NAS System)

NAS Storage needs to be purchased; Will not be offered IAAS - Utility SMTP Per SMTP account Per server

High Availability for Databases Protecting DB2 Databases with Veritas Cluster Server

be architected pool of servers reliability and

Veritas CommandCentral Disaster Recovery Advisor Release Notes 5.1

Datasheet. FUJITSU Storage ETERNUS SF Storage Cruiser V16.0 ETERNUS SF AdvancedCopy Manager V16.0 ETERNUS SF Express V16.0

Westek Technology Snapshot and HA iscsi Replication Suite

VERITAS and HP A LONG-TERM COMMITMENT

Availability Digest. Redundant Load Balancing for High Availability July 2013

Flash Databases: High Performance and High Availability

Implementing Offline Digital Video Storage using XenData Software

Cisco Active Network Abstraction Gateway High Availability Solution

IBM Software Group. Lotus Domino 6.5 Server Enablement

TABLE OF CONTENTS THE SHAREPOINT MVP GUIDE TO ACHIEVING HIGH AVAILABILITY FOR SHAREPOINT DATA. Introduction. Examining Third-Party Replication Models

Windows clustering glossary

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

Eloquence Training What s new in Eloquence B.08.00

Delivering High Availability Solutions with Red Hat Cluster Suite

VERITAS NetBackup 6.0 Enterprise Server INNOVATIVE DATA PROTECTION DATASHEET. Product Highlights

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

Building Highly Available OpenZFS Storage Appliances Grenville Whelan

VERITAS Business Solutions. for DB2

Vembu NetworkBackup v3.1.1 GA

STRATEGIC PLANNING ASSUMPTION(S)

Clustering in Parallels Virtuozzo-Based Systems

SERVER CLUSTERING TECHNOLOGY & CONCEPT

Data Sheet: Disaster Recovery Veritas Volume Replicator by Symantec Data replication for disaster recovery

EMC AVAMAR. Deduplication backup software and system. Copyright 2012 EMC Corporation. All rights reserved.

Feature Comparison. Windows Server 2008 R2 Hyper-V and Windows Server 2012 Hyper-V

<Insert Picture Here> Oracle In-Memory Database Cache Overview

Contingency Planning and Disaster Recovery

Administering a Microsoft SQL Server 2000 Database

Appendix C to DIR Contract Number DIR-TSO-2736 SunGard Availability Services Discount Level: 25% Managed Data Center Services - Cloud Hosting

High-Availability Using Open Source Software

Microsoft SharePoint 2010 on VMware Availability and Recovery Options. Microsoft SharePoint 2010 on VMware Availability and Recovery Options

Violin: A Framework for Extensible Block-level Storage

Infortrend ESVA Family Enterprise Scalable Virtualized Architecture

In Memory Accelerator for MongoDB

Double-Take Replication in the VMware Environment: Building DR solutions using Double-Take and VMware Infrastructure and VMware Server

Transcription:

High Availability Solutions with MySQL best OpenSystems Day Fall 2008 Ralf Gebhardt Senior Systems Engineer MySQL Global Software Practice ralf.gebhardt@sun.com 1

HA Requirements and Considerations HA Solutions from MySQL Third-Party HA Solutions for MySQL Additional HA Resources plus Q & A 2

HA Requirements and Considerations Service Level Agreements (SLAs) Budgets & Timeliness to Delivery Fail Over Requirements Fault Tolerance Single Point of Failures Open Source, Proprietary & Mixed Tech Stacks Security Hardware Requirements Storage Considerations RAID SAN NAS Shared-Nothing Operating System Interoperability Geographic Redundancy What impact does a hardware or software failure have on the business? 3

What is Replication? The duplication of data to more then one location The use of additional hardware or software for Availability Reliability Fault tolerance Performance Asynchronous vs. Synchronous Safeguarding data loss Database Replication Statement vs Row-based Replication File-Based Replication Block-level (i.e. DRBD) 4

What is Replication? The duplication of data changes to more than one location Asynchronous Replication update customer Synchronous Replication update customer 5

What is Clustering? Clusters are often used for: Operating System Databases Application servers Load balancers Web servers Just about any service that needs to be highly available Redundant nodes provide service when components fail Eliminate single points of failure Multiple network connections Redundant data storage (SAN, RAID) Shared-Nothing vs. Shared-Disk 6

MySQL HA Solutions Clustering & Geographical Redundancy Clustering Technologies Replication Technologies MySQL Cluster MySQL + DRBD MySQL + SAN Well-Managed MySQL Replication Unmanaged Small Business ISPs & Mainstream Business Data Centers Banking Medical Telco Military Defense 9 9. 9 9 9 35 days 4 days 8 hours 50 mins 5 mins % 7

HA Requirements and Considerations HA Solutions from MySQL MySQL Replication MySQL Replication and Heartbeat MySQL, DRBD and Heartbeat MySQL Cluster MySQL w/ Shared-Storage & Clustering Agents Third-Party HA Solutions for MySQL Additional HA Resources plus Q & A 8

MySQL Replication Asynchronous Statement Row-based (5.1) Mixed (5.1) Read vs. Write Response times Load balancing Scale Out Administration Backups Upgrades Testing Geographic Redundancy Requirements Availability Automated IP Fail Over Automated DB Fail Over Typical Fail Over Time Resynchronization of Data Geographic Redundancy Scalability Built-in Load Balancing Read Intensive Write Intensive # of Nodes Support No No Varies No Yes Scale-Out Yes No Dozens for Reads 9

MySQL Replication Topologies Master > Slave Master > Slaves Masters > Slave (Multi-Source) Master > Slave > Slaves Master < > Master (Multi-Master) Circular (Multi-Master) 10

Writes & Reads Inside MySQL Replication Web/App Server Writes relay binlog mysqld I/O Thread SQL Thread index & binlogs data Replication mysqld binlog data MySQL Master MySQL Slave 11

MySQL Replication plus Linux Heartbeat Heart-Beat Protocol Messages sent between nodes Failed heart-beat starts fail over process Manages a Virtual IP IP Address Takeover Characteristics Easy to configure with low complexity (however ) Open source Low cost Virtual IP management is automatic Asynchronous data replication Manual or automated fail over Recovery and multiple failures can get complicated Requirements Availability Automated IP Fail Over Automated DB Fail Over Typical Fail Over Time Resynchronization of Data Geographic Redundancy Scalability Built-in Load Balancing Read Intensive Write Intensive # of Nodes Support Yes No Varies No Yes Scale-Out Yes No Master/Slaves 12

MySQL Replication & Linux Heartbeat IP Management Active MySQL Server Passive MySQL Server Asynchronous MySQL Replication Heartbeat implements serial, UDP, and PPP/UDP heartbeats together with IP address takeover, this solves MySQL Replication s fail over problem, but, data resynchronization is not automatic and can be complex. 13

MySQL, Heartbeat & DRBD Cluster Distributed storage Similar to network RAID 1 Synchronous replication No special networking components Excellent performance Blocks vs. rows of data Manages inconsistencies of data during a failure Hides the complexity of many recovery actions Heartbeat manages fail over and virtual IPs Requirements Availability Automated IP Fail Over Automated DB Fail Over Typical Fail Over Time Resynchronization of Data Geographic Redundancy Scalability Built-in Load Balancing Read Intensive Write Intensive # of Nodes Support Yes Yes < 30 secs Yes MySQL Replication No Yes Possible 1 Active 14

MySQL, Heartbeat & DRBD Cluster IP Management Active DRBD Server Passive DRBD Server Synchronous Block Replication 15

Managing Failures Passive DRBD Server X IP Management Active DRBD Server X X X 16

Data Resynchronization after Host Failure IP Management Passive DRBD Server Active DRBD Server Resynchronization Active Server is still able to process transactions during a resynchronization operation 17

System Requirements System Requirement Hosts Support Minimum 2 (More for scale-out or partitioning) Hardware Memory Storage Network Operating System COTS or SMP - 32 & 64-bit Multiple NICs for redundancy Varies (More is generally better) (32 KB per 1 GB block) SCSI, RAID 0+1 for I/O Performance 100 Mbps or better (Gigabit recommended, others supported) Linux (Redhat, Suse, CentOS, Fedora, Debian) 18

MySQL Cluster In-Memory Database Disk Data (6.2) Shared-nothing storage Synchronous replication Fast-automatic data fail over High performance NDB API No special hardware Best for primary key lookups Transactional Online backup No automated IP failover Requirements Availability Automated IP Fail Over Automated DB Fail Over Typical Fail Over Time Resynchronization of Data Geographic Redundancy Scalability Load Balancing Read Intensive Write Intensive # of Nodes Support No Yes < 3 Secs Yes Yes (w/ Replication) Scale-Out Yes (Look ups) Yes 5.0: 64 5.1: 255 19

System Requirements System Component Requirement Hosts Maximum of 255 total nodes (48 Data Nodes) Hardware COTS Advanced TCA 32 & 64-bit x86, PowerPC & SPARC Memory Storage Network Operating System Varies on size of database, # of hosts, # of replicas Shared-Nothing - Memory & Disk Data SCSI or RAID for I/O performance 100 Mbps or better (Gigabit recommended, SCI supported) Linux (Red Hat, SuSE), Solaris, HP-UX, Mac OSX, others 20

Cluster Components SQL Node (MySQL) NDB API (Application) Data Node (NDB Storage Engine) Management Node Standard SQL Interface Scale-out for Performance Enables Replication High Performance C++ API Developer s Guide Data Storage (Memory/Disk) Automatic & User-Defined Partitioning Local & Global Checkpoints Scale-out for Capacity & Redundancy Configuration Arbitration Use Two for Redundancy 21

4 Data Node MySQL Cluster Clients Application/SQL Nodes (NDB API and/or MySQL Server) Management Nodes Data Nodes NDB Storage Engine 22

Geographic Redundancy As of 6.2 support for asynchronous replication between Clusters is possible Enables a higher degree of availability and continuity Asynchronous MySQL Replication NDB API NDB API NDB Storage Engine Cluster 1 NDB Storage Engine Cluster 2 23

Data Distribution & Partitioning authid (PK) 1 fname Albert lname Camus country France Base Table 2 Ernest Hemingway USA 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan Partition Partition authid (PK) fname lname country authid (PK) fname lname country 1 Albert Camus France 2 Ernest Hemingway USA 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan 24

Distribution & Partitioning: 2 Data Nodes Two Data Nodes (Physical) * Complete copy of database on each node Two Replicas (Logical) * Two copies of each partition One Node Group * One set of identical Data Nodes Node Group authid (PK) fname lname country authid (PK) fname lname country 1 Albert Camus France 1 Albert Camus France 2 Ernest Hemingway USA 2 Ernest Hemingway USA 3 Johan Goethe Germany 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan 4 Junichir o Tanizaki Japan 25

Distribution & Partitioning: 2 Data Nodes Query: SELECT fname, lname FROM author WHERE authid BETWEEN 1 AND 3; Result: Albert Camus Ernest Hemingway Johan Goethe In a two node cluster, even if we loose a Data Node, we can still satisfy any query. X Node Group authid (PK) fname lname country authid (PK) fname lname country 1 Albert Camus France 1 Albert Camus France 2 Ernest Hemingway USA 2 Ernest Hemingway USA 3 Johan Goethe Germany 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan 4 Junichir o Tanizaki Japan 26

Distribution & Partitioning: 4 Data Nodes Four Data Nodes (Physical) * Half of database on each node Two Replicas (Logical) * Two copies of each partition Two Node Groups * Two sets of identical Data Nodes Node Group Node Group authid (PK) fname lname country authid (PK) fname lname country 1 Albert Camus France 2 Ernest Hemingway USA 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan 27

Distribution & Partitioning: 4 Data Nodes Query: SELECT fname, lname FROM author WHERE authid BETWEEN 1 AND 3; Result: Albert Camus Ernest Hemingway Johan Goethe In a four node cluster, even if we loose a Data Node in each Node Group, we can still satisfy any query Node Group 1 Node Group 2 X X authid (PK) fname lname country authid (PK) fname lname country 1 Albert Camus France 2 Ernest Hemingway USA 3 Johan Goethe Germany 4 Junichir o Tanizaki Japan 28

Detecting Lost Connections - Heartbeats 29

Data Node Failure & Recovery Server 3 failure is detected Server 4 handles Server 3 requests 1 2 3 4 Node Group 1 Node Group 2 30

Data Node Failure & Recovery Server 3 begins copying data from Server 4 Complete or just changes since failure 1 2 3 4 Node Group 1 Node Group 2 31

Data Node Failure & Recovery Once data is fully restored, Server 3 rejoins the cluster 1 2 3 4 Node Group 1 Node Group 2 32

MySQL w/ Shared Storage & Clustering Agents Active/Passive likely configuration Multiple instances not allowed concurrent access to same data files Automated management Virtual IPs Fail over Data synchronization Mounting file systems Characteristics High cost (storage, hardware, software) Idle resources Longer fail over times High initial complexity Many options and proven vendors 33

Additional HA Solutions for MySQL HA/Performance Networking for MySQL Cluster Dolphin SCI Interconnect Operating System Clustering Sun Solaris Sun Cluster Microsoft Windows Clustering Services Red Hat Cluster Suite High Availability Middleware Continuent m/cluster Backup Software Zmanda http://solutions.mysql.com/ 34

MySQL Professional Services/Support MySQL Cluster Jumpstart MySQL Scale-Out, HA and Replication Jumpstart MySQL Architecture & Design 24 x 7 Production Support http://www.mysql.com/support http://www.mysql.com/products/enterprise/drbd.html Learn more about MySQL Professional Services and these bundles at http://www.mysql.com/consulting/ 35

Questions? best OpenSystems Day Fall 2008 Ralf Gebhardt Senior Systems Engineer MySQL Global Software Practice ralf.gebhardt@sun.com 36