SlideShare a Scribd company logo
1 / 84
2 / 84
MySQL InnoDB Cluster
MySQL High Availability made easy
August 2017
 
Frédéric Descamps - MySQL Community Manager - Oracle
3 / 84
 
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purpose 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 up in
making purchasing decisions. The development, release and timing of any features or
functionality described for Oracle´s product remains at the sole discretion of Oracle.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
4 / 84
about.me/lefred
Who am I ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
5 / 84
Frédéric Descamps
@lefred
MySQL Evangelist
Hacking MySQL since 3.23
devops believer
MySQL Community Manager since May
2016
living in Belgium 🇧🇪
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
6 / 84
100%
 
virtually all organizations require their most
critical systems to be highly available !
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
7 / 84
 
  "HighAvailabilitybecomesacorefirst
classfeatureofMySQL!"
MySQL InnoDB Cluster
 
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
8 / 84
MySQL InnoDB Cluster: vision
  "Asingleproduct-MySQL-withhighavailabilityandscalingfeaturesbakedin;providing
anintegratedend-to-endsolutionthatiseasytouse."
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
9 / 84
MySQL InnoDB Cluster: vision
  "Asingleproduct-MySQL-withhighavailabilityandscalingfeaturesbakedin;providing
anintegratedend-to-endsolutionthatiseasytouse."
InnoDB
cluster
Ease-of-Use
Extreme Scale-Out
Out-of-Box Solution
Built-in HA
High Performance
Everything Integrated
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
10 / 84
One Product: MySQL
All components created together
Tested together
Packaged together
Easy to Use
One client: MySQL Shell
Easy packaging
Integrated orchestration
Homogenous servers
Flexible and Moden
SQL and NoSQL together
Protocol Buffers
Asynchronous API
Developer friendly
Support Read/Write Scale Out
Shared clusters
Federated systemof N replica sets
supporting cross shard
operations
Each replica set manages a shard
MySQL InnoDB Cluster: goals
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
11 / 84
Our vision in 4 steps
MySQLDocumentStore
Relational&DocumentModels
MySQLHA
Out-Of-BoxHA
ReadScale-Out
AsyncReplication+AutoFailover
WriteScale-Out
Sharding
E1 E3
E2 E4
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
12 / 84
Step 2´s Architecture
Application
MySQL Connector
MySQL Router
MySQL Shell
InnoDB
cluster
Application
MySQL Connector
MySQL Router
Mp
M
M
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
13 / 84
Step 3´s Architecture
Application
MySQL Connector
MySQL Router
MySQL Shell
InnoDB
cluster
Application
MySQL Connector
MySQL Router
Mp
M
M
S1 S2 S3 S4 S...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
14 / 84
Step 4´s Architecture
Application
MySQL Connector
MySQL Router
MySQL Shell
Application
MySQL Connector
MySQL Router
InnoDB
cluster
Mp
M
M
S2 S3 S4 S...S1
InnoDB
cluster
Mp
M
M
S1 S2 S3 S4 S...
InnoDB
cluster
Mp
M
M
S1 S2 S3 S4 S...
Application
MySQL Connector
MySQL Router
Application
MySQL Connector
MySQL Router
Application
MySQL Connector
MySQL Router
replicaset1
replicaset2
replicaset3
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
15 / 84
Group Replication: heart of MySQL InnoDB
Cluster
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
16 / 84
Group Replication: heart of MySQL InnoDB
Cluster
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
17 / 84
MySQL Group Replication
but what is it ?!?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
18 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
19 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
20 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
GR uses a Paxos based protocol
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
21 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
GR uses a Paxos based protocol
GR allows to write on all Group Members (cluster nodes) simultaneously while
retaining consistency
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
22 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
GR uses a Paxos based protocol
GR allows to write on all Group Members (cluster nodes) simultaneously while
retaining consistency
GR implements conflict detection and resolution
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
23 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
GR uses a Paxos based protocol
GR allows to write on all Group Members (cluster nodes) simultaneously while
retaining consistency
GR implements conflict detection and resolution
GR allows automatic distributed recovery
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
24 / 84
MySQL Group Replication
but what is it ?!?
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
GR uses a Paxos based protocol
GR allows to write on all Group Members (cluster nodes) simultaneously while
retaining consistency
GR implements conflict detection and resolution
GR allows automatic distributed recovery
Supported on all MySQL platforms !!
Linux, Windows, Solaris, OSX, FreeBSD
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
25 / 84
And for users ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
26 / 84
And for users ?
no longer necessary to handle server fail-over manually or with a complicated script
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
27 / 84
And for users ?
no longer necessary to handle server fail-over manually or with a complicated script
GR provides fault tolerance
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
28 / 84
And for users ?
no longer necessary to handle server fail-over manually or with a complicated script
GR provides fault tolerance
GR enables update-everywhere setups
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
29 / 84
And for users ?
no longer necessary to handle server fail-over manually or with a complicated script
GR provides fault tolerance
GR enables update-everywhere setups
GR handles crashes, failures, re-connetcs automatically
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
30 / 84
And for users ?
no longer necessary to handle server fail-over manually or with a complicated script
GR provides fault tolerance
GR enables update-everywhere setups
GR handles crashes, failures, re-connetcs automatically
Allows an easy setup of a MySQL service high available !
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
31 / 84
OK, but how does it work ?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
32 / 84
OK, but how does it work ?
it´s just ...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
33 / 84
OK, but how does it work ?
it´s just ...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
34 / 84
OK, but how does it work ?
it´s just ...
... no, in fact the writesets replication is synchronous and then certification and apply of
the changes are local to each nodes and asynchronous.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
35 / 84
OK, but how does it work ?
it´s just ...
... no, in fact the writesets replication is synchronous and then certification and apply of
the changes are local to each nodes and asynchronous.
not that easy to understand... right ? As a picture is worth a 1000 words, let´s illustrate
this...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
36 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
37 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
38 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
39 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
40 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
41 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
42 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
43 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
44 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
45 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
46 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
47 / 84
MySQL Group Replication
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
48 / 84
Certification
Certification is the process that only needs to answer the following unique question:
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
49 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
50 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
51 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
52 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
53 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
54 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
results are not reported to the group
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
55 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
results are not reported to the group
pass: enter in the apply queue
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
56 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
results are not reported to the group
pass: enter in the apply queue
fail: drop the transaction
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
57 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
results are not reported to the group
pass: enter in the apply queue
fail: drop the transaction
serialized by the total order in GCS/XCOM+ GTID
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
58 / 84
Certification
Certification is the process that only needs to answer the following unique question:
canthewrite(transaction)beapplied?
based on unapplied earlier transactions
such conflicts must come for other members/nodes
happens on every member/node
should be deterministic on every node
results are not reported to the group
pass: enter in the apply queue
fail: drop the transaction
serialized by the total order in GCS/XCOM+ GTID
cost is based on trx size (# rows &# keys)
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
59 / 84
Default = Single Primary Mode
By default, MySQL InnoDB Cluster runs in Single Primary Mode.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
60 / 84
Default = Single Primary Mode
By default, MySQL InnoDB Cluster runs in Single Primary Mode.
mysql> show global variables like 'group_replication_single_primary_mode';
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | ON |
+---------------------------------------+-------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
61 / 84
Default = Single Primary Mode
By default, MySQL InnoDB Cluster runs in Single Primary Mode.
mysql> show global variables like 'group_replication_single_primary_mode';
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | ON |
+---------------------------------------+-------+
In Single Primary Mode, a single member acts as the writable master (PRIMARY) and the
rest of the members act as hot-standbys (SECONDARY).
The group itself coordinates and configures itself automatically to determine which
member will act as the PRIMARY, through a leader election mechanism.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
62 / 84
Single Primary Mode - new in 8.0.2
group_replication_member_weight: influence the primary member election in Single-
Primary mode (from0to100).
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
63 / 84
Single Primary Mode - new in 8.0.2
group_replication_member_weight: influence the primary member election in Single-
Primary mode (from0to100).
more visibility
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
64 / 84
Single Primary Mode - new in 8.0.2
group_replication_member_weight: influence the primary member election in Single-
Primary mode (from0to100).
more visibility
mysql-sql> select * from performance_schema.replication_group_members;
+--------------+--------------+--------+------+---------+-------------+-------+
| CHANNEL_NAME | MEMBER_ID | M_HOST | PORT | M_STATE | MEMBER_ROLE | M_VER |
+--------------+--------------+--------+------+---------+-------------+-------+
| gr_applier | ...-8d90-... | mysql1 | 3306 | ONLINE | SECONDARY | 8.0.2 |
| gr_applier | ...-be23-... | mysql2 | 3306 | ONLINE | SECONDARY | 8.0.2 |
| gr_applier | ...-a747-... | mysql3 | 3306 | ONLINE | PRIMARY | 8.0.2 |
+--------------+--------------+--------+------+---------+-------------+-------+
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
65 / 84
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
66 / 84
MySQL Router (GA!)
MySQL Router is lightweight middleware that provides transparent routing between your
application and backend MySQL Servers. It can be used for a wide variety of use cases,
such as providing high availability and scalability by effectively routing database traffic to
appropriate backend MySQL Servers.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
67 / 84
MySQL Router (GA!)
MySQL Router is lightweight middleware that provides transparent routing between your
application and backend MySQL Servers. It can be used for a wide variety of use cases,
such as providing high availability and scalability by effectively routing database traffic to
appropriate backend MySQL Servers.
MySQL Router doesn´t require any specific configuration. It configures itself automatically
(bootstrap) using MySQL InnoDB Cluster´s metadata.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
68 / 84
MySQL Router (GA!)
MySQL Router is lightweight middleware that provides transparent routing between your
application and backend MySQL Servers. It can be used for a wide variety of use cases,
such as providing high availability and scalability by effectively routing database traffic to
appropriate backend MySQL Servers.
MySQL Router doesn´t require any specific configuration. It configures itself automatically
(bootstrap) using MySQL InnoDB Cluster´s metadata.
The MySQL Router development will be focusing on sharding.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
69 / 84
ProxySQL has native support for Group
Replication which makes it a good choice for
advanced users.
ProxySQL
If you need some specific features that are not yet available in MySQL Router, like
transparent R/Wsplitting, then you can use your software of choice.
We are also collaborating with ProxySQL.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
70 / 84
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
71 / 84
MySQL Shell (GA!)
The MySQL Shell is an interactive Javascript, Python, or SQL interface supporting
development and administration for the MySQL Server and is a component of the MySQL
Server. You can use the MySQL Shell to performdata queries and updates as well as
various administration operations.
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
72 / 84
MySQL Shell (2)
The MySQL Shell provides:
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
73 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
74 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
75 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
76 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
77 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
MySQL Standard and X Protocols
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
78 / 84
MySQL Shell (2)
The MySQL Shell provides:
Both Interactive and Batch operations
Document and Relational Models
CRUD Document and Relational APIs via scripting
Traditional Table, JSON, Tab Separated output results formats
MySQL Standard and X Protocols
and more...
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
79 / 84
MySQL Shell (3)
PREVIEW: the newShell´s prompt is nice and clear !
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
80 / 84
don´t forget, this is a HA solution !
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
81 / 84
Deploying a MySQL InnoDB Cluster using MySQL
Shell´s adminAPI:
mysql-js> var i1 = 'root@instance01:3306';
mysql-js> var i2 = 'root@instance02:3306';
mysql-js> var i3 = 'root@instance03:3306';
mysql-js> dba.checkInstanceCon guration(i1);
mysql-js> dba.checkInstanceCon guration(i2);
mysql-js> dba.checkInstanceCon guration(i3);
mysql-js> shell.connect(i1);
mysql-js> var cluster = dba.createCluster('ChinaCluster');
mysql-js> cluster.checkInstanceState(i2);
mysql-js> cluster.addInstance(i2);
mysql-js> cluster.checkInstanceState(i3);
mysql-js> cluster.addInstance(i3);
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
82 / 84
See this in action and do it yourself during the
next session !
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
83 / 84
Thank you !
Any Questions ?
more at http://lefred.be/content/category/mysql/group-replication/
http://mysqlhighavailability.com/
Copyright @ 2017 Oracle and/or its affiliates. All rights reserved.
84 / 84

More Related Content

What's hot (20)

PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
PDF
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
ODP
MySQL Group Replication
Ulf Wendel
 
PDF
Practical Elasticsearch - real world use cases
Itamar
 
PDF
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 
DOCX
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
NeoClova
 
PDF
使ってみた!ioMemoryで実現する噂のAtomic write!
IIJ
 
PPTX
MongoDB.pptx
Sigit52
 
PDF
InnoDb Vs NDB Cluster
Mark Swarbrick
 
PDF
State of the Dolphin - May 2022
Frederic Descamps
 
PDF
Intro ProxySQL
I Goo Lee
 
PDF
Facebook Messages & HBase
强 王
 
PDF
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
SlideTeam
 
PDF
Oracle Extended Clusters for Oracle RAC
Markus Michalewicz
 
PPTX
Sql server のバックアップとリストアの基礎
Masayuki Ozawa
 
PDF
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
Ian Choi
 
PDF
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
オラクルエンジニア通信
 
PDF
PostgreSQL replication
NTT DATA OSS Professional Services
 
PDF
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Osama Mustafa
 
PDF
SQL serverのデータ破損に備える
okumar savurou
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
MySQL Group Replication
Ulf Wendel
 
Practical Elasticsearch - real world use cases
Itamar
 
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
NeoClova
 
使ってみた!ioMemoryで実現する噂のAtomic write!
IIJ
 
MongoDB.pptx
Sigit52
 
InnoDb Vs NDB Cluster
Mark Swarbrick
 
State of the Dolphin - May 2022
Frederic Descamps
 
Intro ProxySQL
I Goo Lee
 
Facebook Messages & HBase
强 王
 
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
SlideTeam
 
Oracle Extended Clusters for Oracle RAC
Markus Michalewicz
 
Sql server のバックアップとリストアの基礎
Masayuki Ozawa
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
Ian Choi
 
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
オラクルエンジニア通信
 
PostgreSQL replication
NTT DATA OSS Professional Services
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Osama Mustafa
 
SQL serverのデータ破損に備える
okumar savurou
 

Similar to Introduction to MySQL InnoDB Cluster (20)

PDF
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
PDF
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
PDF
MySQL InnoDB Cluster and Group Replication in a Nutshell
Frederic Descamps
 
PDF
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Frederic Descamps
 
PDF
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Frederic Descamps
 
PDF
DataOps Barcelona - MySQL HA so easy... that's insane !
Frederic Descamps
 
PDF
MySQL InnoDB Cluster: High Availability Made Easy!
Vittorio Cioe
 
PDF
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
Frederic Descamps
 
PDF
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
Frederic Descamps
 
PDF
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
PDF
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
Frederic Descamps
 
PDF
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Olivier DASINI
 
PDF
MySQL Database Architectures - 2022-08
Kenny Gryp
 
PDF
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
Sujatha Sivakumar
 
PDF
MySQL Group Replication - HandsOn Tutorial
Kenny Gryp
 
PDF
MySQL Database Architectures - 2020-10
Kenny Gryp
 
PDF
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
Olivier DASINI
 
PDF
MySQL High Availability -- InnoDB Clusters
Matt Lord
 
PDF
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
Frederic Descamps
 
PDF
MySQL Database Architectures - High Availability and Disaster Recovery Solution
Miguel Araújo
 
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
Frederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
Frederic Descamps
 
Oracle Open World 2018 / Code One : MySQL 8.0 High Availability with MySQL I...
Frederic Descamps
 
DataOps Barcelona - MySQL HA so easy... that's insane !
Frederic Descamps
 
MySQL InnoDB Cluster: High Availability Made Easy!
Vittorio Cioe
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
Frederic Descamps
 
MySQL Innovation Day Chicago - MySQL HA So Easy : That's insane !!
Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
Frederic Descamps
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Olivier DASINI
 
MySQL Database Architectures - 2022-08
Kenny Gryp
 
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
Sujatha Sivakumar
 
MySQL Group Replication - HandsOn Tutorial
Kenny Gryp
 
MySQL Database Architectures - 2020-10
Kenny Gryp
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
Olivier DASINI
 
MySQL High Availability -- InnoDB Clusters
Matt Lord
 
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
Frederic Descamps
 
MySQL Database Architectures - High Availability and Disaster Recovery Solution
Miguel Araújo
 
Ad

More from Frederic Descamps (20)

PDF
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
Frederic Descamps
 
PDF
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
PDF
RivieraJUG - MySQL Indexes and Histograms
Frederic Descamps
 
PDF
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
Frederic Descamps
 
PDF
MySQL User Group NL - MySQL 8
Frederic Descamps
 
PDF
Percona Live 2022 - MySQL Shell for Visual Studio Code
Frederic Descamps
 
PDF
Percona Live 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
PDF
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
PDF
Open Source 101 2022 - MySQL Indexes and Histograms
Frederic Descamps
 
PDF
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
PDF
Confoo 2022 - le cycle d'une instance MySQL
Frederic Descamps
 
PDF
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Frederic Descamps
 
PDF
Les nouveautés de MySQL 8.0
Frederic Descamps
 
PDF
Les nouveautés de MySQL 8.0
Frederic Descamps
 
PDF
State of The Dolphin - May 2021
Frederic Descamps
 
PDF
MySQL Shell for DBAs
Frederic Descamps
 
PDF
Deploying Magento on OCI with MDS
Frederic Descamps
 
PDF
MySQL Router REST API
Frederic Descamps
 
PDF
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
Frederic Descamps
 
PDF
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Frederic Descamps
 
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
Frederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
Frederic Descamps
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
Frederic Descamps
 
MySQL User Group NL - MySQL 8
Frederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Frederic Descamps
 
Percona Live 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
Frederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Frederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Frederic Descamps
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Frederic Descamps
 
Les nouveautés de MySQL 8.0
Frederic Descamps
 
State of The Dolphin - May 2021
Frederic Descamps
 
MySQL Shell for DBAs
Frederic Descamps
 
Deploying Magento on OCI with MDS
Frederic Descamps
 
MySQL Router REST API
Frederic Descamps
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
Frederic Descamps
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Frederic Descamps
 
Ad

Recently uploaded (20)

PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 

Introduction to MySQL InnoDB Cluster

  • 3. MySQL InnoDB Cluster MySQL High Availability made easy August 2017   Frédéric Descamps - MySQL Community Manager - Oracle 3 / 84
  • 4.   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose 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 up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 4 / 84
  • 5. about.me/lefred Who am I ? Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 5 / 84
  • 6. Frédéric Descamps @lefred MySQL Evangelist Hacking MySQL since 3.23 devops believer MySQL Community Manager since May 2016 living in Belgium 🇧🇪 Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 6 / 84
  • 7. 100%   virtually all organizations require their most critical systems to be highly available ! Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 7 / 84
  • 8.     "HighAvailabilitybecomesacorefirst classfeatureofMySQL!" MySQL InnoDB Cluster   Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 8 / 84
  • 9. MySQL InnoDB Cluster: vision   "Asingleproduct-MySQL-withhighavailabilityandscalingfeaturesbakedin;providing anintegratedend-to-endsolutionthatiseasytouse." Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 9 / 84
  • 10. MySQL InnoDB Cluster: vision   "Asingleproduct-MySQL-withhighavailabilityandscalingfeaturesbakedin;providing anintegratedend-to-endsolutionthatiseasytouse." InnoDB cluster Ease-of-Use Extreme Scale-Out Out-of-Box Solution Built-in HA High Performance Everything Integrated Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 10 / 84
  • 11. One Product: MySQL All components created together Tested together Packaged together Easy to Use One client: MySQL Shell Easy packaging Integrated orchestration Homogenous servers Flexible and Moden SQL and NoSQL together Protocol Buffers Asynchronous API Developer friendly Support Read/Write Scale Out Shared clusters Federated systemof N replica sets supporting cross shard operations Each replica set manages a shard MySQL InnoDB Cluster: goals Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 11 / 84
  • 12. Our vision in 4 steps MySQLDocumentStore Relational&DocumentModels MySQLHA Out-Of-BoxHA ReadScale-Out AsyncReplication+AutoFailover WriteScale-Out Sharding E1 E3 E2 E4 Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 12 / 84
  • 13. Step 2´s Architecture Application MySQL Connector MySQL Router MySQL Shell InnoDB cluster Application MySQL Connector MySQL Router Mp M M Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 13 / 84
  • 14. Step 3´s Architecture Application MySQL Connector MySQL Router MySQL Shell InnoDB cluster Application MySQL Connector MySQL Router Mp M M S1 S2 S3 S4 S... Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 14 / 84
  • 15. Step 4´s Architecture Application MySQL Connector MySQL Router MySQL Shell Application MySQL Connector MySQL Router InnoDB cluster Mp M M S2 S3 S4 S...S1 InnoDB cluster Mp M M S1 S2 S3 S4 S... InnoDB cluster Mp M M S1 S2 S3 S4 S... Application MySQL Connector MySQL Router Application MySQL Connector MySQL Router Application MySQL Connector MySQL Router replicaset1 replicaset2 replicaset3 Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 15 / 84
  • 16. Group Replication: heart of MySQL InnoDB Cluster Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 16 / 84
  • 17. Group Replication: heart of MySQL InnoDB Cluster Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 17 / 84
  • 18. MySQL Group Replication but what is it ?!? Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 18 / 84
  • 19. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 19 / 84
  • 20. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 20 / 84
  • 21. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory GR uses a Paxos based protocol Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 21 / 84
  • 22. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory GR uses a Paxos based protocol GR allows to write on all Group Members (cluster nodes) simultaneously while retaining consistency Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 22 / 84
  • 23. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory GR uses a Paxos based protocol GR allows to write on all Group Members (cluster nodes) simultaneously while retaining consistency GR implements conflict detection and resolution Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 23 / 84
  • 24. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory GR uses a Paxos based protocol GR allows to write on all Group Members (cluster nodes) simultaneously while retaining consistency GR implements conflict detection and resolution GR allows automatic distributed recovery Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 24 / 84
  • 25. MySQL Group Replication but what is it ?!? GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory GR uses a Paxos based protocol GR allows to write on all Group Members (cluster nodes) simultaneously while retaining consistency GR implements conflict detection and resolution GR allows automatic distributed recovery Supported on all MySQL platforms !! Linux, Windows, Solaris, OSX, FreeBSD Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 25 / 84
  • 26. And for users ? Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 26 / 84
  • 27. And for users ? no longer necessary to handle server fail-over manually or with a complicated script Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 27 / 84
  • 28. And for users ? no longer necessary to handle server fail-over manually or with a complicated script GR provides fault tolerance Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 28 / 84
  • 29. And for users ? no longer necessary to handle server fail-over manually or with a complicated script GR provides fault tolerance GR enables update-everywhere setups Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 29 / 84
  • 30. And for users ? no longer necessary to handle server fail-over manually or with a complicated script GR provides fault tolerance GR enables update-everywhere setups GR handles crashes, failures, re-connetcs automatically Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 30 / 84
  • 31. And for users ? no longer necessary to handle server fail-over manually or with a complicated script GR provides fault tolerance GR enables update-everywhere setups GR handles crashes, failures, re-connetcs automatically Allows an easy setup of a MySQL service high available ! Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 31 / 84
  • 32. OK, but how does it work ? Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 32 / 84
  • 33. OK, but how does it work ? it´s just ... Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 33 / 84
  • 34. OK, but how does it work ? it´s just ... Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 34 / 84
  • 35. OK, but how does it work ? it´s just ... ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 35 / 84
  • 36. OK, but how does it work ? it´s just ... ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. not that easy to understand... right ? As a picture is worth a 1000 words, let´s illustrate this... Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 36 / 84
  • 37. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 37 / 84
  • 38. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 38 / 84
  • 39. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 39 / 84
  • 40. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 40 / 84
  • 41. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 41 / 84
  • 42. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 42 / 84
  • 43. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 43 / 84
  • 44. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 44 / 84
  • 45. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 45 / 84
  • 46. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 46 / 84
  • 47. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 47 / 84
  • 48. MySQL Group Replication Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 48 / 84
  • 49. Certification Certification is the process that only needs to answer the following unique question: Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 49 / 84
  • 50. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 50 / 84
  • 51. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 51 / 84
  • 52. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 52 / 84
  • 53. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 53 / 84
  • 54. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 54 / 84
  • 55. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node results are not reported to the group Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 55 / 84
  • 56. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node results are not reported to the group pass: enter in the apply queue Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 56 / 84
  • 57. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node results are not reported to the group pass: enter in the apply queue fail: drop the transaction Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 57 / 84
  • 58. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node results are not reported to the group pass: enter in the apply queue fail: drop the transaction serialized by the total order in GCS/XCOM+ GTID Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 58 / 84
  • 59. Certification Certification is the process that only needs to answer the following unique question: canthewrite(transaction)beapplied? based on unapplied earlier transactions such conflicts must come for other members/nodes happens on every member/node should be deterministic on every node results are not reported to the group pass: enter in the apply queue fail: drop the transaction serialized by the total order in GCS/XCOM+ GTID cost is based on trx size (# rows &# keys) Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 59 / 84
  • 60. Default = Single Primary Mode By default, MySQL InnoDB Cluster runs in Single Primary Mode. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 60 / 84
  • 61. Default = Single Primary Mode By default, MySQL InnoDB Cluster runs in Single Primary Mode. mysql> show global variables like 'group_replication_single_primary_mode'; +---------------------------------------+-------+ | Variable_name | Value | +---------------------------------------+-------+ | group_replication_single_primary_mode | ON | +---------------------------------------+-------+ Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 61 / 84
  • 62. Default = Single Primary Mode By default, MySQL InnoDB Cluster runs in Single Primary Mode. mysql> show global variables like 'group_replication_single_primary_mode'; +---------------------------------------+-------+ | Variable_name | Value | +---------------------------------------+-------+ | group_replication_single_primary_mode | ON | +---------------------------------------+-------+ In Single Primary Mode, a single member acts as the writable master (PRIMARY) and the rest of the members act as hot-standbys (SECONDARY). The group itself coordinates and configures itself automatically to determine which member will act as the PRIMARY, through a leader election mechanism. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 62 / 84
  • 63. Single Primary Mode - new in 8.0.2 group_replication_member_weight: influence the primary member election in Single- Primary mode (from0to100). Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 63 / 84
  • 64. Single Primary Mode - new in 8.0.2 group_replication_member_weight: influence the primary member election in Single- Primary mode (from0to100). more visibility Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 64 / 84
  • 65. Single Primary Mode - new in 8.0.2 group_replication_member_weight: influence the primary member election in Single- Primary mode (from0to100). more visibility mysql-sql> select * from performance_schema.replication_group_members; +--------------+--------------+--------+------+---------+-------------+-------+ | CHANNEL_NAME | MEMBER_ID | M_HOST | PORT | M_STATE | MEMBER_ROLE | M_VER | +--------------+--------------+--------+------+---------+-------------+-------+ | gr_applier | ...-8d90-... | mysql1 | 3306 | ONLINE | SECONDARY | 8.0.2 | | gr_applier | ...-be23-... | mysql2 | 3306 | ONLINE | SECONDARY | 8.0.2 | | gr_applier | ...-a747-... | mysql3 | 3306 | ONLINE | PRIMARY | 8.0.2 | +--------------+--------------+--------+------+---------+-------------+-------+ Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 65 / 84
  • 66. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 66 / 84
  • 67. MySQL Router (GA!) MySQL Router is lightweight middleware that provides transparent routing between your application and backend MySQL Servers. It can be used for a wide variety of use cases, such as providing high availability and scalability by effectively routing database traffic to appropriate backend MySQL Servers. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 67 / 84
  • 68. MySQL Router (GA!) MySQL Router is lightweight middleware that provides transparent routing between your application and backend MySQL Servers. It can be used for a wide variety of use cases, such as providing high availability and scalability by effectively routing database traffic to appropriate backend MySQL Servers. MySQL Router doesn´t require any specific configuration. It configures itself automatically (bootstrap) using MySQL InnoDB Cluster´s metadata. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 68 / 84
  • 69. MySQL Router (GA!) MySQL Router is lightweight middleware that provides transparent routing between your application and backend MySQL Servers. It can be used for a wide variety of use cases, such as providing high availability and scalability by effectively routing database traffic to appropriate backend MySQL Servers. MySQL Router doesn´t require any specific configuration. It configures itself automatically (bootstrap) using MySQL InnoDB Cluster´s metadata. The MySQL Router development will be focusing on sharding. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 69 / 84
  • 70. ProxySQL has native support for Group Replication which makes it a good choice for advanced users. ProxySQL If you need some specific features that are not yet available in MySQL Router, like transparent R/Wsplitting, then you can use your software of choice. We are also collaborating with ProxySQL. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 70 / 84
  • 71. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 71 / 84
  • 72. MySQL Shell (GA!) The MySQL Shell is an interactive Javascript, Python, or SQL interface supporting development and administration for the MySQL Server and is a component of the MySQL Server. You can use the MySQL Shell to performdata queries and updates as well as various administration operations. Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 72 / 84
  • 73. MySQL Shell (2) The MySQL Shell provides: Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 73 / 84
  • 74. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 74 / 84
  • 75. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 75 / 84
  • 76. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 76 / 84
  • 77. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 77 / 84
  • 78. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats MySQL Standard and X Protocols Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 78 / 84
  • 79. MySQL Shell (2) The MySQL Shell provides: Both Interactive and Batch operations Document and Relational Models CRUD Document and Relational APIs via scripting Traditional Table, JSON, Tab Separated output results formats MySQL Standard and X Protocols and more... Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 79 / 84
  • 80. MySQL Shell (3) PREVIEW: the newShell´s prompt is nice and clear ! Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 80 / 84
  • 81. don´t forget, this is a HA solution ! Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 81 / 84
  • 82. Deploying a MySQL InnoDB Cluster using MySQL Shell´s adminAPI: mysql-js> var i1 = 'root@instance01:3306'; mysql-js> var i2 = 'root@instance02:3306'; mysql-js> var i3 = 'root@instance03:3306'; mysql-js> dba.checkInstanceCon guration(i1); mysql-js> dba.checkInstanceCon guration(i2); mysql-js> dba.checkInstanceCon guration(i3); mysql-js> shell.connect(i1); mysql-js> var cluster = dba.createCluster('ChinaCluster'); mysql-js> cluster.checkInstanceState(i2); mysql-js> cluster.addInstance(i2); mysql-js> cluster.checkInstanceState(i3); mysql-js> cluster.addInstance(i3); Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 82 / 84
  • 83. See this in action and do it yourself during the next session ! Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 83 / 84
  • 84. Thank you ! Any Questions ? more at http://lefred.be/content/category/mysql/group-replication/ http://mysqlhighavailability.com/ Copyright @ 2017 Oracle and/or its affiliates. All rights reserved. 84 / 84