High Availability Solutions for MySQL. Lenz Grimmer <lenz@grimmer.com> 2008-08-29 DrupalCon 2008, Szeged, Hungary

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

Architectures Haute-Dispo Joffrey MICHAÏE Consultant MySQL

High Availability Solutions with MySQL

High Availability Solutions for the MariaDB and MySQL Database

MySQL Reference Architectures for Massively Scalable Web Infrastructure

MySQL High-Availability and Scale-Out architectures

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

Open Source High Availability on Linux

Tushar Joshi Turtle Networks Ltd

Comparing MySQL and Postgres 9.0 Replication

MySQL synchronous replication in practice with Galera

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

Appendix A Core Concepts in SQL Server High Availability and Replication

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

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

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

The Evolution of Database Management Systems

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

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

Linux High Availability

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

short introduction to linux high availability description of problem and solution possibilities linux tools

Active/Active DB2 Clusters for HA and Scalability

PostgreSQL Clustering with Red Hat Cluster Suite

Mirror File System for Cloud Computing

Module 14: Scalability and High Availability

How to evaluate which MySQL High Availability solution best suits you

High Availability Database Solutions. for PostgreSQL & Postgres Plus

Eliminate SQL Server Downtime Even for maintenance

MySQL Replication. openark.org

Contents. SnapComms Data Protection Recommendations

Database Replication with MySQL and PostgreSQL

Westek Technology Snapshot and HA iscsi Replication Suite

Red Hat Cluster Suite

Linas Virbalas Continuent, Inc.

MySQL Comes of Age. Robert Hodges Sr. Staff Engineer Percona Live London November 4, VMware Inc. All rights reserved.

Database High Availability. Solutions 2010

Implementing the Future of PostgreSQL Clustering with Tungsten

Parallel Replication for MySQL in 5 Minutes or Less

MySQL/MariaDB Multi-Master Replication & Failover

Cloud Based Application Architectures using Smart Computing

High-Availability Using Open Source Software

Database Resilience at ISPs. High-Availability. White Paper

Ingres High Availability Option

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

Solving Large-Scale Database Administration with Tungsten

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

INUVIKA TECHNICAL GUIDE

Zero Downtime Deployments with Database Migrations. Bob Feldbauer

Configure AlwaysOn Failover Cluster Instances (SQL Server) using InfoSphere Data Replication Change Data Capture (CDC) on Windows Server 2012

Flash Databases: High Performance and High Availability


High Availability and Scalability for Online Applications with MySQL

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

Investor Newsletter. Storage Made Easy Cloud Appliance High Availability Options WHAT IS THE CLOUD APPLIANCE?

High Availability Storage

High Availability Using MySQL in the Cloud:

Enterprise Linux Business Continuity Solutions for Critical Applications

Deployment Topologies

Best Practices for Using MySQL in the Cloud

SCALABILITY AND AVAILABILITY

Enabling Database-as-a-Service (DBaaS) within Enterprises or Cloud Offerings

VERITAS Storage Foundation 4.3 for Windows

Monitoring MySQL. Geert Vanderkelen MySQL Senior Support Engineer Sun Microsystems

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

MySQL Administration and Management Essentials

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

High Availability and Backup Strategies for the Lustre MDS Server

Implementing the SUSE Linux Enterprise High Availability Extension on System z

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

Not Your Grandpa s Replication

Cisco Active Network Abstraction Gateway High Availability Solution

Your eyes in the network

IdP Clustering. You want to prevent service outages. High Availability and Load Balancing. Possible problems: HW failures

Server Clusters : Geographically Dispersed Clusters For Windows 2000 and Windows Server 2003

Antelope Enterprise. Electronic Documents Management System and Workflow Engine

Application Continuity with BMC Control-M Workload Automation: Disaster Recovery and High Availability Primer

Scaling DBMail with MySQL

SQL Server Training Course Content

Designing, Optimizing and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Database Scalability {Patterns} / Robert Treat

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

How To Build A Fault Tolerant Mythrodmausic Installation

Eloquence Training What s new in Eloquence B.08.00

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

MySQL Enterprise Monitor

PRM and DRBD tutorial. Yves Trudeau October 2012

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

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

Avoiding Pain Running MySQL in the Cloud

High Availability and Clustering

MS Design, Optimize and Maintain Database for Microsoft SQL Server 2008

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

<Insert Picture Here> Oracle NoSQL Database A Distributed Key-Value Store

ORACLE DATABASE HIGH AVAILABILITY STRATEGY, ARCHITECTURE AND SOLUTIONS

High Availability Design Patterns

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

Availability Digest. Redundant Load Balancing for High Availability July 2013

HA for Enterprise Clouds: Oracle Solaris Cluster & OpenStack

Transcription:

High Availability Solutions for MySQL Lenz Grimmer <lenz@grimmer.com> 2008-08-29 DrupalCon 2008, Szeged, Hungary

Agenda High Availability in General MySQL Replication MySQL Cluster DRBD Links/Tools

Why High Availability Matters Downtime is expensive You miss $$$ Your Boss complains New Site visitors won't come back

What Is HA Clustering? One service goes down others take over its work IP address takeover, service takeover Not designed for high-performance Not designed for high troughput (load balancing)

Split-Brain Communications failures can lead to separated partitions of the cluster If those partitions each try and take control of the cluster, then it's called a split-brain condition If this happens, then bad things will happen http://linux-ha.org/badthingswillhappen Use Fencing or Moderatation/Arbitration to avoid it

Eliminating the SPOF Identify what will fail Disks Find out what can fail Network cables OOM Power supplies

Rules of High Availability Prepare for failure Keep it simple, stupid (KISS) Complexity is the enemy of reliability Test your setup frequently

MySQL Replication One-way, statement-based One Master, many Slaves Asynchronous Slaves can lag Master maintains binary logs & index Easy to set up Built into MySQL Replication is single-threaded

MySQL Replication Overview Read & Write Web/App Server Write Relay Log mysqld Index & Binlogs I/O Thread SQL Thread Daten Replication Binlog Data MySQL Master mysqld MySQL Slave

Replication Topologies Master > Slave Master > Slaves Master > Slave > Slaves Masters > Slave (Multi-Source) Master < > Master (Multi-Master) Ring (Multi-Master)

Replication & HA Combined with Heartbeat Virtual IP takeover Slave gets promoted to Master Side benefits: load balancing & backup Tricky to fail back No automatic conflict resolution Proper failover needs to be scripted

Master-Master Replication Useful for easier failover Not suitable for load-balancing Writes still end up on both machines Neither machine has the authorative data Don't write to both masters! Use Sharding or Partitioning instead (e.g. MySQL Proxy)

MySQL Cluster Shared nothing Automatic partitioning Distributed Fragments Synchronous replication Fast automatic fail-over of data nodes Automatic resynchronization Transparent to Application Supports Transactions

MySQL Cluster In-memory tables Not suitable for all query patterns Not suitable for large datasets Latency matters Can be combined with MySQL Replication

DRBD Distributed Replicated Block Device Raid-1 over network Synchronous block replication Automatic resync on recover Application-agnostic Can mask local I/O errors Active/passive configuration

DRBD & Heartbeat Heartbeat mounts file system on failover (passive node becomes active) Data only accessible on the active node (LVM snapshots can work around this) Increased I/O Latency Failover is cold (fsck, log recovery, buffers/caches)

Availability Scalability MySQL Replication & Heartbeat MySQL, Heartbeat & DRBD MySQL Cluster Requirements MySQL Replication Automated IP Failover No Yes Yes No Automated DB Failover No No Yes Yes Typical Failover time Varies Varies < 30s < 3s Auto resync of data No No Yes Yes Geographic redundancy Yes Yes MySQL Replication Built-in load balancing MySQL Replication MySQL Replication MySQL Replication Yes Read-intensive Yes Yes MySQL Replication Yes Write-intensive No No Possible Yes #Nodes/Cluster Master/Slave(s) Master/Slave(s) Active/Passive 255 MySQL Replication

Related tools / Links Linux Heartbeat http://linux-ha.org/ DRBD http:/drbd.org/ Linux Cluster Information Center http://www.lcic.org/ha.html Red Hat Cluster Suite http://www.redhat.com/cluster_suite/ Sun Open High Availability Cluster http://opensolaris.org/os/project/ha-mysql/

Tools/Links MySQL Multi-Master Replication Manager http://code.google.com/p/mysql-master-master/ Maatkit http://maatkit.sourceforge.net/ Mon scheduler and alert management http://www.kernel.org/software/mon/ Continuent Tungsten Replicator https://community.continuent.com/community/tungsten-replicator

Q & A Questions, Comments?

Thank you! Lenz Grimmer <lenz@grimmer.com>