SlideShare una empresa de Scribd logo
1 de 34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric
High Availability for MYSQL
Mark Swarbrick
Principle Presales Consultant MySQL UK&I
March, 2015
Copyright © 2015, 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.
2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Requirements for Next Gen Services
Simple, transparent High Availability
Delivering SQL & ACID at scale
Where MySQL Fabric fits
1
2
3
4
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Requirements for Next Gen Services
Simple, transparent High Availability
Delivering SQL & ACID at scale
Where MySQL Fabric fits
1
2
3
4
4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Focus on driving the business rather than on infrastructure
Business Priorities for IT
Deliver new
services
Real-Time
Insight from
Data
Simplify
Architecture
Fast Time to
Market
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Application Requirements
High Availability Scale Data & User Loads
OLTP & Analytics Elastic
Responsive & Agile
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric
An extensible and easy-to-
use framework for
managing a farm of MySQL
server supporting high-
availability and sharding
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric 1.5
• High Availability
– Server monitoring with auto-promotion and
transparent application failover
• Optionally scale-out through sharding
– Application provides shard key
– Range or Hash
– Tools for resharding
– Global updates & tables
• Fabric-aware connectors rather than
proxy: Python, Java, PHP, .NET, C (labs)
– Lower latency, bottleneck-free
• Server provisioning using OpenStack etc.
High Availability + Sharding-Based Scale-out
MySQL Fabric
Connector
Application
Read-slaves
SQL
HA group
Read-slaves
HA group
Connector
Application
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Requirements for Next Gen Services
Simple, transparent High Availability
Delivering SQL & ACID at scale
Where MySQL Fabric fits
1
2
3
4
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Layers of HA
Redundant Access
to Data
Data Redundancy
Redundant App Servers
Routing to the Data
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Asynchronous
– MySQL Default
– In parallel: Master acks
to app and sends
transaction to slave
• Fast
• Risk of lost changes if
master dies
• Synchronous
– Only available with
MySQL Cluster
– Serially: Master waits
for change to be
applied on all slaves
before ack to app
• Higher latency
• If Active/Active, best
suited to small
transactions
• Lossless
• Semi-Synchronous
– MySQL 5.5+ - Enhanced
in MySQL 5.7
– Serially: Master waits
for change to be
received by slave then
In parallel ack to app
and apply changes on
slave
• Intermediate latency
• Lossless (MySQL 5.7)
Asynchronous vs. Synchronous Replication
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric Framework (HA)
All Data
Primary Secondary
Extra Read ReplicasMySQL Fabric
Controller
SQL Queries
State &
Routing Info
HA Group
Coordination
and Control
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Replication & MySQL Fabric HA
• MySQL Replication is the initial implementation used in HA Groups
– PRIMARY = Replication Master & receives all writes
– SECONDARY = Replication Slave & receives share of reads
• Failover
– MySQL Fabric detects failure of PRIMARY/Master
– Selects a SECONDARY/Slave and promotes it
– Updates State Store
– Updated state fetched by Fabric-aware connectors
How this effects failover
13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
High-Availability Group Concept
• Abstract Concept
– Set of servers
– Server attributes
• Connector Attributes
– Connection information
– Mode: read-only, read-write, ...
– Weight: distribute load
• Management Attributes
– State: state/role of the server
State: Primary
Mode: Read-Write
Host: server-1.example.com
14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Create HA Groups and add Servers
• Define a group
mysqlfabric group create my_group
• Add servers to group
mysqlfabric group add my_group server1.example.com
mysqlfabric group add my_group server2.example.com
15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Create HA Groups and add Servers
• Promote one server to be primary
mysqlfabric group promote my_group
• Tell failure detector to monitor group
mysqlfabric group activate my_group
16
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Requirements for Next Gen Services
Simple, transparent High Availability
Delivering SQL & ACID at scale
Where MySQL Fabric fits
1
2
3
4
17
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The Path to Scalability
• Scaling on dense, multi-
core, multi-thread servers
– 10s - 100GBs RAM
– SSDs
• Scale across cores within a
single instance
• You can get a long way
with MySQL 5.6 & 5.7!
Scaling-Up can take you a long way
18
0
2,000
4,000
6,000
8,000
10,000
12,000
14,000
16,000
18,000
8 16 32 64 128 256 512 1,024
TransactionsperSecond
Connections
MySQL 5.7: Sysbench OLTP Read Write
MySQL
5.7
MySQL
5.6
MySQL
5.5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Write scalability
– Can handle more writes
• Large data set
– Database too large
– Does not fit on single server
• Improved performance
– Smaller index size
– Smaller working set
– Improve performance (reads and
writes)
Benefits of Sharding
UID 10000-20000 UID 20001-40000
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Connector API Extensions
– Support Transactions
– Support full SQL
• Decision logic in connector
– Reducing network load
• Shard Multiple Tables
– Using same key
• Global Updates
– Global tables
– Schema updates
• Sharding Functions
– Range
– (Consistent) Hash
• Shard Operations
– Shard move
– Shard split
• Server Provisioning
– Integrated with OpenStack & other
frameworks
MySQL Fabric Sharding & Provisioning Features
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Sharding Architecture
Shards
MySQL Fabric Node
Application
Global
Group
Global Updates
Shard
Updates
Replication
21
Connector
Connector
Connector
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric (HA + Sharding)
Global Data
Primary Secondary
Shard 1
Primary Secondary
Shard 2
Primary Secondary
MySQL Fabric
Controller
SQL Queries
Server/Shard State &
Mapping
Global Group HA Group
Coordination and
Control
HA Group
Extra Read Replicas Extra Read Replicas
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric: Sharding Setup
• Set up some groups
– my_global – for global updates
– my_group.N – for the shards
– Add servers to the groups
• Create a shard mapping
– A “distributed database”
– Mapping keys to shards
– Give information on what tables are sharded
• Add shards
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric:
• Moving a shard (id=5) from existing group to another (my_group.8)
mysqlfabric sharding move 5 my_group.8
• Splitting a shard (id=5) into two parts with new half stored in group
my_group.6
mysqlfabric sharding split 5 my_group.6
Moving and Splitting Shards
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Indicate tables to be used in query
– Property: tables
– Fabric will compute map
• Indicate read-only queries
– Property: mode
• Provide sharding key
– Property: key
– Fabric will compute shard
• Joins within the shard (or with
global tables) supported
Connector API: Shard Specific Query
conn.set_property(tables=["test.subscribers"], key=sub_no, mode=fabric.MODE_READONLY)
cur = conn.cursor()
cur.execute(
"SELECT first_name, last_name FROM subscribers WHERE sub_no = %s", (sub_no)
)
for row in cur:
print row
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Set global scope
– Property: scope
– Query goes to global group
Connector API: Global Update
conn.set_property(tables=[], scope='GLOBAL')
cur = conn.cursor()
cur.execute("ALTER TABLE test.subscribers ADD nickname VARCHAR(64)")
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
> mysqlfabric provider register
my_stack 
my_user my_password 
http://8.21.28.222:5000/v2.0/ 
--tenant=my_user_role 
--provider_type=OPENSTACK
> mysqlfabric machine create
my_stack 
--image id=8c92f0d9-79f1-4d95-
b398-86bda7342a2d 
--flavor name=m1.small
> mysqlfabric machine list my_stack
• Fabric creates new machines, &
MySQL Servers
– Initially using OpenStack Nova
– Other frameworks on the way
(OpenStack Trove, AWS,…)
• Server setup
– Clones slave
– Sets up replication
– Performs custom operations
27
Server Provisioning – OpenStack Nova Integration
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Extensible Architecture
MySQL Fabric Node
Connector
Connector
Connector
MySQL Fabric
Framework
AMQP? MySQL XML-RPC
Executor
State Store
(persister)
Shard
HA
Prov
MySQL
Backing
Store
SQL
28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Connector API Extensions
– Support Transactions
– Support full SQL
• Fabric-Aware Connectors at GA:
– PHP + Doctrine, Python, Java + Hibernate, .NET,
C (pre-GA)
• Decision logic in connector
– Reducing latency &network load
• Load Balancing
– Read-Write Split
– Distribute transactions
• Global Updates
– Global data
– Schema updates
• Sharding Functions
– Range
– (Consistent) Hash
• Shard Operations
– Shard move
– Shard split
• Server Provisioning
– OpenStack Integration (& other frameworks)
MySQL Fabric: Goals & Features
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Routing is dependent on Fabric-aware
connectors
– Currently Java (+ Hibernate), PHP (+ Doctrine),
Python, .NET & C (labs)
• MySQL Fabric node is a single (non-
redundant process)
– HA Maintained as connectors continue to route
using local caches
• Establishes asynchronous replication
– Manual steps to switch to semisynchronous
• Sharding not completely transparent to
application (must provide shard key –
column from application schema)
• No cross-shard joins or other queries
• Management is through CLI, MySQL
protocol or XML/RPC API
– No GUI
MySQL Fabric – Current Limitations
30
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Requirements for Next Gen Services
Simple, transparent High Availability
Delivering SQL & ACID at scale
Where MySQL Fabric fits
1
2
3
4
31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle MySQL HA & Scaling Solutions
MySQL
Replication
MySQL
Fabric
Oracle VM
Template
Oracle
Clusterware
Solaris
Cluster
Windows
Cluster
DRBD
MySQL
Cluster
App Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Data Layer Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Zero Data Loss MySQL 5.7 MySQL 5.7 ✔ ✔ ✔ ✔ ✔ ✔
Platform Support All All Linux Linux Solaris Windows Linux All
Clustering Mode
Master +
Slaves
Master +
Slaves
Active/Pas
sive
Active/Passi
ve
Active/P
assive
Active/Pas
sive
Active/P
assive
Multi-
Master
Failover Time N/A Secs Secs + Secs + Secs + Secs + Secs + < 1 Sec
Scale-out Reads ✔ ✖ ✖ ✖ ✖ ✖ ✔
Cross-shard operations N/A ✖ N/A N/A N/A N/A N/A ✔
Transparent routing ✖ For HA ✔ ✔ ✔ ✔ ✔ ✔
Shared Nothing ✔ ✔ ✖ ✖ ✖ ✖ ✔ ✔
Storage Engine InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ NDB
Single Vendor Support ✔ ✔ ✔ ✔ ✔ ✖ ✔ ✔
32
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric Resources
• Download and try
http://dev.mysql.com/downloads/fabric/
• Documentation
http://dev.mysql.com/doc/mysql-utilities/en/fabric.html
• MySQL Fabric on the web
http://www.mysql.com/products/enterprise/fabric.html
• Forum (MySQL Fabric, Sharding, HA, Utilities)
http://forums.mysql.com/list.php?144
• Tutorial: MySQL Fabric - adding High Availability and Scaling to MySQL
http://www.clusterdb.com/mysql-fabric/mysql-fabric-adding-high-availability-and-scaling-to-mysql
• White Paper: MySQL Fabric - A Guide to Managing MySQL High Availability and Scaling Out
http://www.mysql.com/why-mysql/white-papers/mysql-fabric-product-guide
• Webinar Replays
http://www.mysql.com/news-and-events/on-demand-webinars/#en-20-41
33
MySQL London Tech Tour March 2015 - MySQL Fabric

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQL
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt Intro
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
 
MySQL Cloud Service
MySQL Cloud ServiceMySQL Cloud Service
MySQL Cloud Service
 
Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
MySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMySQL Enterprise Edition Overview
MySQL Enterprise Edition Overview
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 

Similar a MySQL London Tech Tour March 2015 - MySQL Fabric

Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 

Similar a MySQL London Tech Tour March 2015 - MySQL Fabric (20)

Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL Fabric
 
MySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQLMySQL Fabric - High Availability & Automated Sharding for MySQL
MySQL Fabric - High Availability & Automated Sharding for MySQL
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
 
Elastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStackElastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStack
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
Oracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterOracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL Cluster
 
Unlocking big data with Hadoop + MySQL
Unlocking big data with Hadoop + MySQLUnlocking big data with Hadoop + MySQL
Unlocking big data with Hadoop + MySQL
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 

Más de Mark Swarbrick

Más de Mark Swarbrick (20)

MySQL NoSQL Document Store
MySQL NoSQL Document StoreMySQL NoSQL Document Store
MySQL NoSQL Document Store
 
MySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of Nottingham
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB ClusterInnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
 
MySQL Security & GDPR
MySQL Security & GDPRMySQL Security & GDPR
MySQL Security & GDPR
 
Intro To MySQL 2019
Intro To MySQL 2019Intro To MySQL 2019
Intro To MySQL 2019
 
MySQL 8
MySQL 8MySQL 8
MySQL 8
 
MySQL Dublin Event Nov 2018 - MySQL 8
MySQL Dublin Event Nov 2018 - MySQL 8MySQL Dublin Event Nov 2018 - MySQL 8
MySQL Dublin Event Nov 2018 - MySQL 8
 
MySQL Dublin Event Nov 2018 - State of the Dolphin
MySQL Dublin Event Nov 2018 - State of the DolphinMySQL Dublin Event Nov 2018 - State of the Dolphin
MySQL Dublin Event Nov 2018 - State of the Dolphin
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document StoreOracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document Store
 
TLV - MySQL Security overview
TLV - MySQL Security overviewTLV - MySQL Security overview
TLV - MySQL Security overview
 
TLV - MySQL Enterprise Edition + Cloud
TLV - MySQL Enterprise Edition + CloudTLV - MySQL Enterprise Edition + Cloud
TLV - MySQL Enterprise Edition + Cloud
 
TLV - Whats new in MySQL 8
TLV - Whats new in MySQL 8TLV - Whats new in MySQL 8
TLV - Whats new in MySQL 8
 
MySQL At University Of Nottingham - 2018 MySQL Days
MySQL At University Of Nottingham - 2018 MySQL DaysMySQL At University Of Nottingham - 2018 MySQL Days
MySQL At University Of Nottingham - 2018 MySQL Days
 
MySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL DaysMySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL Days
 
MySQL 8 - 2018 MySQL Days
MySQL 8 - 2018 MySQL DaysMySQL 8 - 2018 MySQL Days
MySQL 8 - 2018 MySQL Days
 
MySQL Security + GDPR - 2018 MySQL Days
MySQL Security + GDPR - 2018 MySQL DaysMySQL Security + GDPR - 2018 MySQL Days
MySQL Security + GDPR - 2018 MySQL Days
 
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
MySQL InnoDB + NDB Cluster - 2018 MySQL DaysMySQL InnoDB + NDB Cluster - 2018 MySQL Days
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
 
MySQL Cloud - 2018 MySQL Days
MySQL Cloud - 2018 MySQL DaysMySQL Cloud - 2018 MySQL Days
MySQL Cloud - 2018 MySQL Days
 
MySQL 2018 Intro - 2018 MySQL Days
MySQL 2018 Intro - 2018 MySQL DaysMySQL 2018 Intro - 2018 MySQL Days
MySQL 2018 Intro - 2018 MySQL Days
 
MySQL + GDPR
MySQL + GDPRMySQL + GDPR
MySQL + GDPR
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

MySQL London Tech Tour March 2015 - MySQL Fabric

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric High Availability for MYSQL Mark Swarbrick Principle Presales Consultant MySQL UK&I March, 2015
  • 2. Copyright © 2015, 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. 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits 1 2 3 4 3
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits 1 2 3 4 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Focus on driving the business rather than on infrastructure Business Priorities for IT Deliver new services Real-Time Insight from Data Simplify Architecture Fast Time to Market 5
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Application Requirements High Availability Scale Data & User Loads OLTP & Analytics Elastic Responsive & Agile 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric An extensible and easy-to- use framework for managing a farm of MySQL server supporting high- availability and sharding 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric 1.5 • High Availability – Server monitoring with auto-promotion and transparent application failover • Optionally scale-out through sharding – Application provides shard key – Range or Hash – Tools for resharding – Global updates & tables • Fabric-aware connectors rather than proxy: Python, Java, PHP, .NET, C (labs) – Lower latency, bottleneck-free • Server provisioning using OpenStack etc. High Availability + Sharding-Based Scale-out MySQL Fabric Connector Application Read-slaves SQL HA group Read-slaves HA group Connector Application 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits 1 2 3 4 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Layers of HA Redundant Access to Data Data Redundancy Redundant App Servers Routing to the Data 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Asynchronous – MySQL Default – In parallel: Master acks to app and sends transaction to slave • Fast • Risk of lost changes if master dies • Synchronous – Only available with MySQL Cluster – Serially: Master waits for change to be applied on all slaves before ack to app • Higher latency • If Active/Active, best suited to small transactions • Lossless • Semi-Synchronous – MySQL 5.5+ - Enhanced in MySQL 5.7 – Serially: Master waits for change to be received by slave then In parallel ack to app and apply changes on slave • Intermediate latency • Lossless (MySQL 5.7) Asynchronous vs. Synchronous Replication 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Framework (HA) All Data Primary Secondary Extra Read ReplicasMySQL Fabric Controller SQL Queries State & Routing Info HA Group Coordination and Control 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Replication & MySQL Fabric HA • MySQL Replication is the initial implementation used in HA Groups – PRIMARY = Replication Master & receives all writes – SECONDARY = Replication Slave & receives share of reads • Failover – MySQL Fabric detects failure of PRIMARY/Master – Selects a SECONDARY/Slave and promotes it – Updates State Store – Updated state fetched by Fabric-aware connectors How this effects failover 13
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | High-Availability Group Concept • Abstract Concept – Set of servers – Server attributes • Connector Attributes – Connection information – Mode: read-only, read-write, ... – Weight: distribute load • Management Attributes – State: state/role of the server State: Primary Mode: Read-Write Host: server-1.example.com 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Create HA Groups and add Servers • Define a group mysqlfabric group create my_group • Add servers to group mysqlfabric group add my_group server1.example.com mysqlfabric group add my_group server2.example.com 15
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Create HA Groups and add Servers • Promote one server to be primary mysqlfabric group promote my_group • Tell failure detector to monitor group mysqlfabric group activate my_group 16
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits 1 2 3 4 17
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The Path to Scalability • Scaling on dense, multi- core, multi-thread servers – 10s - 100GBs RAM – SSDs • Scale across cores within a single instance • You can get a long way with MySQL 5.6 & 5.7! Scaling-Up can take you a long way 18 0 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 8 16 32 64 128 256 512 1,024 TransactionsperSecond Connections MySQL 5.7: Sysbench OLTP Read Write MySQL 5.7 MySQL 5.6 MySQL 5.5
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Write scalability – Can handle more writes • Large data set – Database too large – Does not fit on single server • Improved performance – Smaller index size – Smaller working set – Improve performance (reads and writes) Benefits of Sharding UID 10000-20000 UID 20001-40000 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Connector API Extensions – Support Transactions – Support full SQL • Decision logic in connector – Reducing network load • Shard Multiple Tables – Using same key • Global Updates – Global tables – Schema updates • Sharding Functions – Range – (Consistent) Hash • Shard Operations – Shard move – Shard split • Server Provisioning – Integrated with OpenStack & other frameworks MySQL Fabric Sharding & Provisioning Features 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Sharding Architecture Shards MySQL Fabric Node Application Global Group Global Updates Shard Updates Replication 21 Connector Connector Connector
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric (HA + Sharding) Global Data Primary Secondary Shard 1 Primary Secondary Shard 2 Primary Secondary MySQL Fabric Controller SQL Queries Server/Shard State & Mapping Global Group HA Group Coordination and Control HA Group Extra Read Replicas Extra Read Replicas 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric: Sharding Setup • Set up some groups – my_global – for global updates – my_group.N – for the shards – Add servers to the groups • Create a shard mapping – A “distributed database” – Mapping keys to shards – Give information on what tables are sharded • Add shards 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric: • Moving a shard (id=5) from existing group to another (my_group.8) mysqlfabric sharding move 5 my_group.8 • Splitting a shard (id=5) into two parts with new half stored in group my_group.6 mysqlfabric sharding split 5 my_group.6 Moving and Splitting Shards 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Indicate tables to be used in query – Property: tables – Fabric will compute map • Indicate read-only queries – Property: mode • Provide sharding key – Property: key – Fabric will compute shard • Joins within the shard (or with global tables) supported Connector API: Shard Specific Query conn.set_property(tables=["test.subscribers"], key=sub_no, mode=fabric.MODE_READONLY) cur = conn.cursor() cur.execute( "SELECT first_name, last_name FROM subscribers WHERE sub_no = %s", (sub_no) ) for row in cur: print row 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Set global scope – Property: scope – Query goes to global group Connector API: Global Update conn.set_property(tables=[], scope='GLOBAL') cur = conn.cursor() cur.execute("ALTER TABLE test.subscribers ADD nickname VARCHAR(64)") 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | > mysqlfabric provider register my_stack my_user my_password http://8.21.28.222:5000/v2.0/ --tenant=my_user_role --provider_type=OPENSTACK > mysqlfabric machine create my_stack --image id=8c92f0d9-79f1-4d95- b398-86bda7342a2d --flavor name=m1.small > mysqlfabric machine list my_stack • Fabric creates new machines, & MySQL Servers – Initially using OpenStack Nova – Other frameworks on the way (OpenStack Trove, AWS,…) • Server setup – Clones slave – Sets up replication – Performs custom operations 27 Server Provisioning – OpenStack Nova Integration
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Extensible Architecture MySQL Fabric Node Connector Connector Connector MySQL Fabric Framework AMQP? MySQL XML-RPC Executor State Store (persister) Shard HA Prov MySQL Backing Store SQL 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Connector API Extensions – Support Transactions – Support full SQL • Fabric-Aware Connectors at GA: – PHP + Doctrine, Python, Java + Hibernate, .NET, C (pre-GA) • Decision logic in connector – Reducing latency &network load • Load Balancing – Read-Write Split – Distribute transactions • Global Updates – Global data – Schema updates • Sharding Functions – Range – (Consistent) Hash • Shard Operations – Shard move – Shard split • Server Provisioning – OpenStack Integration (& other frameworks) MySQL Fabric: Goals & Features 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Routing is dependent on Fabric-aware connectors – Currently Java (+ Hibernate), PHP (+ Doctrine), Python, .NET & C (labs) • MySQL Fabric node is a single (non- redundant process) – HA Maintained as connectors continue to route using local caches • Establishes asynchronous replication – Manual steps to switch to semisynchronous • Sharding not completely transparent to application (must provide shard key – column from application schema) • No cross-shard joins or other queries • Management is through CLI, MySQL protocol or XML/RPC API – No GUI MySQL Fabric – Current Limitations 30
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits 1 2 3 4 31
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle MySQL HA & Scaling Solutions MySQL Replication MySQL Fabric Oracle VM Template Oracle Clusterware Solaris Cluster Windows Cluster DRBD MySQL Cluster App Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Data Layer Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Zero Data Loss MySQL 5.7 MySQL 5.7 ✔ ✔ ✔ ✔ ✔ ✔ Platform Support All All Linux Linux Solaris Windows Linux All Clustering Mode Master + Slaves Master + Slaves Active/Pas sive Active/Passi ve Active/P assive Active/Pas sive Active/P assive Multi- Master Failover Time N/A Secs Secs + Secs + Secs + Secs + Secs + < 1 Sec Scale-out Reads ✔ ✖ ✖ ✖ ✖ ✖ ✔ Cross-shard operations N/A ✖ N/A N/A N/A N/A N/A ✔ Transparent routing ✖ For HA ✔ ✔ ✔ ✔ ✔ ✔ Shared Nothing ✔ ✔ ✖ ✖ ✖ ✖ ✔ ✔ Storage Engine InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ NDB Single Vendor Support ✔ ✔ ✔ ✔ ✔ ✖ ✔ ✔ 32
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Resources • Download and try http://dev.mysql.com/downloads/fabric/ • Documentation http://dev.mysql.com/doc/mysql-utilities/en/fabric.html • MySQL Fabric on the web http://www.mysql.com/products/enterprise/fabric.html • Forum (MySQL Fabric, Sharding, HA, Utilities) http://forums.mysql.com/list.php?144 • Tutorial: MySQL Fabric - adding High Availability and Scaling to MySQL http://www.clusterdb.com/mysql-fabric/mysql-fabric-adding-high-availability-and-scaling-to-mysql • White Paper: MySQL Fabric - A Guide to Managing MySQL High Availability and Scaling Out http://www.mysql.com/why-mysql/white-papers/mysql-fabric-product-guide • Webinar Replays http://www.mysql.com/news-and-events/on-demand-webinars/#en-20-41 33

Notas del editor

  1. This is a Safe Harbor Front slide, one of two Safe Harbor Statement slides included in this template. One of the Safe Harbor slides must be used if your presentation covers material affected by Oracle’s Revenue Recognition Policy To learn more about this policy, e-mail: Revrec-americasiebc_us@oracle.com For internal communication, Safe Harbor Statements are not required. However, there is an applicable disclaimer (Exhibit E) that should be used, found in the Oracle Revenue Recognition Policy for Future Product Communications. Copy and paste this link into a web browser, to find out more information.   http://my.oracle.com/site/fin/gfo/GlobalProcesses/cnt452504.pdf For all external communications such as press release, roadmaps, PowerPoint presentations, Safe Harbor Statements are required. You can refer to the link mentioned above to find out additional information/disclaimers required depending on your audience.
  2. Deliver new services to engage with new markets across new channels Get business insight from data, in real time Simplify architecture to reduce cost, ensure greater standardization Fast time to market
  3. Gear cogs: http://www.istockphoto.com/stock-illustration-13970839-3d-gear.php?st=05505c3
  4. The shard keys can be numbers or (strings or dates – new in 1.5).