SlideShare a Scribd company logo
1 of 47
Download to read offline
Frédéric Descamps
Community Manager
MySQL
February 2021
From Single MySQL
Instance to HA
The Journey To MySQL InnoDB
Cluster
Who am I ?
about.me/lefred
Copyright @ 2021 Oracle and/or its affiliates.
2
Frédéric Descamps
@lefred
MySQL Evangelist
Managing MySQL since 3.20
devops believer
living in Belgium
h ps://lefred.be
hairdressers are closed in .be
Copyright @ 2021 Oracle and/or its affiliates.
3
Evolution to HA
MySQL 8.0
Copyright @ 2021 Oracle and/or its affiliates.
4
Copyright @ 2021 Oracle and/or its affiliates.
5
This is where it all begins...
Some tips:
use exclusively InnoDB
keep the durability defaults
Single MySQL Instance
 
Copyright @ 2021 Oracle and/or its affiliates.
6
Next level
The database becomes more important, loosing it might be an issue...
Copyright @ 2021 Oracle and/or its affiliates.
7
Next level
The database becomes more important, loosing it might be an issue...
RTO → hours
Copyright @ 2021 Oracle and/or its affiliates.
7
Next level
The database becomes more important, loosing it might be an issue...
RTO → hours
 
RPO → 1 day
Copyright @ 2021 Oracle and/or its affiliates.
7
Next level
The database becomes more important, loosing it might be an issue...
RTO → hours
 
RPO → 1 day
RTO: Recovery Time Objective (how long to recover)
RPO: Recovery Point Objective (how much data can be lost)
Copyright @ 2021 Oracle and/or its affiliates.
7
Physical Backups
Logical Backups
For logical backups, please use MySQL Shell
Dump & Load Utility !
Backups
Copyright @ 2021 Oracle and/or its affiliates.
8
Next level
RPO of 1 day ? Really ?? We want to reduce it to minutes at least !
Copyright @ 2021 Oracle and/or its affiliates.
9
Next level
RPO of 1 day ? Really ?? We want to reduce it to minutes at least !
RTO → hours
Copyright @ 2021 Oracle and/or its affiliates.
9
Next level
RPO of 1 day ? Really ?? We want to reduce it to minutes at least !
RTO → hours
 
RPO → minutes
Copyright @ 2021 Oracle and/or its affiliates.
9
This is the default in MySQL 8.0:
Durable Binlogs
 
Copyright @ 2021 Oracle and/or its affiliates.
10
Next level
My data is very important and I've a heavy workload... I would like to loose less than a
second !
Copyright @ 2021 Oracle and/or its affiliates.
11
Next level
My data is very important and I've a heavy workload... I would like to loose less than a
second !
RTO → hours
Copyright @ 2021 Oracle and/or its affiliates.
11
Next level
My data is very important and I've a heavy workload... I would like to loose less than a
second !
RTO → hours
 
RPO → less than a second
Copyright @ 2021 Oracle and/or its affiliates.
11
Enable GTID (optional but so convenient)
O -load binlogs (in real time)
Point-In-Time Recovery (PTR)
Copyright @ 2021 Oracle and/or its affiliates.
12
with restart
Enable GTID
Copyright @ 2021 Oracle and/or its affiliates.
13
with restart without restart
Enable GTID
Copyright @ 2021 Oracle and/or its affiliates.
13
O -load Binlogs
 
Copyright @ 2021 Oracle and/or its affiliates.
14
O -load Binlogs
 
On another machine:
mysqlbinlog --raw --read-from-remote-server --stop-never --host 10.0.0.2 
--port 3306 -u getbinlog -ppassword 
--ssl-mode='REQUIRED' binlog.xxxxxx
Copyright @ 2021 Oracle and/or its affiliates.
14
O -load Binlogs
 
On another machine:
mysqlbinlog --raw --read-from-remote-server --stop-never --host 10.0.0.2 
--port 3306 -u getbinlog -ppassword 
--ssl-mode='REQUIRED' binlog.xxxxxx
See h ps://lefred.be/content/howto-make-mysql-point-in-time-recovery-faster/
Copyright @ 2021 Oracle and/or its affiliates.
14
Next level
My service is important, I would like to be up again in some minutes
Copyright @ 2021 Oracle and/or its affiliates.
15
Next level
My service is important, I would like to be up again in some minutes
RTO → minutes
Copyright @ 2021 Oracle and/or its affiliates.
15
Next level
My service is important, I would like to be up again in some minutes
RTO → minutes
 
RPO → less than a second
Copyright @ 2021 Oracle and/or its affiliates.
15
Based on native Asynchronous
Replication
But easier.... easier is be er !
Data provisioning included (clone)
2 or more nodes
Manual Failover
Transparent/Automatic query routing with
MySQL Router
MySQL InnoDB ReplicaSet
Copyright @ 2021 Oracle and/or its affiliates.
16
MySQL InnoDB ReplicaSet
Copyright @ 2021 Oracle and/or its affiliates.
17
MySQL InnoDB ReplicaSet
On the current server:
JS > dba.con gureReplicaSetInstance()
JS > rs=dba.createReplicaSet('myreplicaset')
On a new one where MySQL (server and shell) is just installed:
JS > dba.con gureReplicaSetInstance()
Back on the rst instance:
JS > rs.addInstance('10.0.1.2')
Copyright @ 2021 Oracle and/or its affiliates.
18
MySQL InnoDB ReplicaSet - examples
Copyright @ 2021 Oracle and/or its affiliates.
19
MySQL InnoDB ReplicaSet - examples
Copyright @ 2021 Oracle and/or its affiliates.
20
MySQL InnoDB ReplicaSet - examples
Copyright @ 2021 Oracle and/or its affiliates.
21
MySQL Router
It's very easy to con gure MySQL Router with the bootstrap command !
Copyright @ 2021 Oracle and/or its affiliates.
22
MySQL Router
And as usual, visible in MySQL Shell
Copyright @ 2021 Oracle and/or its affiliates.
23
MySQL InnoDB ReplicaSet - Manual Failover
MySQL Shell is connected to MySQL InnoDB ReplicaSet using MySQL Router.
Copyright @ 2021 Oracle and/or its affiliates.
24
MySQL InnoDB ReplicaSet - Manual Failover
Copyright @ 2021 Oracle and/or its affiliates.
25
Next level
Now my service is very important, I would like to be almost always up (automatic failover)
and never loose data !
Copyright @ 2021 Oracle and/or its affiliates.
26
Next level
Now my service is very important, I would like to be almost always up (automatic failover)
and never loose data !
RTO → seconds
Copyright @ 2021 Oracle and/or its affiliates.
26
Next level
Now my service is very important, I would like to be almost always up (automatic failover)
and never loose data !
RTO → seconds
 
RPO → 0
Copyright @ 2021 Oracle and/or its affiliates.
26
Based on native Group Replication
But easier.... easier is still be er !
Data provisioning included (clone)
3 or more nodes (odd number)
Automatic Failover
Uses MySQL Router
Con gurable Consistency Levels
MySQL InnoDB Cluster
Copyright @ 2021 Oracle and/or its affiliates.
27
MySQL InnoDB Cluster
Copyright @ 2021 Oracle and/or its affiliates.
28
On the ReplicaSet Primary Server:
JS > dba.dropMetadataSchema()
JS > cluster=dba.createCluster('mycluster')
On the ReplicaSet Secondary instance:
SQL > STOP REPLICA;
SQL > RESET ALL REPLICA;
And back on the new Cluster Primary
member:
JS > cluster.addInstance('mysql-2')
MySQL InnoDB Cluster
And we can add a third note for automatic
fail-over, on that node:
Copyright @ 2021 Oracle and/or its affiliates.
29
On the ReplicaSet Primary Server:
JS > dba.dropMetadataSchema()
JS > cluster=dba.createCluster('mycluster')
On the ReplicaSet Secondary instance:
SQL > STOP REPLICA;
SQL > RESET ALL REPLICA;
And back on the new Cluster Primary
member:
JS > cluster.addInstance('mysql-2')
JS > dba.con gureInstance()
From a member of the cluster:
JS > cluster=dba.getCluster()
JS > cluster.addInstance('mysql-3')
Finally, don't forget to bootstrap MySQL
Router again:
# mysqlrouter --bootstrap 
clusteradmin@single-mysql:3306 
--conf-use-gr-noti cations 
--user mysqlrouter --force
# systemctl restart mysqlrouter
MySQL InnoDB Cluster
And we can add a third note for automatic
fail-over, on that node:
Copyright @ 2021 Oracle and/or its affiliates.
29
MySQL InnoDB Cluster
Copyright @ 2021 Oracle and/or its affiliates.
30
And what's next ?
MySQL InnoDB Cluster with an asynchronous replica for DR:
asynchronous replication source connection failover (8.0.22)
with support for Group Replication (8.0.23)
MySQL InnoDB Cluster with asynchronous Group Replication nodes
and more to come...
Copyright @ 2021 Oracle and/or its affiliates.
31
Questions ?
Copyright @ 2021 Oracle and/or its affiliates.
32

More Related Content

What's hot

Mysql Fun
Mysql FunMysql Fun
Mysql FunSHC
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020Frederic Descamps
 
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersMySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersFrederic Descamps
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDSFrederic Descamps
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDSMySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDSFrederic Descamps
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesFrederic Descamps
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellFrederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Frederic Descamps
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...Frederic Descamps
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)Kenny Gryp
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20Frederic Descamps
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialFrederic Descamps
 
MySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRVMySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRVKenny Gryp
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !Frederic Descamps
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesKenny Gryp
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10Kenny Gryp
 

What's hot (20)

MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Mysql Fun
Mysql FunMysql Fun
Mysql Fun
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
 
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersMySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Tech Café #8: MySQL 8.0 for Python Developers
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDSMySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)
 
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
 
MySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRVMySQL Connectors 8.0.19 & DNS SRV
MySQL Connectors 8.0.19 & DNS SRV
 
MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !MySQL Shell - the best DBA tool !
MySQL Shell - the best DBA tool !
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
 

Similar to From single MySQL instance to High Availability: the journey to MySQL InnoDB Cluster

MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemFrederic Descamps
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Miguel Araújo
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022Frederic Descamps
 
ConFoo MySQL Replication Evolution : From Simple to Group Replication
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group ReplicationDave Stokes
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfFrederic Descamps
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replicationsqlhjalp
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
 
Steps to Create odbc connection linux
Steps to Create odbc connection linuxSteps to Create odbc connection linux
Steps to Create odbc connection linuxOsama Mustafa
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08Kenny Gryp
 
2012 replication
2012 replication2012 replication
2012 replicationsqlhjalp
 
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...Olivier DASINI
 
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery SolutionMySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery SolutionMiguel Araújo
 
MySQL 8.0 Operational Changes
MySQL 8.0 Operational ChangesMySQL 8.0 Operational Changes
MySQL 8.0 Operational ChangesDave Stokes
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)Jean-François Gagné
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016Dave Stokes
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Ivan Ma
 

Similar to From single MySQL instance to High Availability: the journey to MySQL InnoDB Cluster (20)

MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
ConFoo MySQL Replication Evolution : From Simple to Group Replication
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group Replication
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replication
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
Steps to Create odbc connection linux
Steps to Create odbc connection linuxSteps to Create odbc connection linux
Steps to Create odbc connection linux
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
2012 replication
2012 replication2012 replication
2012 replication
 
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
 
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery SolutionMySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery Solution
 
MySQL 8.0 Operational Changes
MySQL 8.0 Operational ChangesMySQL 8.0 Operational Changes
MySQL 8.0 Operational Changes
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 

More from Frederic Descamps

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...Frederic Descamps
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionFrederic Descamps
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodeFrederic Descamps
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database ServiceFrederic Descamps
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQLFrederic Descamps
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldFrederic Descamps
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSFrederic Descamps
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0Frederic Descamps
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...Frederic Descamps
 

More from Frederic Descamps (10)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New World
 
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDSMySQL Database Service Webinar - Installing WordPress in OCI with MDS
MySQL Database Service Webinar - Installing WordPress in OCI with MDS
 
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
MySQL Day Virtual: Best Practices Tips - Upgrading to MySQL 8.0
 
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
OpenExpo Virtual Experience 2020: MySQL 8.0 Document Store - Discovery of a n...
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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 Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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.pdfsudhanshuwaghmare1
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

From single MySQL instance to High Availability: the journey to MySQL InnoDB Cluster

  • 1. Frédéric Descamps Community Manager MySQL February 2021 From Single MySQL Instance to HA The Journey To MySQL InnoDB Cluster
  • 2. Who am I ? about.me/lefred Copyright @ 2021 Oracle and/or its affiliates. 2
  • 3. Frédéric Descamps @lefred MySQL Evangelist Managing MySQL since 3.20 devops believer living in Belgium h ps://lefred.be hairdressers are closed in .be Copyright @ 2021 Oracle and/or its affiliates. 3
  • 4. Evolution to HA MySQL 8.0 Copyright @ 2021 Oracle and/or its affiliates. 4
  • 5. Copyright @ 2021 Oracle and/or its affiliates. 5
  • 6. This is where it all begins... Some tips: use exclusively InnoDB keep the durability defaults Single MySQL Instance   Copyright @ 2021 Oracle and/or its affiliates. 6
  • 7. Next level The database becomes more important, loosing it might be an issue... Copyright @ 2021 Oracle and/or its affiliates. 7
  • 8. Next level The database becomes more important, loosing it might be an issue... RTO → hours Copyright @ 2021 Oracle and/or its affiliates. 7
  • 9. Next level The database becomes more important, loosing it might be an issue... RTO → hours   RPO → 1 day Copyright @ 2021 Oracle and/or its affiliates. 7
  • 10. Next level The database becomes more important, loosing it might be an issue... RTO → hours   RPO → 1 day RTO: Recovery Time Objective (how long to recover) RPO: Recovery Point Objective (how much data can be lost) Copyright @ 2021 Oracle and/or its affiliates. 7
  • 11. Physical Backups Logical Backups For logical backups, please use MySQL Shell Dump & Load Utility ! Backups Copyright @ 2021 Oracle and/or its affiliates. 8
  • 12. Next level RPO of 1 day ? Really ?? We want to reduce it to minutes at least ! Copyright @ 2021 Oracle and/or its affiliates. 9
  • 13. Next level RPO of 1 day ? Really ?? We want to reduce it to minutes at least ! RTO → hours Copyright @ 2021 Oracle and/or its affiliates. 9
  • 14. Next level RPO of 1 day ? Really ?? We want to reduce it to minutes at least ! RTO → hours   RPO → minutes Copyright @ 2021 Oracle and/or its affiliates. 9
  • 15. This is the default in MySQL 8.0: Durable Binlogs   Copyright @ 2021 Oracle and/or its affiliates. 10
  • 16. Next level My data is very important and I've a heavy workload... I would like to loose less than a second ! Copyright @ 2021 Oracle and/or its affiliates. 11
  • 17. Next level My data is very important and I've a heavy workload... I would like to loose less than a second ! RTO → hours Copyright @ 2021 Oracle and/or its affiliates. 11
  • 18. Next level My data is very important and I've a heavy workload... I would like to loose less than a second ! RTO → hours   RPO → less than a second Copyright @ 2021 Oracle and/or its affiliates. 11
  • 19. Enable GTID (optional but so convenient) O -load binlogs (in real time) Point-In-Time Recovery (PTR) Copyright @ 2021 Oracle and/or its affiliates. 12
  • 20. with restart Enable GTID Copyright @ 2021 Oracle and/or its affiliates. 13
  • 21. with restart without restart Enable GTID Copyright @ 2021 Oracle and/or its affiliates. 13
  • 22. O -load Binlogs   Copyright @ 2021 Oracle and/or its affiliates. 14
  • 23. O -load Binlogs   On another machine: mysqlbinlog --raw --read-from-remote-server --stop-never --host 10.0.0.2 --port 3306 -u getbinlog -ppassword --ssl-mode='REQUIRED' binlog.xxxxxx Copyright @ 2021 Oracle and/or its affiliates. 14
  • 24. O -load Binlogs   On another machine: mysqlbinlog --raw --read-from-remote-server --stop-never --host 10.0.0.2 --port 3306 -u getbinlog -ppassword --ssl-mode='REQUIRED' binlog.xxxxxx See h ps://lefred.be/content/howto-make-mysql-point-in-time-recovery-faster/ Copyright @ 2021 Oracle and/or its affiliates. 14
  • 25. Next level My service is important, I would like to be up again in some minutes Copyright @ 2021 Oracle and/or its affiliates. 15
  • 26. Next level My service is important, I would like to be up again in some minutes RTO → minutes Copyright @ 2021 Oracle and/or its affiliates. 15
  • 27. Next level My service is important, I would like to be up again in some minutes RTO → minutes   RPO → less than a second Copyright @ 2021 Oracle and/or its affiliates. 15
  • 28. Based on native Asynchronous Replication But easier.... easier is be er ! Data provisioning included (clone) 2 or more nodes Manual Failover Transparent/Automatic query routing with MySQL Router MySQL InnoDB ReplicaSet Copyright @ 2021 Oracle and/or its affiliates. 16
  • 29. MySQL InnoDB ReplicaSet Copyright @ 2021 Oracle and/or its affiliates. 17
  • 30. MySQL InnoDB ReplicaSet On the current server: JS > dba.con gureReplicaSetInstance() JS > rs=dba.createReplicaSet('myreplicaset') On a new one where MySQL (server and shell) is just installed: JS > dba.con gureReplicaSetInstance() Back on the rst instance: JS > rs.addInstance('10.0.1.2') Copyright @ 2021 Oracle and/or its affiliates. 18
  • 31. MySQL InnoDB ReplicaSet - examples Copyright @ 2021 Oracle and/or its affiliates. 19
  • 32. MySQL InnoDB ReplicaSet - examples Copyright @ 2021 Oracle and/or its affiliates. 20
  • 33. MySQL InnoDB ReplicaSet - examples Copyright @ 2021 Oracle and/or its affiliates. 21
  • 34. MySQL Router It's very easy to con gure MySQL Router with the bootstrap command ! Copyright @ 2021 Oracle and/or its affiliates. 22
  • 35. MySQL Router And as usual, visible in MySQL Shell Copyright @ 2021 Oracle and/or its affiliates. 23
  • 36. MySQL InnoDB ReplicaSet - Manual Failover MySQL Shell is connected to MySQL InnoDB ReplicaSet using MySQL Router. Copyright @ 2021 Oracle and/or its affiliates. 24
  • 37. MySQL InnoDB ReplicaSet - Manual Failover Copyright @ 2021 Oracle and/or its affiliates. 25
  • 38. Next level Now my service is very important, I would like to be almost always up (automatic failover) and never loose data ! Copyright @ 2021 Oracle and/or its affiliates. 26
  • 39. Next level Now my service is very important, I would like to be almost always up (automatic failover) and never loose data ! RTO → seconds Copyright @ 2021 Oracle and/or its affiliates. 26
  • 40. Next level Now my service is very important, I would like to be almost always up (automatic failover) and never loose data ! RTO → seconds   RPO → 0 Copyright @ 2021 Oracle and/or its affiliates. 26
  • 41. Based on native Group Replication But easier.... easier is still be er ! Data provisioning included (clone) 3 or more nodes (odd number) Automatic Failover Uses MySQL Router Con gurable Consistency Levels MySQL InnoDB Cluster Copyright @ 2021 Oracle and/or its affiliates. 27
  • 42. MySQL InnoDB Cluster Copyright @ 2021 Oracle and/or its affiliates. 28
  • 43. On the ReplicaSet Primary Server: JS > dba.dropMetadataSchema() JS > cluster=dba.createCluster('mycluster') On the ReplicaSet Secondary instance: SQL > STOP REPLICA; SQL > RESET ALL REPLICA; And back on the new Cluster Primary member: JS > cluster.addInstance('mysql-2') MySQL InnoDB Cluster And we can add a third note for automatic fail-over, on that node: Copyright @ 2021 Oracle and/or its affiliates. 29
  • 44. On the ReplicaSet Primary Server: JS > dba.dropMetadataSchema() JS > cluster=dba.createCluster('mycluster') On the ReplicaSet Secondary instance: SQL > STOP REPLICA; SQL > RESET ALL REPLICA; And back on the new Cluster Primary member: JS > cluster.addInstance('mysql-2') JS > dba.con gureInstance() From a member of the cluster: JS > cluster=dba.getCluster() JS > cluster.addInstance('mysql-3') Finally, don't forget to bootstrap MySQL Router again: # mysqlrouter --bootstrap clusteradmin@single-mysql:3306 --conf-use-gr-noti cations --user mysqlrouter --force # systemctl restart mysqlrouter MySQL InnoDB Cluster And we can add a third note for automatic fail-over, on that node: Copyright @ 2021 Oracle and/or its affiliates. 29
  • 45. MySQL InnoDB Cluster Copyright @ 2021 Oracle and/or its affiliates. 30
  • 46. And what's next ? MySQL InnoDB Cluster with an asynchronous replica for DR: asynchronous replication source connection failover (8.0.22) with support for Group Replication (8.0.23) MySQL InnoDB Cluster with asynchronous Group Replication nodes and more to come... Copyright @ 2021 Oracle and/or its affiliates. 31
  • 47. Questions ? Copyright @ 2021 Oracle and/or its affiliates. 32