SlideShare a Scribd company logo
Why MySQL High Availability Matters
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why MySQL High Availability Matters
Matt Lord
MySQL Product Manager
@mattalord
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
4
High Availability Explained
Native MySQL High Availability
Highly Available MySQL Reference Architectures
What’s Coming Next for MySQL HA and Scale?
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
5
High Availability Explained
Native MySQL High Availability
Highly Available MySQL Reference Architectures
What’s Coming Next for MySQL HA and Scale?
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Terms and Concepts
• Availability
– Outage and downtime
– Mean Time Between Failures (MTBF)
– Mean Time To Recover (MTTR)
– Service Level Agreement (SLA)
– The Nine’s Scale : 5 nines = 5 mins downtime per year
• Capacity / Performance
• Redundancy
• Fault Tolerance
• Disaster Tolerance/Recovery
6
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Considerations
• SLA requirements
– What is needed to support your business objectives
• Operational capabilities
– Will you have the workforce to implement and maintain it
• Service agility
– Can it grow and change as your company does
• Time to market
– Can you go to market quickly
• Budgetary constraints
– Cost of downtime versus cost of HA implementation
7
What To Use?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Factors
• Environment
– Redundant servers in different datacenters and geographical areas will protect you
against regional issues—power grid failures, hurricanes, earthquakes, etc.
• Hardware
– Each part of your hardware stack—networking, storage, servers—should be redundant
• Software
– Every layer of the software stack needs to be duplicated and distributed across
separate hardware and environments
• Data
– Data loss and inconsistency/corruption must be prevented by having multiple copies of
each piece of data, with consistency checks and guarantees for each change
8
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Design Factors
• Reliability, Availability, and Serviceability (RAS)
– Reliability
• Quality hardware and software components that you can manage and trust
– Availability
• Multiple copies of each datum replicated to separate hardware
• Multiple copies of each piece of the hardware and software stack
• Multiple physical locations
– Separate power grids
– Enough physical distance to survive disasters such as floods, earthquakes, and power grid outages
• Resiliency
– Automation to transparently deal with any potential failure in the infrastructure, hardware, software
– Serviceability
• Ensure that you can monitor, diagnose, maintain, and repair it all
9
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Acceptable Performance
• Performance outside of acceptable bounds is unavailability
– Determine your acceptable application response times
– Ensure that you can measure impact from each layer of stack
– Determine failure versus load
• Scale up/out or failover
• Build elasticity into each layer
– Quickly and easily scale up and down to handle changing load and traffic patterns
10
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: The Causes of Downtime
11
40%
40%
20%
Software/Application Human Error Hardware
* Source: Gartner Group 1998 survey
A study by the Gartner Group
projected that through 2015,
80% of downtime will be due
to people and process issues
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: The Business Cost of Downtime
• Calculate a cost per minute of downtime
– Average revenue generated per-minute over a year
– Cost of not meeting any customer SLAs
– Factor in costs that are harder to quantify
1. Revenue
2. Reputation
3. Customer sentiment
4. Stock price
5. Service’s success
6. Company’s very existence
12
THIS is why
HA matters!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
High Availability: Database Needs
• Management infrastructure
– Monitoring of status, health, performance
• Facilities for service changes, service transitions
• Failure detection and handling
– Identify and handle failures
• Elasticity
– Scale up to ensure acceptable performance is always maintained
• Consistency guarantees
– Conflict detection and handling ; data loss protection/prevention
• Online maintenance
13
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• Recovery Time Objective
– Maximum length of downtime before
there is break in “business continuity”
• Recovery Point Objective
– Point in time to which data must be
recovered when service is re-
established
Tier 1
• Mission-critical services
Tier 2
• Business-critical services
Tier 3
• Task-critical services
Tier 4
• Non-critical services
14
High Availability: Does The Application Require It?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL
Master/Slave
Replication
Master/Slave with
Automated
Failover
DRBD
OS or VM
vendor
active/passive
solutions
MySQL Group
Replication
High Availability: Common MySQL Solutions
9 9 . 9 9 9 %
15
Continuous
Availability
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
16
High Availability Explained
Native MySQL High Availability
Highly Available MySQL Reference Architectures
What’s Coming Next for MySQL HA and Scale?
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
C
B
A
C
B
ACRASH
C
B
A
Now B is the
new master
Uh Oh! It’s OK!
A major building block for high availability
What is Replication Used For?
17
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Group Replication
18
App Servers with
MySQL Router
MySQL Group Replication
“High Availability becomes a core
first class feature of MySQL!”
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: What Is It?
• Group Replication library
– Implementation of Replicated Database State Machine
theory
• MySQL GCS is based on Paxos (variant of Mencius)
– Provides virtually synchronous replication for MySQL 5.7+
– Supported on all MySQL platforms
• Linux, Windows, Solaris, OSX, FreeBSD
“Multi-master update anywhere replication plugin for MySQL with
built-in conflict detection and resolution, automatic distributed
recovery, and group membership.”
19
App Servers with
MySQL Router
MySQL Group Replication
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
• A highly available distributed MySQL database service
– Clustering eliminates single points of failure (SPOF)
• Allows for online maintenance
– Removes the need for manually handling server fail-over
– Provides distributed fault tolerance and self-healing
– Enables Active/Active update anywhere setups
– Automates reconfiguration (adding/removing nodes, crashes, failures)
– Makes it easy to scale up/down based on demand
– Automatically ensures data consistency
• Detects and handles conflicts
• Prevents data loss
• Prevents data corruption
20
MySQL Group Replication: What Does It Provide?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Use Cases
• Elastic Replication
– Environments that require a very fluid replication infrastructure, where the number
of servers has to grow or shrink dynamically and with little pain as possible.
• Highly Available Shards
– Sharding is a popular approach to achieve write scale-out. Users can use MySQL
Group Replication to implement highly available shards in a federated system. Each
shard can map into a Replication Group.
• Alternative to Master-Slave Replication
– It may be that a single master server makes it a single point of contention. Writing to
an entire group may prove more scalable under certain circumstances.
21
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: What Sets It Apart?
• Built by the MySQL Engineering Team
– Natively integrated into Server: InnoDB, Replication, GTIDs, Performance Schema, SYS
– Built-in, no need for separate downloads
– Available on all platforms [Linux, Windows, Solaris, FreeBSD, etc]
• Better performance than similar offerings
– MySQL GCS has optimized network protocol that reduces the impact on latency
• Easier monitoring
– Simple Performance Schema tables for group and node status/stats
– Native support for Group Replication coming to MySQL Enterprise Monitor
• Modern full stack MySQL HA being built around it
– Native end-to-end easy to use sharded InnoDB clusters
22
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Architecture
Node Types
R: Traffic routers/proxies: mysqlrouter, haproxy, sqlproxy, ...
M: mysqld nodes participating in Group Replication
23
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Stack
• The Group Replication plugin is responsible for
– Maintaining distributed execution context
– Detecting and handling conflicts
– Handling distributed recovery
• Detect membership changes
• Donate state if needed
• Collect state if needed
– Proposing transactions to other members
– Receiving and handling transactions from other
members
– Deciding the ultimate fate of transactions
• commit or rollback
24
GCS API
Replication
Plugin
Plugin API
MySQL
Server
Group Comm.
System (Corosync)
Group Com. Engine
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Stack
• The Group Communication System API:
– Abstracts the underlying group communication system
implementation from the plugin itself
– Maps the interface to a specific group communication
system implementation
• The Group Communication System engine:
– Variant of Paxos developed at MySQL
– Building block to provide distributed agreement
between servers
25
GCS API
Replication
Plugin
Plugin API
MySQL
Server
Group Comm.
System (Corosync)
Group Com. Engine
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication: Performance Comparison
26
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL InnoDB Cluster: The Full Stack
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
Group Replication
27
Now
GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell
28
A single unified client for all administrative and operations tasks
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
• Multi-Language: JavaScript, Python, and SQL
– Naturally scriptable
• Supports both Document and Relational models
• Exposes full Development and Admin API
”MySQL Shell provides the developer and DBA with a single intuitive,
flexible, and powerful interface for all MySQL related tasks!”
InnoDB Cluster
Now GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell: Admin API
• mysql-js> dba.help()
• The global variable 'dba' is used to access the
MySQL AdminAPI
• Perform DBA operations
– Manage MySQL InnoDB clusters
• Create clusters
• Validate MySQL instances
• Configure MySQL instances
• Get cluster info
• Modify clusters
Database Administration Interface
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
29
InnoDB Cluster
Now GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
• Transparent client connection routing
– Load balancing
– Application connection failover
• Stateless design offers easy HA client routing
– A local Router becomes part of the application stack
”MySQL Router allows you to easily migrate your standalone MySQL
instances to natively distributed and highly available InnoDB Clusters
without affecting existing applications!”
30
Transparent access to HA databases for MySQL Applications
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
InnoDB Cluster
Now GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Router: 2.1
• Native support for InnoDB clusters
– Understands Group Replication topology
– Utilizes metadata schema stored on each member
• Bootstraps itself and sets up client routing for the InnoDB cluster
• Allows for intelligent client routing into the InnoDB cluster
– Supports multi-master and single primary modes
• Core improvements
– Built-in keyring for easy and secure password management
31
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
”MySQL Router 2.1, with the new metadata_cache plugin, provides
transparent client connection routing and failover into your InnoDB clusters!”
InnoDB Cluster
Now GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
32
High Availability Explained
Native MySQL High Availability
Highly Available MySQL Reference Architectures
What’s Coming Next for MySQL HA and Scale?
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Hardware and Infrastructure Notes
• 3, 5, or 7 machines per group
– Isolate machine resources as much as possible
– Limit virtualization layers
– Machines configured for dedicated database server role
• Recommended configuration for HPC setups
– 32-64 vCPUs with fast CPU clock (2.5GHz+)
– SSDs (for data and replication logs)
– High quality network connection between each machine
• Low latency, high throughput, reliable
• Limit network switches, routers, and hubs as much as possible
• Isolated and dedicated network when possible
33
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Shared Nothing Cluster – Single Data Center
34
Application Servers
MySQL Router in Stack
MySQL Database Service
Group Replication
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Shared Nothing Cluster – Cross Data Center
35
MySQL Database Service
Group Replication
Data Center 1 Data Center 2
Clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Geographically Redundant Cluster
36
Async Replication
Active Data Center Backup Data Center
Clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Active/Active Multi-Data Center Setup
37
Async Replication
Regional Data Center Regional Data Center
Regional ClientsRegional Clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
38
High Availability Explained
Native MySQL High Availability
Highly Available MySQL Reference Architectures
What’s Coming Next for MySQL HA and Scale?
1
2
3
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 39
MySQL HA
Out-Of-Box HA
Read Scale-Out
Async Replication + Auto Failover
Write Scale-Out
ShardingS1
S2
S3
* InnoDB Cluster Now GA!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
MySQL InnoDB Cluster: Architecture – Step 2
Group Replication
Read-Only Slaves
40
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
MySQL Connector
Application
MySQL Router
MySQL Shell
HA
ReplicaSet1
S1 S2 S3 S4 S…
M
M M
MySQL Connector
Application
MySQL Router
HA
ReplicaSet2
ReplicaSet3
MySQL Connector
Application
MySQL Router
MySQL InnoDB Cluster: Architecture – Step 3
S1 S2 S3 S4
M
M M
HA
41
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Sharded InnoDB Clusters
• Group Replication
– Each shard is a highly available replica set
• MySQL Router
– Manages shard mappings and related metadata
– Manages client routing
– Provides cross shard execution framework
• On top of distributed query execution facilities present in Server
• MySQL Shell
– Exposes management and orchestration features
42
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor
• Native holistic support for Group Replication / InnoDB clusters (GA in 3.4!)
– Topology views
– Detailed metrics and graphs
– Best Practice advice
• Monitoring of MySQL Routers
43
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 44
MySQL InnoDB Cluster: The End Goal
M
App
M M
MySQL Shell and Orchestration Tooling
MApp
M M
Simple Shard Mapping,
State and Extra
Metadata
Control, Coordinate,
Provision
...
Monitoring (MEM)
MySQL Router Group Replication – Shard 1
Group Replication – Shard N
MySQL Router
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud: MySQL Cloud Service
• MySQL Enterprise Edition
• Web based console to manage your MySQL Cloud instances
• Self-Service Provisioning
• Elastic Scalability
• Multi-Layered Security
• Unified Cloud Management
• Oracle PaaS and IaaS Integration
• Premier Technical Support included
45
Integrated HA and DR
service options – utilizing
InnoDB Clusters – coming
soon!
Why MySQL High Availability Matters

More Related Content

PDF
MySQL 5.7 InnoDB Cluster (Jan 2018)
PDF
MySQL High Availability -- InnoDB Clusters
PDF
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
PDF
MySQL for Software-as-a-Service (SaaS)
PDF
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
PDF
Unlocking Big Data Insights with MySQL
PDF
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
PDF
MySQL InnoDB Cluster and NDB Cluster
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL High Availability -- InnoDB Clusters
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL for Software-as-a-Service (SaaS)
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Unlocking Big Data Insights with MySQL
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster

What's hot (20)

PDF
MySQL Replication Performance Tuning for Fun and Profit!
PDF
MySQL Document Store
PDF
MySQL 5.7: What's New, Nov. 2015
PDF
MySQL Security
PDF
MySQL Cloud Service Deep Dive
PDF
MySQL InnoDB Cluster - Group Replication
PDF
MySQL Group Replication - HandsOn Tutorial
PDF
MySQL 5.7 Replication News
PPTX
MySQL High Availibility Solutions
PDF
replic8 - Replication in MySQL 8
PDF
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
PDF
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
PDF
MySQL Manchester TT - 5.7 Whats new
PDF
MySQL Day Paris 2016 - State Of The Dolphin
PPTX
MySQL Tech Tour 2015 - 5.7 Security
PDF
MySQL 5.6, news in 5.7 and our HA options
PDF
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
PDF
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
PDF
MySQL 5.7: Focus on Replication
PDF
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Document Store
MySQL 5.7: What's New, Nov. 2015
MySQL Security
MySQL Cloud Service Deep Dive
MySQL InnoDB Cluster - Group Replication
MySQL Group Replication - HandsOn Tutorial
MySQL 5.7 Replication News
MySQL High Availibility Solutions
replic8 - Replication in MySQL 8
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Manchester TT - 5.7 Whats new
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Tech Tour 2015 - 5.7 Security
MySQL 5.6, news in 5.7 and our HA options
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL 5.7: Focus on Replication
MySQL Day Paris 2016 - MySQL Enterprise Edition
Ad

Viewers also liked (20)

PDF
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
PPTX
Mysql参数-GDB
PPTX
2010丹臣的思考
ODP
Mysql For Developers
PDF
Reducing Risk When Upgrading MySQL
PDF
SQL Outer Joins for Fun and Profit
PDF
MySQL 5.7: Focus on InnoDB
PDF
MySQL High-Availability and Scale-Out architectures
PDF
Successful Scalability Principles - Part 1
PDF
MySQL Server Defaults
PDF
Online MySQL Backups with Percona XtraBackup
PPTX
High Availability Using MySQL Group Replication
PDF
Мониторинг и отладка MySQL: максимум информации при минимальных потерях
PDF
MySQL - checklist для новичка в Highload
PDF
MySQL High Availability with Group Replication
PDF
Java MySQL Connector & Connection Pool Features & Optimization
PDF
Advanced Percona XtraDB Cluster in a nutshell... la suite
PDF
Using Apache Spark and MySQL for Data Analysis
PDF
A New Architecture for Group Replication in Data Grid
PDF
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mysql参数-GDB
2010丹臣的思考
Mysql For Developers
Reducing Risk When Upgrading MySQL
SQL Outer Joins for Fun and Profit
MySQL 5.7: Focus on InnoDB
MySQL High-Availability and Scale-Out architectures
Successful Scalability Principles - Part 1
MySQL Server Defaults
Online MySQL Backups with Percona XtraBackup
High Availability Using MySQL Group Replication
Мониторинг и отладка MySQL: максимум информации при минимальных потерях
MySQL - checklist для новичка в Highload
MySQL High Availability with Group Replication
Java MySQL Connector & Connection Pool Features & Optimization
Advanced Percona XtraDB Cluster in a nutshell... la suite
Using Apache Spark and MySQL for Data Analysis
A New Architecture for Group Replication in Data Grid
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Ad

Similar to Why MySQL High Availability Matters (20)

PDF
Why MySQL High Availability Matters
PDF
Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...
PDF
MySQL InnoDB Cluster HA Overview & Demo
PDF
1 architecture & design
PDF
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
PDF
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
PPTX
Tech Talk Series, Part 4: How do you achieve high availability in a MySQL env...
PDF
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
PPTX
MySQL High Availability Solutions - Feb 2015 webinar
PDF
MySQL Database Architectures - 2022-08
PDF
MySQL High Availability Solutions
PDF
Sunshine php my sql 8.0 v2
PDF
Netherlands Tech Tour 02 - MySQL Fabric
PDF
Boston meetup : MySQL Innodb Cluster - May 1st 2017
PDF
Introduction to MySQL InnoDB Cluster
PDF
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
PDF
MySQL Database Architectures - High Availability and Disaster Recovery Solution
PDF
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
PDF
20120426 high availability MySQL
PDF
Scaling MySQL -- Swanseacon.co.uk
Why MySQL High Availability Matters
Moodle Moot Spain: Moodle Available and Scalable with MySQL HA - InnoDB Clust...
MySQL InnoDB Cluster HA Overview & Demo
1 architecture & design
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
Tech Talk Series, Part 4: How do you achieve high availability in a MySQL env...
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
MySQL High Availability Solutions - Feb 2015 webinar
MySQL Database Architectures - 2022-08
MySQL High Availability Solutions
Sunshine php my sql 8.0 v2
Netherlands Tech Tour 02 - MySQL Fabric
Boston meetup : MySQL Innodb Cluster - May 1st 2017
Introduction to MySQL InnoDB Cluster
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
20120426 high availability MySQL
Scaling MySQL -- Swanseacon.co.uk

More from Matt Lord (11)

PPTX
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
PPTX
MongDB Mobile: Bringing the Power of MongoDB to Your Device
PPTX
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
PPTX
Using MySQL Containers
PDF
OpenStack Days East -- MySQL Options in OpenStack
PDF
MySQL Group Replication - an Overview
PDF
OpenStack and MySQL
PPTX
MySQL DBaaS with OpenStack Trove
PPTX
Getting Started with MySQL Full Text Search
PPTX
Using MySQL in the Cloud
PDF
MySQL 5.7 GIS
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
MongDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
Using MySQL Containers
OpenStack Days East -- MySQL Options in OpenStack
MySQL Group Replication - an Overview
OpenStack and MySQL
MySQL DBaaS with OpenStack Trove
Getting Started with MySQL Full Text Search
Using MySQL in the Cloud
MySQL 5.7 GIS

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPTX
1. Introduction to Computer Programming.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Mushroom cultivation and it's methods.pdf
Machine learning based COVID-19 study performance prediction
1. Introduction to Computer Programming.pptx
Getting Started with Data Integration: FME Form 101
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25-Week II
SOPHOS-XG Firewall Administrator PPT.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Assigned Numbers - 2025 - Bluetooth® Document
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine Learning_overview_presentation.pptx
Tartificialntelligence_presentation.pptx
Heart disease approach using modified random forest and particle swarm optimi...
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
OMC Textile Division Presentation 2021.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Mushroom cultivation and it's methods.pdf

Why MySQL High Availability Matters

  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Why MySQL High Availability Matters Matt Lord MySQL Product Manager @mattalord
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 4 High Availability Explained Native MySQL High Availability Highly Available MySQL Reference Architectures What’s Coming Next for MySQL HA and Scale? 1 2 3 4
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 5 High Availability Explained Native MySQL High Availability Highly Available MySQL Reference Architectures What’s Coming Next for MySQL HA and Scale? 1 2 3 4
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Terms and Concepts • Availability – Outage and downtime – Mean Time Between Failures (MTBF) – Mean Time To Recover (MTTR) – Service Level Agreement (SLA) – The Nine’s Scale : 5 nines = 5 mins downtime per year • Capacity / Performance • Redundancy • Fault Tolerance • Disaster Tolerance/Recovery 6
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Considerations • SLA requirements – What is needed to support your business objectives • Operational capabilities – Will you have the workforce to implement and maintain it • Service agility – Can it grow and change as your company does • Time to market – Can you go to market quickly • Budgetary constraints – Cost of downtime versus cost of HA implementation 7 What To Use?
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Factors • Environment – Redundant servers in different datacenters and geographical areas will protect you against regional issues—power grid failures, hurricanes, earthquakes, etc. • Hardware – Each part of your hardware stack—networking, storage, servers—should be redundant • Software – Every layer of the software stack needs to be duplicated and distributed across separate hardware and environments • Data – Data loss and inconsistency/corruption must be prevented by having multiple copies of each piece of data, with consistency checks and guarantees for each change 8
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Design Factors • Reliability, Availability, and Serviceability (RAS) – Reliability • Quality hardware and software components that you can manage and trust – Availability • Multiple copies of each datum replicated to separate hardware • Multiple copies of each piece of the hardware and software stack • Multiple physical locations – Separate power grids – Enough physical distance to survive disasters such as floods, earthquakes, and power grid outages • Resiliency – Automation to transparently deal with any potential failure in the infrastructure, hardware, software – Serviceability • Ensure that you can monitor, diagnose, maintain, and repair it all 9
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Acceptable Performance • Performance outside of acceptable bounds is unavailability – Determine your acceptable application response times – Ensure that you can measure impact from each layer of stack – Determine failure versus load • Scale up/out or failover • Build elasticity into each layer – Quickly and easily scale up and down to handle changing load and traffic patterns 10
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: The Causes of Downtime 11 40% 40% 20% Software/Application Human Error Hardware * Source: Gartner Group 1998 survey A study by the Gartner Group projected that through 2015, 80% of downtime will be due to people and process issues
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: The Business Cost of Downtime • Calculate a cost per minute of downtime – Average revenue generated per-minute over a year – Cost of not meeting any customer SLAs – Factor in costs that are harder to quantify 1. Revenue 2. Reputation 3. Customer sentiment 4. Stock price 5. Service’s success 6. Company’s very existence 12 THIS is why HA matters!
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | High Availability: Database Needs • Management infrastructure – Monitoring of status, health, performance • Facilities for service changes, service transitions • Failure detection and handling – Identify and handle failures • Elasticity – Scale up to ensure acceptable performance is always maintained • Consistency guarantees – Conflict detection and handling ; data loss protection/prevention • Online maintenance 13
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | • Recovery Time Objective – Maximum length of downtime before there is break in “business continuity” • Recovery Point Objective – Point in time to which data must be recovered when service is re- established Tier 1 • Mission-critical services Tier 2 • Business-critical services Tier 3 • Task-critical services Tier 4 • Non-critical services 14 High Availability: Does The Application Require It?
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Master/Slave Replication Master/Slave with Automated Failover DRBD OS or VM vendor active/passive solutions MySQL Group Replication High Availability: Common MySQL Solutions 9 9 . 9 9 9 % 15 Continuous Availability
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 16 High Availability Explained Native MySQL High Availability Highly Available MySQL Reference Architectures What’s Coming Next for MySQL HA and Scale? 1 2 3 4
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | C B A C B ACRASH C B A Now B is the new master Uh Oh! It’s OK! A major building block for high availability What is Replication Used For? 17
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Group Replication 18 App Servers with MySQL Router MySQL Group Replication “High Availability becomes a core first class feature of MySQL!”
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: What Is It? • Group Replication library – Implementation of Replicated Database State Machine theory • MySQL GCS is based on Paxos (variant of Mencius) – Provides virtually synchronous replication for MySQL 5.7+ – Supported on all MySQL platforms • Linux, Windows, Solaris, OSX, FreeBSD “Multi-master update anywhere replication plugin for MySQL with built-in conflict detection and resolution, automatic distributed recovery, and group membership.” 19 App Servers with MySQL Router MySQL Group Replication
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | • A highly available distributed MySQL database service – Clustering eliminates single points of failure (SPOF) • Allows for online maintenance – Removes the need for manually handling server fail-over – Provides distributed fault tolerance and self-healing – Enables Active/Active update anywhere setups – Automates reconfiguration (adding/removing nodes, crashes, failures) – Makes it easy to scale up/down based on demand – Automatically ensures data consistency • Detects and handles conflicts • Prevents data loss • Prevents data corruption 20 MySQL Group Replication: What Does It Provide?
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: Use Cases • Elastic Replication – Environments that require a very fluid replication infrastructure, where the number of servers has to grow or shrink dynamically and with little pain as possible. • Highly Available Shards – Sharding is a popular approach to achieve write scale-out. Users can use MySQL Group Replication to implement highly available shards in a federated system. Each shard can map into a Replication Group. • Alternative to Master-Slave Replication – It may be that a single master server makes it a single point of contention. Writing to an entire group may prove more scalable under certain circumstances. 21
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: What Sets It Apart? • Built by the MySQL Engineering Team – Natively integrated into Server: InnoDB, Replication, GTIDs, Performance Schema, SYS – Built-in, no need for separate downloads – Available on all platforms [Linux, Windows, Solaris, FreeBSD, etc] • Better performance than similar offerings – MySQL GCS has optimized network protocol that reduces the impact on latency • Easier monitoring – Simple Performance Schema tables for group and node status/stats – Native support for Group Replication coming to MySQL Enterprise Monitor • Modern full stack MySQL HA being built around it – Native end-to-end easy to use sharded InnoDB clusters 22
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: Architecture Node Types R: Traffic routers/proxies: mysqlrouter, haproxy, sqlproxy, ... M: mysqld nodes participating in Group Replication 23
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: Stack • The Group Replication plugin is responsible for – Maintaining distributed execution context – Detecting and handling conflicts – Handling distributed recovery • Detect membership changes • Donate state if needed • Collect state if needed – Proposing transactions to other members – Receiving and handling transactions from other members – Deciding the ultimate fate of transactions • commit or rollback 24 GCS API Replication Plugin Plugin API MySQL Server Group Comm. System (Corosync) Group Com. Engine
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: Stack • The Group Communication System API: – Abstracts the underlying group communication system implementation from the plugin itself – Maps the interface to a specific group communication system implementation • The Group Communication System engine: – Variant of Paxos developed at MySQL – Building block to provide distributed agreement between servers 25 GCS API Replication Plugin Plugin API MySQL Server Group Comm. System (Corosync) Group Com. Engine
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication: Performance Comparison 26
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL InnoDB Cluster: The Full Stack M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA Group Replication 27 Now GA!
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Shell 28 A single unified client for all administrative and operations tasks App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate • Multi-Language: JavaScript, Python, and SQL – Naturally scriptable • Supports both Document and Relational models • Exposes full Development and Admin API ”MySQL Shell provides the developer and DBA with a single intuitive, flexible, and powerful interface for all MySQL related tasks!” InnoDB Cluster Now GA!
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Shell: Admin API • mysql-js> dba.help() • The global variable 'dba' is used to access the MySQL AdminAPI • Perform DBA operations – Manage MySQL InnoDB clusters • Create clusters • Validate MySQL instances • Configure MySQL instances • Get cluster info • Modify clusters Database Administration Interface App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate 29 InnoDB Cluster Now GA!
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Router • Transparent client connection routing – Load balancing – Application connection failover • Stateless design offers easy HA client routing – A local Router becomes part of the application stack ”MySQL Router allows you to easily migrate your standalone MySQL instances to natively distributed and highly available InnoDB Clusters without affecting existing applications!” 30 Transparent access to HA databases for MySQL Applications App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate InnoDB Cluster Now GA!
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Router: 2.1 • Native support for InnoDB clusters – Understands Group Replication topology – Utilizes metadata schema stored on each member • Bootstraps itself and sets up client routing for the InnoDB cluster • Allows for intelligent client routing into the InnoDB cluster – Supports multi-master and single primary modes • Core improvements – Built-in keyring for easy and secure password management 31 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate ”MySQL Router 2.1, with the new metadata_cache plugin, provides transparent client connection routing and failover into your InnoDB clusters!” InnoDB Cluster Now GA!
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 32 High Availability Explained Native MySQL High Availability Highly Available MySQL Reference Architectures What’s Coming Next for MySQL HA and Scale? 1 2 3 4
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Hardware and Infrastructure Notes • 3, 5, or 7 machines per group – Isolate machine resources as much as possible – Limit virtualization layers – Machines configured for dedicated database server role • Recommended configuration for HPC setups – 32-64 vCPUs with fast CPU clock (2.5GHz+) – SSDs (for data and replication logs) – High quality network connection between each machine • Low latency, high throughput, reliable • Limit network switches, routers, and hubs as much as possible • Isolated and dedicated network when possible 33
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Shared Nothing Cluster – Single Data Center 34 Application Servers MySQL Router in Stack MySQL Database Service Group Replication
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Shared Nothing Cluster – Cross Data Center 35 MySQL Database Service Group Replication Data Center 1 Data Center 2 Clients
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Geographically Redundant Cluster 36 Async Replication Active Data Center Backup Data Center Clients
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Active/Active Multi-Data Center Setup 37 Async Replication Regional Data Center Regional Data Center Regional ClientsRegional Clients
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 38 High Availability Explained Native MySQL High Availability Highly Available MySQL Reference Architectures What’s Coming Next for MySQL HA and Scale? 1 2 3 4
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 39 MySQL HA Out-Of-Box HA Read Scale-Out Async Replication + Auto Failover Write Scale-Out ShardingS1 S2 S3 * InnoDB Cluster Now GA!
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA MySQL InnoDB Cluster: Architecture – Step 2 Group Replication Read-Only Slaves 40
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router MySQL Connector Application MySQL Router MySQL Shell HA ReplicaSet1 S1 S2 S3 S4 S… M M M MySQL Connector Application MySQL Router HA ReplicaSet2 ReplicaSet3 MySQL Connector Application MySQL Router MySQL InnoDB Cluster: Architecture – Step 3 S1 S2 S3 S4 M M M HA 41
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Sharded InnoDB Clusters • Group Replication – Each shard is a highly available replica set • MySQL Router – Manages shard mappings and related metadata – Manages client routing – Provides cross shard execution framework • On top of distributed query execution facilities present in Server • MySQL Shell – Exposes management and orchestration features 42
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Monitor • Native holistic support for Group Replication / InnoDB clusters (GA in 3.4!) – Topology views – Detailed metrics and graphs – Best Practice advice • Monitoring of MySQL Routers 43
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 44 MySQL InnoDB Cluster: The End Goal M App M M MySQL Shell and Orchestration Tooling MApp M M Simple Shard Mapping, State and Extra Metadata Control, Coordinate, Provision ... Monitoring (MEM) MySQL Router Group Replication – Shard 1 Group Replication – Shard N MySQL Router
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Cloud: MySQL Cloud Service • MySQL Enterprise Edition • Web based console to manage your MySQL Cloud instances • Self-Service Provisioning • Elastic Scalability • Multi-Layered Security • Unified Cloud Management • Oracle PaaS and IaaS Integration • Premier Technical Support included 45 Integrated HA and DR service options – utilizing InnoDB Clusters – coming soon!