High-Availability MySQL DB based on DRBD-Heartbeat Ming Yue September 27, 2007 September 27, 2007.

Slides:



Advertisements
Similar presentations
Express5800/ft series servers Product Information Fault-Tolerant General Purpose Servers.
Advertisements

Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
ITIS 3110 Jason Watson. Replication methods o Primary/Backup o Master/Slave o Multi-master Load-balancing methods o DNS Round-Robin o Reverse Proxy.
High Availability 24 hours a day, 7 days a week, 365 days a year… Vik Nagjee Product Manager, Core Technologies InterSystems Corporation.
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
XenClient Enterprise 4.5 Network Bandwidth Policies.
June 23rd, 2009Inflectra Proprietary InformationPage: 1 SpiraTest/Plan/Team Deployment Considerations How to deploy for high-availability and strategies.
High Availability through Virtualization
Cold Fusion High Availability “Taking It To The Next Level” Presenter: Jason Baker, Digital North Date:
1 Week #1 Objectives Review clients, servers, and Windows network models Differentiate among the editions of Server 2008 Discuss the new Windows Server.
1 Week #1 Objectives Review clients, servers, and Windows network models Differentiate among the editions of Server 2008 Discuss the new Windows Server.
1 © Copyright 2010 EMC Corporation. All rights reserved. EMC RecoverPoint/Cluster Enabler for Microsoft Failover Cluster.
Keith Burns Microsoft UK Mission Critical Database.
An Empirical Examination of Current High-Availability Clustering Solutions’ Performance Jeffrey Absher DePaul University Research Symposium Presentation.
SERVER LOAD BALANCING Presented By : Priya Palanivelu.
Lesson 1: Configuring Network Load Balancing
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
1© Copyright 2011 EMC Corporation. All rights reserved. EMC RECOVERPOINT/ CLUSTER ENABLER FOR MICROSOFT FAILOVER CLUSTER.
VTS INNOVATOR SERIES Real Problems, Real solutions.
Technical solution presentation AVL System for Fire Brigades.
National Manager Database Services
Implementing High Availability
PETAL: DISTRIBUTED VIRTUAL DISKS E. K. Lee C. A. Thekkath DEC SRC.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
Disaster Recovery as a Cloud Service Chao Liu SUNY Buffalo Computer Science.
1 The Google File System Reporter: You-Wei Zhang.
High-Availability Methods Lesson 25. Skills Matrix.
Module 13: Network Load Balancing Fundamentals. Server Availability and Scalability Overview Windows Network Load Balancing Configuring Windows Network.
Module 12: Designing High Availability in Windows Server ® 2008.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Chapter 8 Implementing Disaster Recovery and High Availability Hands-On Virtual Computing.
IT Infrastructure Chap 1: Definition
Leaders Have Vision™ visionsolutions.com 1 Leading Edge Solutions, Proven Technologies Anne-Elisabeth Caillot Pre-Sales & Business Development
Goodbye rows and tables, hello documents and collections.
Page 1 of John Wong CTO Twin Peaks Software Inc. Mirror File System A Multiple Server File System.
Copyright 2006 MySQL AB The World’s Most Popular Open Source Database MySQL Cluster: An introduction Geert Vanderkelen MySQL AB.
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
Overview of high availability in Microsoft SQL Server Szymon Wójcik.
The application of DRBD in Linux-HA Haibo Zhang 4/28/2014.
OSIsoft High Availability PI Replication
 Load balancing is the process of distributing a workload evenly throughout a group or cluster of computers to maximize throughput.  This means that.
1 © 2005 Cisco Systems, Inc. All rights reserved. 111 © 2004, Cisco Systems, Inc. All rights reserved. CNIT 221 Security 2 ver.2 Module 8 City College.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 12: Planning and Implementing Server Availability and Scalability.
High Availability in DB2 Nishant Sinha
MySQL and GRID status Gabriele Carcassi 9 September 2002.
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Linux Operations and Administration
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Virtual Machine Movement and Hyper-V Replica
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
Replicazione e QoS nella gestione di database grid-oriented Barbara Martelli INFN - CNAF.
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.
How to setup DSS V6 iSCSI Failover with XenServer using Multipath Software Version: DSS ver up55 Presentation updated: February 2011.
High-Availability MySQL with DR:BD and Heartbeat: MTV Japan mobile services ©2008 MTV Networks Japan K.K.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
OSIsoft High Availability PI Replication Colin Breck, PI Server Team Dave Oda, PI SDK Team.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
MySQL HA An overview Kris Buytaert. ● Senior Linux and Open Source ● „Infrastructure Architect“ ● I don't remember when I started.
High Availability Clusters in Linux Sulamita Garcia EDS Unix Specialist
USEIMPROVEEVANGELIZE Solutions for High Availability and Disaster Recovery with MySQL ● Detlef Ulherr ● Sun Microsystems.
Backups for Azure SQL Databases and SQL Server instances running on Azure Virtual Machines Session on backup to Azure feature (manual and managed) in SQL.
High Availability 24 hours a day, 7 days a week, 365 days a year…
iSCSI Storage Area Network
Self Healing and Dynamic Construction Framework:
HP ArcSight ESM 6.8c HA Fail Over Illustrated
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
VceTests VCE Test Dumps
Introduction to Networks
High Availability/Disaster Recovery Solution
Presentation transcript:

High-Availability MySQL DB based on DRBD-Heartbeat Ming Yue September 27, 2007 September 27, 2007

2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL 4 Failovers Outline 5 Discussion

Outline 2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL 4 Failovers 5 Discussion

1 Motivation To minimize service interruption time due to unacceptable long-time recovery; To maximize the uptime of our system; Solutions? Network Redundancy + Failover DRBD + Heartbeat High-Availability

Outline 2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL 4 Failovers 5 Discussion

2 DRBD: Distributed Replication Block Device VFS Block Device Block Device... Mapping Layer Disk VFS Block Device Block Device... Mapping Layer Disk Network

2 DRBD: Distributed Replication Block Device (continued) A loadable kernel module of Linux providing real-time data replication to other block device on remote machine.

Block Device Disk Block Device Disk Network /dev/drbd0 Primary “devdrbd01” Secondary “devdrbd02 ” Real-time Replication - Primary/Secondary status is specified manually if no Heartbeat. - Create file system on /dev/drbd0 of Primary node at first. - Only Primary node’s /dev/drbd0 can be mounted to its local directories. /mydrbd (not mountable) mounted /dev/drbd0 2 DRBD: Distributed Replication Block Device (continued)

Block Device Disk Block Device Disk Network /dev/drbd0 (not mountable) Secondary “devdrbd01” Secondary “devdrbd02 ” 2 DRBD: Distributed Replication Block Device (continued)

Block Device Disk Block Device Disk Network /dev/drbd0 Secondary “devdrbd01” Primary “devdrbd02 ” /dev/drbd0 Real-time Replication After manual Primary/Secondary status switch mounted /mydrbd (not mountable) 2 DRBD: Distributed Replication Block Device (continued)

Outline 2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL 4 Failovers 5 Discussion

Heartbeat: A well known high-availability resource manager 3.1 What does heartbeat serve here? In DRBD-Heartbeat-MySQL configuration: 1. Provides the Virtual IP address interface 2. Auto-starts MySQL server on the Primary 3. Talks with the peer’s heartbeat process and starts failover if the Primary’s heartbeat doesn’t respond

3.2 Integrating DRBD-Heartbeat-MySQL “devdrbd” (virtual IP address/hostname) Client /dev/drbd0 MySQL server Disk /var/lib/mysql Heartbeat /dev/drbd0 Disk Heartbeat mounted DRBD Replication Not mountable Secondary “devdrbd02” Primary “devdrbd01” Eth0 Interface Heartbeat Probing

2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL Outline 4 Failovers 5 Discussion 4.1 Failover after Power/Network Interruption 4.2 DRBD Synchronization 4.3 Failover in MySQLstat Plot

4.1 Failover – Power/Network Interruption on the Primary “devdrbd” (virtual IP address/hostname) /dev/drbd0 MySQL server Disk /var/lib/mysql Heartbeat /dev/drbd0 Disk Heartbeat mounted Not mountable Secondary “devdrbd02” Primary “devdrbd01” Eth0 Interface Heartbeat Probing DRBD Replication Power Off No peer to Replicate Un-plug eth0 Cable “devdrbd01” of No peer responding No response from peer heartbeat. Switch!

“devdrbd” (virtual IP address/hostname) /dev/drbd0 Disk Heartbeat /var/lib/mysql MySQL server mounted Heartbeat Probing Eth0 Interface No DRBD Replication Primary “devdrbd02” 4.1 Failover – Power/Network Interruption on the Primary

“devdrbd” (virtual IP address/hostname) /dev/drbd0 Disk /dev/drbd0 Disk Heartbeat /var/lib/mysql Primary “devdrbd02” Secondary “devdrbd01” Eth0 Interface Heartbeat Probing Not mountable MySQL server mounted DRBD Replication Heartbeat DRBD Synchronization Recovered after some time 4.1 Failover – Power/Network Interruption on the Primary

4.2 Failover – DRBD Synchronization DRBD Synchronization: A DRBD procedure which updates data of the Inconsistent node by the data of the Up-to-Date node. When does inconsistency happen? If one machine is powered off or off-line, “write” operation is performed only on the on-line machine.

4.2 Failover – DRBD Synchronization (continued) The speed of DRBD Synchronization In our configuration, the bandwidth of both synchronization and normal replication is 10MB/s in average. Time needed for complete DRBD Synchronization Too much time to accept? DRBD Synchronization is smart. It chooses the recently updated data to synchronize first. It depends on disk size. For our 4TB 64-bit machine, almost 20 hours.

4.3 Workload Simulation/Failover in MySQLstat Plot Environment: Two 64-bit machines configured by DRBD-heartbeat Two 64-bit machines configured by DRBD-heartbeat Install MySQL community on both machines Install MySQL community on both machines Simulate the status and workload of PandaDB Use a typical PandaDB dump as the queried database Use a typical PandaDB dump as the queried database Write workload generator to simulate client queries Write workload generator to simulate client queries It performs balanced query to the PandaDB tables through virtual IP interface and multiple connections. It performs balanced query to the PandaDB tables through virtual IP interface and multiple connections. It has re-connect feature to detect the service interruption and save current query state. It re-creates MySQL sessions when service is available again, and resumes the latest interrupted session. It has re-connect feature to detect the service interruption and save current query state. It re-creates MySQL sessions when service is available again, and resumes the latest interrupted session.

1. General Queries Time Gap Workload >150 Client Connections 4.3 Workload Simulation/Failover in MySQLstat Plot

3. Input/Output 2. Query Type 5% Insert/Delete 48% Update 47% Select 8.8M/sec in average 4.3 Workload Simulation/Failover in MySQLstat Plot

2 DRBD: Distributed Replication Block Device 1 Motivation 3 Integrating DRBD-Heartbeat-MySQL Outline 4 Failovers 5 Discussion 5.1 The Comparison with Master/Slave Replication 5.2 What we have already done 5.3 What we will do next

5.1 The Comparison with Master/Slave Replication Master/Slave is based on MySQL – User Level; DRBD is based on block device – Kernel Level. Master/Slave is asynchronous; DRBD is synchronous. Master/Slave has higher probability of inconsistency. Master/Slave has load-balancing; DRBD doesn’t. Master/Slave is geographically more flexible; DRBD has to be located in the same subnet or neighbor subnets.

5.2 What we have already done now Testing InnoDB MySQL DB on the basis of DRBD-Heartbeat Configuration (on both 32-bit and 64-bit machines): Configuration for integrating DRBD-Heartbeat-MySQL Configuration for integrating DRBD-Heartbeat-MySQL Multi-connection/multi-type workload simulation according to the status of Panda Server Multi-connection/multi-type workload simulation according to the status of Panda Server Failover situations Failover situations Power interruption Power interruption Network interruption Network interruption Automatic/manual DRBD Synchronization Automatic/manual DRBD Synchronization Testing time gap of failover/synchronization by automatically re-connect load generator Testing time gap of failover/synchronization by automatically re-connect load generator

5.3 What we will do next Simulate the workload and failover feature through production Panda Server; Simulate the workload and failover feature through production Panda Server; Quantitative efficiency comparison with Master/Slave Replication; Quantitative efficiency comparison with Master/Slave Replication; Simulate the work load and failover feature according to the status of Archive MyISAM MySQL DB. It has small number of connections, but is highly insert-intensive. Simulate the work load and failover feature according to the status of Archive MyISAM MySQL DB. It has small number of connections, but is highly insert-intensive.

Thank you very much! Questions?