SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
-­‐ 
High 
Availability 
& 
Automated 
Sharding 
for 
MySQL 
London 
October 
2014 
Mark 
Swarbrick 
Sales 
Consultant 
MySQL 
UK&I 
Sept 
2014
Safe 
Harbor 
Statement 
The 
following 
is 
intended 
to 
outline 
our 
general 
product 
direcPon. 
It 
is 
intended 
for 
informaPon 
purposes 
only, 
and 
may 
not 
be 
incorporated 
into 
any 
contract. 
It 
is 
not 
a 
commitment 
to 
deliver 
any 
material, 
code, 
or 
funcPonality, 
and 
should 
not 
be 
relied 
upon 
in 
making 
purchasing 
decisions. 
The 
development, 
release, 
and 
Pming 
of 
any 
features 
or 
funcPonality 
described 
for 
Oracle’s 
products 
remains 
at 
the 
sole 
discrePon 
of 
Oracle. 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
2
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started 
3
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
4 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started
Business 
PrioriPes 
for 
IT 
Focus 
on 
driving 
the 
business 
rather 
than 
on 
infrastructure 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Deliver 
new 
services 
Real-­‐Time 
Insight 
from 
Data 
Simplify 
Architecture 
Fast 
Time 
to 
Market 
5
Responsive 
& 
Agile 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
ApplicaPon 
Requirements 
High 
Availability 
Scale 
Data 
& 
User 
Loads 
OLTP 
& 
AnalyPcs 
ElasPc 
6
An 
extensible 
and 
easy-­‐to-­‐use 
framework 
for 
managing 
a 
farm 
of 
MySQL 
server 
supporPng 
high-­‐availability 
and 
sharding 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
7
MySQL 
Fabric 
1.4 
High 
Availability 
+ 
Sharding-­‐Based 
Scale-­‐out 
• High 
Availability: 
• Server 
monitoring 
with 
auto-­‐promoPon 
and 
transparent 
applicaPon 
failover 
• Fabric-­‐aware 
connectors 
rather 
than 
proxy: 
Python, 
Java 
& 
PHP 
• Lower 
latency, 
boeleneck-­‐free 
• OpPonally 
scale-­‐out 
through 
sharding 
• ApplicaPon 
provides 
shard 
key 
• Range 
or 
Hash 
• Tools 
for 
resharding 
• Global 
updates 
& 
tables 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
ApplicaPon 
Connector 
Read-­‐slaves 
mappings 
SQL 
HA 
group 
Read-­‐slaves 
HA 
Group 
8
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
9 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Layers 
of 
HA 
Redundant 
Access 
to 
Data 
Data 
Redundancy 
Redundant 
App 
Servers 
RouJng 
to 
the 
Data 
10
MySQL 
Fabric 
Framework 
(HA) 
All Data 
Primary Secondary 
Extra Read 
Replicas 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
Controller 
SQL 
Queries 
State & 
Routing Info 
HA Group 
Coordination 
and Control
MySQL 
ReplicaPon 
& 
MySQL 
Fabric 
HA 
& 
how 
this 
effects 
failover 
• MySQL 
ReplicaPon 
is 
the 
iniPal 
implementaPon 
used 
in 
HA 
Groups 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• PRIMARY 
= 
ReplicaPon 
Master 
& 
receives 
all 
writes 
• Failover 
• MySQL 
Fabric 
detects 
failure 
of 
PRIMARY/Master 
• Selects 
a 
SECONDARY/Slave 
and 
promotes 
it 
• Updates 
State 
Store 
• Pushes 
state 
change 
to 
Fabric-­‐aware 
connectors 
12
High-­‐Availability 
Group 
Concept 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Abstract 
Concept 
• Set 
of 
servers 
• Server 
aeributes 
• Connector 
Aeributes 
• ConnecPon 
informaPon 
• Mode: 
read-­‐only, 
read-­‐write, 
... 
• Weight: 
distribute 
load 
• Management 
Aeributes 
• State: 
state/role 
of 
the 
server 
State: 
Primary 
Mode: 
Read-­‐Write 
Host: 
server-­‐1.example.com 
13
Create 
HA 
Groups 
and 
add 
Servers 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• 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 
14
Create 
HA 
Groups 
and 
add 
Servers 
• Promote 
one 
server 
to 
be 
primary 
mysqlfabric group promote my_group 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Tell 
failure 
detector 
to 
monitor 
group 
mysqlfabric group activate my_group 
15
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
16 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
The 
Path 
to 
Scalability 
Scaling-­‐Up 
can 
take 
you 
a 
long 
way 
Scaling 
on 
dense, 
mulP-­‐ 
core, 
mulP-­‐thread 
servers 
• 10s 
-­‐ 
100GBs 
RAM 
• SSDs 
Scale 
across 
cores 
within 
a 
single 
instance 
You 
can 
get 
a 
long 
way 
with 
MySQL 
5.6!
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Benefits 
of 
Sharding 
• 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 
UID 
10000-­‐20000 
UID 
20001-­‐40000 
18
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
Features 
• Connector 
API 
Extensions 
• Support 
TransacPons 
• Support 
full 
SQL 
• Decision 
logic 
in 
connector 
• Reducing 
network 
load 
• Shard 
MulPple 
Tables 
• Using 
same 
key 
• Global 
Updates 
• Global 
tables 
• Schema 
updates 
• Sharding 
FuncPons 
• Range 
• (Consistent) 
Hash 
• Shard 
OperaPons 
• Shard 
move 
• Shard 
split 
19
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Sharding 
Architecture 
Shards 
MySQL 
Fabric 
Node 
ApplicaJon 
Global 
Group 
Global 
Updates 
Shard 
Updates 
ReplicaJon 
20
MySQL 
Fabric 
(HA 
+ 
Sharding) 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
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
Shard #1 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
RouPng 
TransacPons 
Shard #2 
Shard #3 
Executor 
App 
Server 
Connector 
Cache 
State 
Store 
App 
Server 
Connector 
Cache 
22
MySQL 
Fabric: 
Sharding 
Setup 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• 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 
informaPon 
on 
what 
tables 
are 
sharded 
• Add 
shards 
23
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric: 
Moving 
and 
Spling 
Shards 
• Moving 
a 
shard 
(id=5) 
from 
exisPng 
group 
to 
another 
(my_group.8) 
• mysqlfabric 
sharding 
move 
5 
my_group.8 
• Spling 
a 
shard 
(id=5) 
into 
two 
parts 
with 
new 
half 
stored 
in 
group 
my_group.6 
• mysqlfabric 
sharding 
split 
5 
my_group.6 
24
• Provide 
sharding 
key 
• Property: 
key 
• Fabric 
will 
compute 
shard 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Connector 
API: 
Shard 
Specific 
Query 
• Indicate 
tables 
to 
be 
used 
in 
query 
• Property: 
tables 
• Fabric 
will 
compute 
map 
conn.set_property(tables=["test.subscribers"], key=sub_no,  
mode=fabric.MODE_READWRITE) 
cur = conn.cursor() 
cur.execute( 
"INSERT INTO subscribers VALUES (%s, %s, %s)", 
(sub_no, first_name, last_name)) 
25
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Connector 
API: 
Shard 
Specific 
Query 
• Provide 
tables 
in 
query 
– Property: 
tables 
– Fabric 
will 
compute 
map 
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 
§ Provide sharding key 
– Property: key 
– Fabric will compute shard 
§ Joins within the shard (or with 
global tables) supported 
26
Connector 
API: 
Global 
Update 
• Set 
global 
scope 
– Property: 
scope 
– Query 
goes 
to 
global 
group 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Provide 
tables 
in 
query 
– Property: 
tables 
– Fabric 
will 
compute 
map 
– (Likely 
to 
not 
be 
needed) 
conn.set_property(tables=[’test.subscribers'], scope='GLOBAL') 
cur = conn.cursor() 
cur.execute("ALTER TABLE test.subscirbers ADD nickname VARCHAR(64)") 
27
Protocols 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
Node 
MySQL 
MySQL 
Fabric 
Framework 
Executor 
State 
Store 
(Persister) 
Sh 
HA 
AMQP 
MySQL 
XML-­‐RPC 
? 
? 
Extensions 
Backing 
Store 
Extensible 
Architecture 
28
MySQL 
Fabric: 
Goals 
& 
Features 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Connector 
API 
Extensions 
• Support 
TransacPons 
• Support 
full 
SQL 
• Fabric-­‐Aware 
Connectors 
at 
GA: 
• PHP 
+ 
Doctrine, 
Python, 
Java 
+ 
Hibernate 
• Decision 
logic 
in 
connector 
• Reducing 
network 
load 
• Load 
Balancing 
• Read-­‐Write 
Split 
• Distribute 
transacPons 
• Global 
Updates 
• Global 
tables 
• Schema 
updates 
• Shard 
MulPple 
Tables 
• Using 
same 
key 
• Sharding 
FuncPons 
• Range 
• (Consistent) 
Hash 
• Shard 
OperaPons 
• Shard 
move 
• Shard 
split 
29
MySQL 
Fabric 
– 
Current 
LimitaPons 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• RouPng 
is 
dependent 
on 
Fabric-­‐aware 
connectors 
• Currently 
Java 
(+ 
Hibernate), 
PHP 
(+ 
Doctrine) 
& 
Python 
• MySQL 
Fabric 
node 
is 
a 
single 
(non-­‐ 
redundant 
process) 
• HA 
Maintained 
as 
connectors 
conPnue 
to 
route 
using 
local 
caches 
• Establishes 
asynchronous 
replicaPon 
• Manual 
steps 
to 
switch 
to 
semisynchronous 
• Sharding 
not 
completely 
transparent 
to 
applicaPon 
(must 
provide 
shard 
key 
– 
column 
from 
applicaPon 
schema) 
• No 
cross-­‐shard 
joins 
or 
other 
queries 
• Management 
is 
through 
CLI 
or 
XML/RPC 
API 
• No 
GUI 
30
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
31 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started
Oracle 
MySQL 
HA 
& 
Scaling 
SoluPons 
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
ReplicaJon 
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 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Plauorm 
Support 
All 
All 
Linux 
Linux 
Solaris 
Windows 
Linux 
All 
Clustering 
Mode 
Master 
+ 
Slaves 
Master 
+ 
Slaves 
AcJve/ 
Passive 
AcJve/Passive 
AcJve/ 
Passive 
AcJve/ 
Passive 
AcJve/ 
Passive 
MulJ-­‐ 
Master 
Failover 
Time 
N/A 
Secs 
Secs 
+ 
Secs 
+ 
Secs 
+ 
Secs 
+ 
Secs 
+ 
< 
1 
Sec 
Scale-­‐out 
Reads 
✔ 
✖ 
✖ 
✖ 
✖ 
✖ 
✔ 
Cross-­‐shard 
operaPons 
N/A 
✖ 
N/A 
N/A 
N/A 
N/A 
N/A 
✔ 
Transparent 
rouPng 
✖ 
For 
HA 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Shared 
Nothing 
✔ 
✔ 
✖ 
✖ 
✖ 
✖ 
✔ 
✔ 
Storage 
Engine 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
NDB 
Single 
Vendor 
Support 
✔ 
✔ 
✔ 
✔ 
✔ 
✖ 
✔ 
✔ 
32
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
33 
1 
2 
3 
4 
5 
Requirements 
for 
Next 
Gen 
Services 
Simple, 
transparent 
High 
Availability 
Delivering 
SQL 
& 
ACID 
at 
scale 
Where 
MySQL 
Fabric 
fits 
with 
Oracle’s 
other 
MySQL 
soluPons 
Geng 
started
Copyright 
© 
2014 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
MySQL 
Fabric 
Resources 
• Download 
and 
try 
hep://dev.mysql.com/downloads/fabric/ 
• DocumentaPon 
hep://dev.mysql.com/doc/mysql-­‐uPliPes/1.4/en/fabric.html 
• Forum 
(MySQL 
Fabric, 
Sharding, 
HA, 
UPliPes) 
hep://forums.mysql.com/list.php?144 
• Tutorial: 
MySQL 
Fabric 
-­‐ 
adding 
High 
Availability 
and 
Scaling 
to 
MySQL 
hep://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 
hep://www.mysql.com/why-­‐mysql/white-­‐papers/mysql-­‐fabric-­‐product-­‐guide 
34
MySQL Fabric

Weitere ähnliche Inhalte

Was ist angesagt?

2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision
Ermando
 

Was ist angesagt? (20)

Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
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
 
Using MySQL in the Cloud
Using MySQL in the CloudUsing MySQL in the Cloud
Using MySQL in the Cloud
 
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 High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 DatabaseeProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
Hadoop Summit 2012 | A New Generation of Data Transfer Tools for Hadoop: Sqoop 2
Hadoop Summit 2012 | A New Generation of Data Transfer Tools for Hadoop: Sqoop 2Hadoop Summit 2012 | A New Generation of Data Transfer Tools for Hadoop: Sqoop 2
Hadoop Summit 2012 | A New Generation of Data Transfer Tools for Hadoop: Sqoop 2
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
 
Apache Ambari: Past, Present, Future
Apache Ambari: Past, Present, FutureApache Ambari: Past, Present, Future
Apache Ambari: Past, Present, Future
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 
Oracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous AvailabilityOracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous Availability
 
Step by Step instructions to install Cluster Domain deployment model
Step by Step instructions to install Cluster Domain deployment modelStep by Step instructions to install Cluster Domain deployment model
Step by Step instructions to install Cluster Domain deployment model
 
Oracle Multitenant meets Oracle RAC - IOUG 2014 Version
Oracle Multitenant meets Oracle RAC - IOUG 2014 VersionOracle Multitenant meets Oracle RAC - IOUG 2014 Version
Oracle Multitenant meets Oracle RAC - IOUG 2014 Version
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 

Andere mochten auch

Andere mochten auch (13)

MySQL HA
MySQL HAMySQL HA
MySQL HA
 
20120426 high availability MySQL
20120426 high availability MySQL20120426 high availability MySQL
20120426 high availability MySQL
 
MySQL Security Best Practises
MySQL Security Best PractisesMySQL Security Best Practises
MySQL Security Best Practises
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open Discussion
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High Availability
 
High Availability in the Cloud - Architectural Best Practices
High Availability in the Cloud - Architectural Best PracticesHigh Availability in the Cloud - Architectural Best Practices
High Availability in the Cloud - Architectural Best Practices
 

Ähnlich wie 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
 

Ähnlich wie MySQL Fabric (20)

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 London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL Fabric
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to 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)
 
MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
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
 
My sql fabric webinar v1.1
My sql fabric webinar v1.1My sql fabric webinar v1.1
My sql fabric webinar v1.1
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQL
 
KSCOPE Cloud Services and the Self Service Portal
KSCOPE Cloud Services  and the Self Service PortalKSCOPE Cloud Services  and the Self Service Portal
KSCOPE Cloud Services and the Self Service Portal
 
My sql en la nube conoce las mejores prácticas en administración y operación_...
My sql en la nube conoce las mejores prácticas en administración y operación_...My sql en la nube conoce las mejores prácticas en administración y operación_...
My sql en la nube conoce las mejores prácticas en administración y operación_...
 
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
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
Oracle Database Cloud Service
Oracle Database Cloud ServiceOracle Database Cloud Service
Oracle Database Cloud Service
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
 

Mehr von Mark Swarbrick

Mehr von 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
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

MySQL Fabric

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric -­‐ High Availability & Automated Sharding for MySQL London October 2014 Mark Swarbrick Sales Consultant MySQL UK&I Sept 2014
  • 2. Safe Harbor Statement The following is intended to outline our general product direcPon. It is intended for informaPon purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or funcPonality, and should not be relied upon in making purchasing decisions. The development, release, and Pming of any features or funcPonality described for Oracle’s products remains at the sole discrePon of Oracle. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started 3
  • 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 4 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started
  • 5. Business PrioriPes for IT Focus on driving the business rather than on infrastructure Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Deliver new services Real-­‐Time Insight from Data Simplify Architecture Fast Time to Market 5
  • 6. Responsive & Agile Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ApplicaPon Requirements High Availability Scale Data & User Loads OLTP & AnalyPcs ElasPc 6
  • 7. An extensible and easy-­‐to-­‐use framework for managing a farm of MySQL server supporPng high-­‐availability and sharding Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric 7
  • 8. MySQL Fabric 1.4 High Availability + Sharding-­‐Based Scale-­‐out • High Availability: • Server monitoring with auto-­‐promoPon and transparent applicaPon failover • Fabric-­‐aware connectors rather than proxy: Python, Java & PHP • Lower latency, boeleneck-­‐free • OpPonally scale-­‐out through sharding • ApplicaPon provides shard key • Range or Hash • Tools for resharding • Global updates & tables Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric ApplicaPon Connector Read-­‐slaves mappings SQL HA group Read-­‐slaves HA Group 8
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 9 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Layers of HA Redundant Access to Data Data Redundancy Redundant App Servers RouJng to the Data 10
  • 11. MySQL Fabric Framework (HA) All Data Primary Secondary Extra Read Replicas Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Controller SQL Queries State & Routing Info HA Group Coordination and Control
  • 12. MySQL ReplicaPon & MySQL Fabric HA & how this effects failover • MySQL ReplicaPon is the iniPal implementaPon used in HA Groups Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • PRIMARY = ReplicaPon Master & receives all writes • Failover • MySQL Fabric detects failure of PRIMARY/Master • Selects a SECONDARY/Slave and promotes it • Updates State Store • Pushes state change to Fabric-­‐aware connectors 12
  • 13. High-­‐Availability Group Concept Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Abstract Concept • Set of servers • Server aeributes • Connector Aeributes • ConnecPon informaPon • Mode: read-­‐only, read-­‐write, ... • Weight: distribute load • Management Aeributes • State: state/role of the server State: Primary Mode: Read-­‐Write Host: server-­‐1.example.com 13
  • 14. Create HA Groups and add Servers Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • 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 14
  • 15. Create HA Groups and add Servers • Promote one server to be primary mysqlfabric group promote my_group Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Tell failure detector to monitor group mysqlfabric group activate my_group 15
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 16 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The Path to Scalability Scaling-­‐Up can take you a long way Scaling on dense, mulP-­‐ core, mulP-­‐thread servers • 10s -­‐ 100GBs RAM • SSDs Scale across cores within a single instance You can get a long way with MySQL 5.6!
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Benefits of Sharding • 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 UID 10000-­‐20000 UID 20001-­‐40000 18
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Features • Connector API Extensions • Support TransacPons • Support full SQL • Decision logic in connector • Reducing network load • Shard MulPple Tables • Using same key • Global Updates • Global tables • Schema updates • Sharding FuncPons • Range • (Consistent) Hash • Shard OperaPons • Shard move • Shard split 19
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Sharding Architecture Shards MySQL Fabric Node ApplicaJon Global Group Global Updates Shard Updates ReplicaJon 20
  • 21. MySQL Fabric (HA + Sharding) Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 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. Shard #1 Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | RouPng TransacPons Shard #2 Shard #3 Executor App Server Connector Cache State Store App Server Connector Cache 22
  • 23. MySQL Fabric: Sharding Setup Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • 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 informaPon on what tables are sharded • Add shards 23
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric: Moving and Spling Shards • Moving a shard (id=5) from exisPng group to another (my_group.8) • mysqlfabric sharding move 5 my_group.8 • Spling a shard (id=5) into two parts with new half stored in group my_group.6 • mysqlfabric sharding split 5 my_group.6 24
  • 25. • Provide sharding key • Property: key • Fabric will compute shard Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Connector API: Shard Specific Query • Indicate tables to be used in query • Property: tables • Fabric will compute map conn.set_property(tables=["test.subscribers"], key=sub_no, mode=fabric.MODE_READWRITE) cur = conn.cursor() cur.execute( "INSERT INTO subscribers VALUES (%s, %s, %s)", (sub_no, first_name, last_name)) 25
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Connector API: Shard Specific Query • Provide tables in query – Property: tables – Fabric will compute map 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 § Provide sharding key – Property: key – Fabric will compute shard § Joins within the shard (or with global tables) supported 26
  • 27. Connector API: Global Update • Set global scope – Property: scope – Query goes to global group Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Provide tables in query – Property: tables – Fabric will compute map – (Likely to not be needed) conn.set_property(tables=[’test.subscribers'], scope='GLOBAL') cur = conn.cursor() cur.execute("ALTER TABLE test.subscirbers ADD nickname VARCHAR(64)") 27
  • 28. Protocols Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Node MySQL MySQL Fabric Framework Executor State Store (Persister) Sh HA AMQP MySQL XML-­‐RPC ? ? Extensions Backing Store Extensible Architecture 28
  • 29. MySQL Fabric: Goals & Features Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • Connector API Extensions • Support TransacPons • Support full SQL • Fabric-­‐Aware Connectors at GA: • PHP + Doctrine, Python, Java + Hibernate • Decision logic in connector • Reducing network load • Load Balancing • Read-­‐Write Split • Distribute transacPons • Global Updates • Global tables • Schema updates • Shard MulPple Tables • Using same key • Sharding FuncPons • Range • (Consistent) Hash • Shard OperaPons • Shard move • Shard split 29
  • 30. MySQL Fabric – Current LimitaPons Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | • RouPng is dependent on Fabric-­‐aware connectors • Currently Java (+ Hibernate), PHP (+ Doctrine) & Python • MySQL Fabric node is a single (non-­‐ redundant process) • HA Maintained as connectors conPnue to route using local caches • Establishes asynchronous replicaPon • Manual steps to switch to semisynchronous • Sharding not completely transparent to applicaPon (must provide shard key – column from applicaPon schema) • No cross-­‐shard joins or other queries • Management is through CLI or XML/RPC API • No GUI 30
  • 31. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 31 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started
  • 32. Oracle MySQL HA & Scaling SoluPons Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL ReplicaJon 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 ✔ ✔ ✔ ✔ ✔ ✔ Plauorm Support All All Linux Linux Solaris Windows Linux All Clustering Mode Master + Slaves Master + Slaves AcJve/ Passive AcJve/Passive AcJve/ Passive AcJve/ Passive AcJve/ Passive MulJ-­‐ Master Failover Time N/A Secs Secs + Secs + Secs + Secs + Secs + < 1 Sec Scale-­‐out Reads ✔ ✖ ✖ ✖ ✖ ✖ ✔ Cross-­‐shard operaPons N/A ✖ N/A N/A N/A N/A N/A ✔ Transparent rouPng ✖ For HA ✔ ✔ ✔ ✔ ✔ ✔ Shared Nothing ✔ ✔ ✖ ✖ ✖ ✖ ✔ ✔ Storage Engine InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ NDB Single Vendor Support ✔ ✔ ✔ ✔ ✔ ✖ ✔ ✔ 32
  • 33. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Program Agenda 33 1 2 3 4 5 Requirements for Next Gen Services Simple, transparent High Availability Delivering SQL & ACID at scale Where MySQL Fabric fits with Oracle’s other MySQL soluPons Geng started
  • 34. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Fabric Resources • Download and try hep://dev.mysql.com/downloads/fabric/ • DocumentaPon hep://dev.mysql.com/doc/mysql-­‐uPliPes/1.4/en/fabric.html • Forum (MySQL Fabric, Sharding, HA, UPliPes) hep://forums.mysql.com/list.php?144 • Tutorial: MySQL Fabric -­‐ adding High Availability and Scaling to MySQL hep://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 hep://www.mysql.com/why-­‐mysql/white-­‐papers/mysql-­‐fabric-­‐product-­‐guide 34