SlideShare a Scribd company logo
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

PDF
State of The Dolphin - May 2021
PDF
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
PDF
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
PDF
MySQL Database Service Webinar: Installing Drupal in oci with mds
PDF
Les nouveautés de MySQL 8.0
PDF
Les nouveautés de MySQL 8.0
PDF
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
PDF
MySQL Router REST API
State of The Dolphin - May 2021
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
MySQL Database Service Webinar: Installing Drupal in oci with mds
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
MySQL Router REST API

What's hot (20)

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

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

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

More from Frederic Descamps (10)

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

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)

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