SlideShare a Scribd company logo
Mastering MySQL Database Architectures
MySQL Webinar Series
Miguel Araújo
Senior Principal Software Engineer
MySQL, Oracle
April 23, 2024
Deep Dive into MySQL Shell and MySQL Router
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.
Safe Harbor Statement
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
2
00:00 Business Requirements & MySQL Architectures
00:15 MySQL Shell: AdminAPI & Features
00:25 MySQL Router: Architecture & Features
00:35 Deployment Strategies
00:40 Advanced Features
00:45 Latest Additions
00:50 Q & A
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
3
~/mysql_webinar
Agenda
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
4
Business Requirements
Concepts – RTO & RPO
• RTO: Recovery Time Objective
• How long does it take to recover from a single
failure
• RPO: Recovery Point Objective
• How much data can be lost when a failure occurs
Types of Failures
• High Availability:
• Single Server Failure, Network Partition
• Disaster Recovery:
• Full Region / Network failure
• Human Error:
• Little Bobby Tables
5 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Business Requirements
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
6
MySQL Architectures
'classic', 'asynchronous' Replication based
Solution
• Manual failover & switchover
• Asynchronous reads
• Good write performance
7 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL InnoDB ReplicaSet
RPO != 0
RTO = minutes or more (manual failover)
High Availability solution based on Group
Replication
• Automatic failover / Fault Tolerance
• Automatic membership changes
• Network partition handling
• Consistency
8 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL InnoDB Cluster
RPO = 0
RTO = seconds (automatic failover)
Disaster Tolerance Solution for InnoDB
Clusters deployments in alternate
locations
• High Availability (Failure within a Region)
• RPO = 0
• RTO = seconds (automatic failover)
• Disaster Recovery (Region Failure)
• RPO != 0
• RTO = minutes or more (manual failover)
• No write performance impact
9 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL InnoDB ClusterSet
Read Scale-out
• Add any amount of async read replicas to a
Cluster
• Replicate/Failover from
• PRIMARY
• SECONDARIES
• LIST of candidates
Fully supported on
• InnoDB Cluster
• InnoDB ClusterSet
10 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
!
New in 8.1.0
MySQL InnoDB Cluster Read Replicas
11 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL InnoDB ClusterSet with Read Replicas
Flexible
• Add/Remove Read Replicas online
• Configure Router behavior dynamically
• Choose where to route traffic
Failover
• Automatic connection failover
• List of potential sources automatic or
manually populated
!
New in 8.1.0
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
12
What architecture fits my requirements?
Single Region
MySQL InnoDB Cluster
• RPO = 0
• RTO = Seconds
MySQL InnoDB ReplicaSet
• RPO != 0
• RTO = Minutes or more (Manual failover)
13 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
High Availability
Best write performance Manual Failover
🔴
🟢
Automatic failover
🟢
Multi Region
14 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
High Availability
MySQL InnoDB Cluster: Deployed over multiple regions
Multi-Region Multi-Primary
3 DC
Requires very stable WAN
Write performance affected by latency between DCs
• RPO = 0
• RTO = Seconds
🟢
🔴
🔴
🔴
Multi Region
15 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Disaster Recovery
MySQL InnoDB ClusterSet
RPO = 0 & RTO = seconds within Region (HA)
Write performance (no sync to other region required)
Higher RTO: Manual failover
RPO != 0 when region fails
• RPO != 0
• RTO = Minutes or more
(Manual Failover)
🔴
🔴
🟢
🟢
16 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Read Scale-Out
MySQL InnoDB Cluster Read Replicas
Read Intensive Workloads
Offload Primary or Secondaries
Dedicated instances for other purposes
Additional redundancy for the dataset
🟢
🟢
🟢
🟢
Absolutely...
17 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Complex?
User Requirements
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
18
Easy to deploy
1
User Requirements
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
19
Easy to deploy
1 2 Easy to maintain
User Requirements
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
20
Easy to deploy
1 2 Easy to maintain Easy to monitor
3
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
21
MySQL Shell AdminAPI
22 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL Shell AdminAPI
Makes it easy
-----------------------------------------------------------------
Action Command # Calls
-----------------------------------------------------------------
Configure instances dba.configure_replica_set_instance(…) 3
Create Topology dba.create_replica_set(…) 1
Setup Admin Account rs.setup_admin_account(…) 1
Add instances rs.add_instance(…) 2
-----------------------------------------------------------------
SUM: 7
-----------------------------------------------------------------
-
InnoDB ReplicaSet
1
2 3
23 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL Shell AdminAPI
Makes it easy
-----------------------------------------------------------------
Action Command # Calls
-----------------------------------------------------------------
Configure instances dba.configure_instance(…) 3
Create Topology dba.create_cluster(…) 1
Setup Admin Account c.setup_admin_account(…) 1
Add instances c.add_instance(…) 2
-----------------------------------------------------------------
SUM: 7
-----------------------------------------------------------------
-
InnoDB Cluster
1
2 3
24 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL Shell AdminAPI
Makes it easy
--------------------------------------------------------
Action Command # Calls
--------------------------------------------------------
Create Topology c.create_cluster_set(…) 1
Create Replica Cluster cs.create_replica_cluster(…) 2
Add instances to Replica rc.add_instance(…) 3
--------------------------------------------------------
SUM: 6
--------------------------------------------------------
InnoDB ClusterSet
1 2
3 4
25 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL Shell AdminAPI
Makes it easy
-------------------------------------------------------------
Action Command # Calls
-------------------------------------------------------------
Add Read Replicas c.add_replica_instance(…) 3
Configure Router behavior c.set_routing_option(…) 1
-------------------------------------------------------------
SUM: 4
-------------------------------------------------------------
InnoDB Cluster Read Replicas
1 2 3
• Sandbox management
• Configuration checker & applier
• Account management
• MySQL Architectures management
• Integrated provisioning
• Configuration management
• MySQL Router management
• Follows best practices
26 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
General Features
AdminAPI
Copyright © 2023, Oracle and/or its affiliates. All rights reserved.
27
MySQL Router
28 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Architecture
Harness
Loader
routing
connection
_pool
Util Libs
metadata_cache http_server F
r
o
n
t
e
n
d
MySQL Shell
...
MySQL
MySQL MySQL
29 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Built-in plugins
routing Routing endpoints logic
destination_status Keep track of the state of the routing destinations
connection_pool Connection pool
metadata_cache Keep track of the MySQL Architectures state / metadata changes
logger Logging utility
syslog Unix based OSes logging: syslog
eventlog Windows OSes logging: eventlog
http_server HTTP server to handle REST API request
http_auth_realm Authentication realm for the http_server
http_auth_backend Authentication backend for the http_server
~/mysql-server/router/src/
30 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Built-in plugins
io Abstraction for IO OS layer
rest_api General REST API handler
rest_metadata_cache Metadata cache REST API handler
rest_router Global Router REST API handler
rest_routing Routing endpoint REST API handler
router_openssl OpenSSL library integration
router_protobuf Protobuf library integration
~/mysql-server/router/src/
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
31
Router and MySQL Architectures
32 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Core component of MySQL Architectures
Transparent access to Database Architecture
• Transparent client connection routing
• Load balancing
• Application connection failover
• Little to no configuration needed
• Stateless design
• Part of the application stack
• Full integration into MySQL Architectures
• InnoDB Cluster
• InnoDB ReplicaSet
• InnoDB ClusterSet
• InnoDB Cluster Read Replicas
• 3 TCP Ports:
• PRIMARY traffic
• SECONDARY traffic
• RW splitting
!
New in 8.1.0
!
New in 8.2.0
• Needed to route queries to the appropriate backend of the
topology
• Refreshed each [metadata_cache::ttl]
• Default: 0.5 sec
• ClusterSet: 5 sec
33 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Metadata Cache
mysql_innodb_cluster_metadata
metadata_cache
MySQL Shell
GR
MySQL
MySQL Router
• Push notifications sent via X protocol:
• group_replication/membership/quorum_loss
• group_replication/membership/view
• group_replication_status/role_change
• group_replication/status/state_change
• Router keeps an open connection to the X Plugin port waiting
for push notifications
• For every change, if needed, the metadata cache is updated
• Allows reducing drastically the TTL
34 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
GR Notifications
mysql_innodb_cluster_metadata
metadata_cache
MySQL Shell
GR
MySQL
MySQL Router
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
35
Deployment Strategies
It’s possible to use Router without bootstrapping, however…
36 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Manual configuration
[DEFAULT]
...
[routing:primary]
bind_address = localhost
bind_port = 3331
destinations = myserver_xyz:3306
routing_strategy = first-available
[routing:secondaries]
bind_address = localhost
bind_port = 3332
destinations = myserver_foo:3306, myserver_bar:3306
routing_strategy = round-robin-with-fallback
~/testbase/router/my.conf
Auto-configuration for the MySQL Architecture
• Fetches the topology Metadata information from one of the servers
• Stores it in a dynamic file (data/state.json)
• Registers itself in the Metadata schema
• Creates a configuration file ready to be used
• Creates daemon start/stop scripts
37 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Bootstrapping
MySQL Router
38 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Deploying MySQL Router
1. Install MySQL Router
2. Bootstrap
3. Start it!
$ mysqlrouter --bootstrap clusteradmin@brussels:3306 
--directory my_router 
--account router_admin 
--conf-use-gr-notifications
$ my_router/start.sh
~/testbase/router
39 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Deploying MySQL Router
It’s recommended to deploy Router on the same host as the application and enable GR
notifications. That allows:
• Using sockets instead of TCP/IP
• Decreasing network latency
• Fine-grained account access
• Scaling-out!
40 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Deploying MySQL Router
It’s recommended to deploy Router on the same host as the application and enable GR
notifications. That allows:
• Using sockets instead of TCP/IP
• Decreasing network latency
• Fine-grained account access
• Scaling-out!
Alternatively, it’s possible to deploy multiple
Routers in multiple machines under a VIP.
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
41
Advanced Features
• Based on a Connection Pool
• Re-use server-side connections that the client wanted to close,
saving the setup costs of establishing new ones
• Share server-side connections where the client is idling on an
active connection, to reduce the number of open server-side
connections freeing up resources bound to those idle
connections
42 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Connection Sharing and Reuse
MySQL Router
• Configurable with
• connection_sharing (disabled by default)
• connection_sharing_delay (1 by default)
• Seconds to wait before moving an idle connection to the pool
• idle_timeout (5 by default)
• How many seconds to keep a connection in the pool after the client
disconnects
• max_idle_server_connections (disabled by default)
• How many open connections can be kept in the pool after the client
disconnects
43 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Connection Sharing and Reuse
MySQL Router
• Built on top of the HTTP Server plugin
• Follows the OPENAPI 2.0 spec
• Exposes a Swagger file to describe the REST API:
ü Metadata cache config
ü Metadata cache status
ü Metadata cache instances list
ü Router status
ü Routing plugin status
ü Routes config / status / health / destination / connections
ü Routes list
ü Blocked hosts
44 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
REST API
45 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
$ curl -k -s -u miguel: https://localhost:8443/api/20190715/metadata/bootstrap/config | jq
{
"clusterName": "myCluster",
"timeRefreshInMs": 500,
"groupReplicationId": "1e6598b4-baab-11ee-adc4-d08e7912e4ee",
"nodes": [
{
"hostname": "127.0.0.1",
"port": 3310
},
{
"hostname": "127.0.0.1",
"port": 3320
},
{ "hostname": "127.0.0.1
~
46 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
$ curl -k -s -u miguel: https://localhost:8443/api/20190715/routes | jq
{
"items": [
{
"name": "bootstrap_ro”
},
{ "name": "bootstrap_rw”
},
{
"name": "bootstrap_rw_split”
},
{
"name": "bootstrap_x_ro”
},
~
47 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
48 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL REST Service
• Fast and powerful way to serve data to client applications via a
HTTPS REST interface
• Implemented as a MySQL Router feature
• Built on the concepts of ORDS, focusing on the strengths of
MySQL
• Focus on MySQL performance
• Focus on MySQL scalability
• Using MySQL/HeatWave as metadata storage
• Auto REST for tables, views, and procedures
• GUI Frontend with MySQL Shell for VSCode
49 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL REST Service (MRS)
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
50
Latest Additions / MySQL Router
• TLS handshakes are slow
• Cache and resume TLS sessions from:
• Client to Router
• Router to Server
• Saves time and resources by reducing the connection handshake
• Enabled by default
• Client and Server side caches, configurable with:
• _ssl_session_cache_mode: enable/disable
• _ssl_session_cache_size: max number of cached sessions
• _ssl_session_cache_timeout: cache timeout
51 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
TLS Session Caching !
New in 8.1.0
MySQL Router
• Motivation:
• 1 port to rule them all
• Up to now, the application had to be aware of the type of
transaction to use either the RW or the RO port
• It’s performant, but limits the usage of Router
• How it works:
• Router classifies each query as read or write automatically
and forwards to the appropriate backend
• It’s also possible to manually or programmatically to specify
the type of query using
• ROUTER SET
• query_attributes
52 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
R/W Splitting
!
New in 8.2.0
53 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
R/W Splitting
!
New in 8.2.0
mysqlsh-sql> SELECT 1; // SECONDARY
mysqlsh-sql> INSERT INTO tlb VALUES (1) // PRIMARY
mysqlsh-sql> START TRANSACTION READ_ONLY; // SECONDARY
mysqlsh-sql> CREATE TEMPORARY TABLE tbl (id int); // SECONDARY
mysqlsh-sql> SELECT * FROM tbl; // SECONDARY
mysqlsh-sql> COMMIT; // SECONDARY
mysqlsh-sql> query_attributes router.access_mode read_write;
mysqlsh-sql> select @@port; // PRIMARY
~
54 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
R/W Splitting
• The query is sent to the PRIMARY if the
access_mode is read_write
• The query is sent to the SECONDARY if the
access_mode is read_only
• If the access_mode is auto, a query is sent to
a SECONDARY if:
• Inside a READ_ONLY transaction, or
• Router attribute for access mode set
(router.access_mode), or
• Outside a transaction, the connection allows
sharing and the statement is a “read-only”
statement
• If none of the above is met, the query is sent
to the PRIMARY
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
55
Latest Additions / MySQL Shell
56 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Security
• MySQL Communication Stack used by default 8.0.30
• Full TLS/SSL Support 8.0.33
• Encrypt Group Replication and Asynchronous replication channels
• Certificate-based authentication for intra-node communication
• Certificate-based authentication for Admin and Router accounts
• Certificate-based authentication for Read Replicas 8.4.0
57 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Security
38 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Security
58 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Concurrency Control & Atomicity
• Locking mechanism 8.0.33
• Prevent conflicting operations to run concurrently resulting in unexpected outcome
• Supported on the whole API
• Operations rollback
• Avoid leaving the system / instance in a transient state
59 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Router management
• More control over Router configuration
• stats_updates_frequency 8.1.0
• read_only_targets 8.1.0
• all
• read_replicas
• secondaries
• unreachable_quorum_allowed_traffic 8.2.0
60 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Router management
61 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Router management
• List Router Options 8.4.0
• New command: .router_options([options])
• Router exposes all its configuration in the Metadata
• 3 verbosity levels
• Available on:
• <Cluster>
• <ReplicaSet>
• <ClusterSet>
62 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Router management
63 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Router management
3 verbosity levels:
• 0: includes only options that can be changed
from Shell (default)
• 1: Includes all global options and, per Router,
the options that have a different value than the
global
• 2: includes all global and Router options
64 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
MySQL Architectures
• InnoDB Cluster Read Replicas 8.1.0
• InnoDB ReplicaSet new commands: 8.3.0
• .rescan()
• .dissolve()
• .describe()
• Support fine-grained replication options 8.2.0
• SOURCE_*, NETWORK_NAMESPACE
• ClusterSet async channel & ReplicaSet
65 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
InnoDB Cluster Read Replicas
// Default, follow primary
mysqlsh-py> cluster.add_replica_instance("brussels:3006")
(...)
// Change to follow secondaries
mysqlsh-py> cluster.set_instance:option("brussels:3006", {"replicationSources":
"secondary"})
mysqlsh-py> cluster.rejoin_instance("brussels:3006")
(...)
// Confipyre Router to use only Read Replicas for R/O traffic
mysqlsh-js> cluster.set_routing_option("read_only_targets", "read_replicas"})
(...)
~/mysql_webinar
66 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
Deprecations 8.2.0 & Removals 8.4.0
• 5.7 support EOL’d Oct 2023
• dba.configureLocalInstance()
• Cluster.checkInstanceState()
• Command options:
• ipWhitelist
• connectToPrimary
• clearReadOnly
• failoverConsistency
• multiMaster
• groupSeeds
• memberSslMode
• queryMembers
• user/password
• interactive
• waitRecovery
• updateTopologyMode
Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
67
Thank you!
Questions? Join our Slack channel
bit.ly/mysql-slack
68 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
68
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL Router
Ad

Recommended

Will Oracle 23ai make you a better DBA or Developer?
Will Oracle 23ai make you a better DBA or Developer?
Sandesh Rao
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
Frederic Descamps
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
Kenny Gryp
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
Mark Swarbrick
 
Oracle Database Appliance Workshop
Oracle Database Appliance Workshop
MarketingArrowECS_CZ
 
Oracle AHF Insights 23c: Deeper Diagnostic Insights for your Oracle Database
Oracle AHF Insights 23c: Deeper Diagnostic Insights for your Oracle Database
Sandesh Rao
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
 
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery Solution
Miguel Araújo
 
MySQL High Availability Solutions
MySQL High Availability Solutions
Mydbops
 
Mysql-MHA
Mysql-MHA
Louis liu
 
Best practices for MySQL High Availability
Best practices for MySQL High Availability
Colin Charles
 
MySQL Group Replication
MySQL Group Replication
Kenny Gryp
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
Miguel Araújo
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
Keith Hollman
 
Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through )
Mydbops
 
PostgreSQL replication
PostgreSQL replication
NTT DATA OSS Professional Services
 
Introduction to OpenStack Cinder
Introduction to OpenStack Cinder
Sean McGinnis
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
Marcelo Altmann
 
MySQL HA with PaceMaker
MySQL HA with PaceMaker
Kris Buytaert
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
Mydbops
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
Frederic Descamps
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
AlwaysON Basics
AlwaysON Basics
Harsh Chawla
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Miguel Araújo
 
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Miguel Araújo
 

More Related Content

What's hot (20)

MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery Solution
Miguel Araújo
 
MySQL High Availability Solutions
MySQL High Availability Solutions
Mydbops
 
Mysql-MHA
Mysql-MHA
Louis liu
 
Best practices for MySQL High Availability
Best practices for MySQL High Availability
Colin Charles
 
MySQL Group Replication
MySQL Group Replication
Kenny Gryp
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
Miguel Araújo
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
Keith Hollman
 
Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through )
Mydbops
 
PostgreSQL replication
PostgreSQL replication
NTT DATA OSS Professional Services
 
Introduction to OpenStack Cinder
Introduction to OpenStack Cinder
Sean McGinnis
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
Marcelo Altmann
 
MySQL HA with PaceMaker
MySQL HA with PaceMaker
Kris Buytaert
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
Mydbops
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
Frederic Descamps
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
AlwaysON Basics
AlwaysON Basics
Harsh Chawla
 
MySQL Database Architectures - High Availability and Disaster Recovery Solution
MySQL Database Architectures - High Availability and Disaster Recovery Solution
Miguel Araújo
 
MySQL High Availability Solutions
MySQL High Availability Solutions
Mydbops
 
Best practices for MySQL High Availability
Best practices for MySQL High Availability
Colin Charles
 
MySQL Group Replication
MySQL Group Replication
Kenny Gryp
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
Miguel Araújo
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
Keith Hollman
 
Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through )
Mydbops
 
Introduction to OpenStack Cinder
Introduction to OpenStack Cinder
Sean McGinnis
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
Marcelo Altmann
 
MySQL HA with PaceMaker
MySQL HA with PaceMaker
Kris Buytaert
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
Mydbops
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
Frederic Descamps
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 

Similar to Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL Router (20)

MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Miguel Araújo
 
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Miguel Araújo
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
Kenny Gryp
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures - 2020-10
Kenny Gryp
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Olivier DASINI
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
Frederic 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 ...
Frederic Descamps
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
MySQL Web Reference Architecture
MySQL Web Reference Architecture
Ricky Setyawan
 
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
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL Technology Overview
MySQL Technology Overview
Keith Hollman
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Kenny Gryp
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
Miguel Araújo
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!
Vittorio Cioe
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
Olivier DASINI
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Miguel Araújo
 
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Deep Dive into MySQL InnoDB Cluster Read Scale-out Capabilities.pdf
Miguel Araújo
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
Kenny Gryp
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures - 2020-10
Kenny Gryp
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Olivier DASINI
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
Frederic 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 ...
Frederic Descamps
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
Ivan Ma
 
MySQL Web Reference Architecture
MySQL Web Reference Architecture
Ricky Setyawan
 
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
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Frederic Descamps
 
MySQL Technology Overview
MySQL Technology Overview
Keith Hollman
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
Ivan Ma
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Kenny Gryp
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
Miguel Araújo
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!
Vittorio Cioe
 
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
Olivier DASINI
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
Frazer Clement
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
Frederic Descamps
 
Ad

More from Miguel Araújo (13)

Routing Guidelines: Unlocking Smarter Query Routing in MySQL Architectures
Routing Guidelines: Unlocking Smarter Query Routing in MySQL Architectures
Miguel Araújo
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
Miguel Araújo
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - Tutorial
Miguel Araújo
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
Miguel Araújo
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
Miguel Araújo
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
Miguel Araújo
 
FOSDEM'18: MySQL InnoDB Cluster - MySQL HA Made Easy!
FOSDEM'18: MySQL InnoDB Cluster - MySQL HA Made Easy!
Miguel Araújo
 
MySQL Shell - The DevOps Tool for MySQL
MySQL Shell - The DevOps Tool for MySQL
Miguel Araújo
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.
Miguel Araújo
 
SLQ vs NOSQL - friends or foes
SLQ vs NOSQL - friends or foes
Miguel Araújo
 
Asynchronous Replication of Databases
Asynchronous Replication of Databases
Miguel Araújo
 
Evaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated Databases
Miguel Araújo
 
Routing Guidelines: Unlocking Smarter Query Routing in MySQL Architectures
Routing Guidelines: Unlocking Smarter Query Routing in MySQL Architectures
Miguel Araújo
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
Miguel Araújo
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - Tutorial
Miguel Araújo
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
Miguel Araújo
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
Miguel Araújo
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
Miguel Araújo
 
FOSDEM'18: MySQL InnoDB Cluster - MySQL HA Made Easy!
FOSDEM'18: MySQL InnoDB Cluster - MySQL HA Made Easy!
Miguel Araújo
 
MySQL Shell - The DevOps Tool for MySQL
MySQL Shell - The DevOps Tool for MySQL
Miguel Araújo
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.
Miguel Araújo
 
SLQ vs NOSQL - friends or foes
SLQ vs NOSQL - friends or foes
Miguel Araújo
 
Asynchronous Replication of Databases
Asynchronous Replication of Databases
Miguel Araújo
 
Evaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated Databases
Miguel Araújo
 
Ad

Recently uploaded (20)

Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL Router

  • 1. Mastering MySQL Database Architectures MySQL Webinar Series Miguel Araújo Senior Principal Software Engineer MySQL, Oracle April 23, 2024 Deep Dive into MySQL Shell and MySQL Router
  • 2. 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. Safe Harbor Statement Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 2
  • 3. 00:00 Business Requirements & MySQL Architectures 00:15 MySQL Shell: AdminAPI & Features 00:25 MySQL Router: Architecture & Features 00:35 Deployment Strategies 00:40 Advanced Features 00:45 Latest Additions 00:50 Q & A Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 3 ~/mysql_webinar Agenda
  • 4. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 4 Business Requirements
  • 5. Concepts – RTO & RPO • RTO: Recovery Time Objective • How long does it take to recover from a single failure • RPO: Recovery Point Objective • How much data can be lost when a failure occurs Types of Failures • High Availability: • Single Server Failure, Network Partition • Disaster Recovery: • Full Region / Network failure • Human Error: • Little Bobby Tables 5 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Business Requirements
  • 6. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 6 MySQL Architectures
  • 7. 'classic', 'asynchronous' Replication based Solution • Manual failover & switchover • Asynchronous reads • Good write performance 7 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL InnoDB ReplicaSet RPO != 0 RTO = minutes or more (manual failover)
  • 8. High Availability solution based on Group Replication • Automatic failover / Fault Tolerance • Automatic membership changes • Network partition handling • Consistency 8 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL InnoDB Cluster RPO = 0 RTO = seconds (automatic failover)
  • 9. Disaster Tolerance Solution for InnoDB Clusters deployments in alternate locations • High Availability (Failure within a Region) • RPO = 0 • RTO = seconds (automatic failover) • Disaster Recovery (Region Failure) • RPO != 0 • RTO = minutes or more (manual failover) • No write performance impact 9 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL InnoDB ClusterSet
  • 10. Read Scale-out • Add any amount of async read replicas to a Cluster • Replicate/Failover from • PRIMARY • SECONDARIES • LIST of candidates Fully supported on • InnoDB Cluster • InnoDB ClusterSet 10 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. ! New in 8.1.0 MySQL InnoDB Cluster Read Replicas
  • 11. 11 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL InnoDB ClusterSet with Read Replicas Flexible • Add/Remove Read Replicas online • Configure Router behavior dynamically • Choose where to route traffic Failover • Automatic connection failover • List of potential sources automatic or manually populated ! New in 8.1.0
  • 12. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 12 What architecture fits my requirements?
  • 13. Single Region MySQL InnoDB Cluster • RPO = 0 • RTO = Seconds MySQL InnoDB ReplicaSet • RPO != 0 • RTO = Minutes or more (Manual failover) 13 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. High Availability Best write performance Manual Failover 🔴 🟢 Automatic failover 🟢
  • 14. Multi Region 14 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. High Availability MySQL InnoDB Cluster: Deployed over multiple regions Multi-Region Multi-Primary 3 DC Requires very stable WAN Write performance affected by latency between DCs • RPO = 0 • RTO = Seconds 🟢 🔴 🔴 🔴
  • 15. Multi Region 15 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Disaster Recovery MySQL InnoDB ClusterSet RPO = 0 & RTO = seconds within Region (HA) Write performance (no sync to other region required) Higher RTO: Manual failover RPO != 0 when region fails • RPO != 0 • RTO = Minutes or more (Manual Failover) 🔴 🔴 🟢 🟢
  • 16. 16 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Read Scale-Out MySQL InnoDB Cluster Read Replicas Read Intensive Workloads Offload Primary or Secondaries Dedicated instances for other purposes Additional redundancy for the dataset 🟢 🟢 🟢 🟢
  • 17. Absolutely... 17 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Complex?
  • 18. User Requirements Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 18 Easy to deploy 1
  • 19. User Requirements Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 19 Easy to deploy 1 2 Easy to maintain
  • 20. User Requirements Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 20 Easy to deploy 1 2 Easy to maintain Easy to monitor 3
  • 21. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 21 MySQL Shell AdminAPI
  • 22. 22 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL Shell AdminAPI Makes it easy ----------------------------------------------------------------- Action Command # Calls ----------------------------------------------------------------- Configure instances dba.configure_replica_set_instance(…) 3 Create Topology dba.create_replica_set(…) 1 Setup Admin Account rs.setup_admin_account(…) 1 Add instances rs.add_instance(…) 2 ----------------------------------------------------------------- SUM: 7 ----------------------------------------------------------------- - InnoDB ReplicaSet 1 2 3
  • 23. 23 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL Shell AdminAPI Makes it easy ----------------------------------------------------------------- Action Command # Calls ----------------------------------------------------------------- Configure instances dba.configure_instance(…) 3 Create Topology dba.create_cluster(…) 1 Setup Admin Account c.setup_admin_account(…) 1 Add instances c.add_instance(…) 2 ----------------------------------------------------------------- SUM: 7 ----------------------------------------------------------------- - InnoDB Cluster 1 2 3
  • 24. 24 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL Shell AdminAPI Makes it easy -------------------------------------------------------- Action Command # Calls -------------------------------------------------------- Create Topology c.create_cluster_set(…) 1 Create Replica Cluster cs.create_replica_cluster(…) 2 Add instances to Replica rc.add_instance(…) 3 -------------------------------------------------------- SUM: 6 -------------------------------------------------------- InnoDB ClusterSet 1 2 3 4
  • 25. 25 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL Shell AdminAPI Makes it easy ------------------------------------------------------------- Action Command # Calls ------------------------------------------------------------- Add Read Replicas c.add_replica_instance(…) 3 Configure Router behavior c.set_routing_option(…) 1 ------------------------------------------------------------- SUM: 4 ------------------------------------------------------------- InnoDB Cluster Read Replicas 1 2 3
  • 26. • Sandbox management • Configuration checker & applier • Account management • MySQL Architectures management • Integrated provisioning • Configuration management • MySQL Router management • Follows best practices 26 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. General Features AdminAPI
  • 27. Copyright © 2023, Oracle and/or its affiliates. All rights reserved. 27 MySQL Router
  • 28. 28 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Architecture Harness Loader routing connection _pool Util Libs metadata_cache http_server F r o n t e n d MySQL Shell ... MySQL MySQL MySQL
  • 29. 29 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Built-in plugins routing Routing endpoints logic destination_status Keep track of the state of the routing destinations connection_pool Connection pool metadata_cache Keep track of the MySQL Architectures state / metadata changes logger Logging utility syslog Unix based OSes logging: syslog eventlog Windows OSes logging: eventlog http_server HTTP server to handle REST API request http_auth_realm Authentication realm for the http_server http_auth_backend Authentication backend for the http_server ~/mysql-server/router/src/
  • 30. 30 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Built-in plugins io Abstraction for IO OS layer rest_api General REST API handler rest_metadata_cache Metadata cache REST API handler rest_router Global Router REST API handler rest_routing Routing endpoint REST API handler router_openssl OpenSSL library integration router_protobuf Protobuf library integration ~/mysql-server/router/src/
  • 31. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 31 Router and MySQL Architectures
  • 32. 32 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Core component of MySQL Architectures Transparent access to Database Architecture • Transparent client connection routing • Load balancing • Application connection failover • Little to no configuration needed • Stateless design • Part of the application stack • Full integration into MySQL Architectures • InnoDB Cluster • InnoDB ReplicaSet • InnoDB ClusterSet • InnoDB Cluster Read Replicas • 3 TCP Ports: • PRIMARY traffic • SECONDARY traffic • RW splitting ! New in 8.1.0 ! New in 8.2.0
  • 33. • Needed to route queries to the appropriate backend of the topology • Refreshed each [metadata_cache::ttl] • Default: 0.5 sec • ClusterSet: 5 sec 33 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Metadata Cache mysql_innodb_cluster_metadata metadata_cache MySQL Shell GR MySQL MySQL Router
  • 34. • Push notifications sent via X protocol: • group_replication/membership/quorum_loss • group_replication/membership/view • group_replication_status/role_change • group_replication/status/state_change • Router keeps an open connection to the X Plugin port waiting for push notifications • For every change, if needed, the metadata cache is updated • Allows reducing drastically the TTL 34 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. GR Notifications mysql_innodb_cluster_metadata metadata_cache MySQL Shell GR MySQL MySQL Router
  • 35. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 35 Deployment Strategies
  • 36. It’s possible to use Router without bootstrapping, however… 36 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Manual configuration [DEFAULT] ... [routing:primary] bind_address = localhost bind_port = 3331 destinations = myserver_xyz:3306 routing_strategy = first-available [routing:secondaries] bind_address = localhost bind_port = 3332 destinations = myserver_foo:3306, myserver_bar:3306 routing_strategy = round-robin-with-fallback ~/testbase/router/my.conf
  • 37. Auto-configuration for the MySQL Architecture • Fetches the topology Metadata information from one of the servers • Stores it in a dynamic file (data/state.json) • Registers itself in the Metadata schema • Creates a configuration file ready to be used • Creates daemon start/stop scripts 37 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Bootstrapping MySQL Router
  • 38. 38 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Deploying MySQL Router 1. Install MySQL Router 2. Bootstrap 3. Start it! $ mysqlrouter --bootstrap clusteradmin@brussels:3306 --directory my_router --account router_admin --conf-use-gr-notifications $ my_router/start.sh ~/testbase/router
  • 39. 39 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Deploying MySQL Router It’s recommended to deploy Router on the same host as the application and enable GR notifications. That allows: • Using sockets instead of TCP/IP • Decreasing network latency • Fine-grained account access • Scaling-out!
  • 40. 40 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Deploying MySQL Router It’s recommended to deploy Router on the same host as the application and enable GR notifications. That allows: • Using sockets instead of TCP/IP • Decreasing network latency • Fine-grained account access • Scaling-out! Alternatively, it’s possible to deploy multiple Routers in multiple machines under a VIP.
  • 41. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 41 Advanced Features
  • 42. • Based on a Connection Pool • Re-use server-side connections that the client wanted to close, saving the setup costs of establishing new ones • Share server-side connections where the client is idling on an active connection, to reduce the number of open server-side connections freeing up resources bound to those idle connections 42 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Connection Sharing and Reuse MySQL Router
  • 43. • Configurable with • connection_sharing (disabled by default) • connection_sharing_delay (1 by default) • Seconds to wait before moving an idle connection to the pool • idle_timeout (5 by default) • How many seconds to keep a connection in the pool after the client disconnects • max_idle_server_connections (disabled by default) • How many open connections can be kept in the pool after the client disconnects 43 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Connection Sharing and Reuse MySQL Router
  • 44. • Built on top of the HTTP Server plugin • Follows the OPENAPI 2.0 spec • Exposes a Swagger file to describe the REST API: ü Metadata cache config ü Metadata cache status ü Metadata cache instances list ü Router status ü Routing plugin status ü Routes config / status / health / destination / connections ü Routes list ü Blocked hosts 44 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. REST API
  • 45. 45 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. $ curl -k -s -u miguel: https://localhost:8443/api/20190715/metadata/bootstrap/config | jq { "clusterName": "myCluster", "timeRefreshInMs": 500, "groupReplicationId": "1e6598b4-baab-11ee-adc4-d08e7912e4ee", "nodes": [ { "hostname": "127.0.0.1", "port": 3310 }, { "hostname": "127.0.0.1", "port": 3320 }, { "hostname": "127.0.0.1 ~
  • 46. 46 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. $ curl -k -s -u miguel: https://localhost:8443/api/20190715/routes | jq { "items": [ { "name": "bootstrap_ro” }, { "name": "bootstrap_rw” }, { "name": "bootstrap_rw_split” }, { "name": "bootstrap_x_ro” }, ~
  • 47. 47 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
  • 48. 48 Copyright © 2024, Oracle and/or its affiliates. All rights reserved.
  • 49. MySQL REST Service • Fast and powerful way to serve data to client applications via a HTTPS REST interface • Implemented as a MySQL Router feature • Built on the concepts of ORDS, focusing on the strengths of MySQL • Focus on MySQL performance • Focus on MySQL scalability • Using MySQL/HeatWave as metadata storage • Auto REST for tables, views, and procedures • GUI Frontend with MySQL Shell for VSCode 49 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL REST Service (MRS)
  • 50. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 50 Latest Additions / MySQL Router
  • 51. • TLS handshakes are slow • Cache and resume TLS sessions from: • Client to Router • Router to Server • Saves time and resources by reducing the connection handshake • Enabled by default • Client and Server side caches, configurable with: • _ssl_session_cache_mode: enable/disable • _ssl_session_cache_size: max number of cached sessions • _ssl_session_cache_timeout: cache timeout 51 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. TLS Session Caching ! New in 8.1.0 MySQL Router
  • 52. • Motivation: • 1 port to rule them all • Up to now, the application had to be aware of the type of transaction to use either the RW or the RO port • It’s performant, but limits the usage of Router • How it works: • Router classifies each query as read or write automatically and forwards to the appropriate backend • It’s also possible to manually or programmatically to specify the type of query using • ROUTER SET • query_attributes 52 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. R/W Splitting ! New in 8.2.0
  • 53. 53 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. R/W Splitting ! New in 8.2.0 mysqlsh-sql> SELECT 1; // SECONDARY mysqlsh-sql> INSERT INTO tlb VALUES (1) // PRIMARY mysqlsh-sql> START TRANSACTION READ_ONLY; // SECONDARY mysqlsh-sql> CREATE TEMPORARY TABLE tbl (id int); // SECONDARY mysqlsh-sql> SELECT * FROM tbl; // SECONDARY mysqlsh-sql> COMMIT; // SECONDARY mysqlsh-sql> query_attributes router.access_mode read_write; mysqlsh-sql> select @@port; // PRIMARY ~
  • 54. 54 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. R/W Splitting • The query is sent to the PRIMARY if the access_mode is read_write • The query is sent to the SECONDARY if the access_mode is read_only • If the access_mode is auto, a query is sent to a SECONDARY if: • Inside a READ_ONLY transaction, or • Router attribute for access mode set (router.access_mode), or • Outside a transaction, the connection allows sharing and the statement is a “read-only” statement • If none of the above is met, the query is sent to the PRIMARY
  • 55. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 55 Latest Additions / MySQL Shell
  • 56. 56 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Security • MySQL Communication Stack used by default 8.0.30 • Full TLS/SSL Support 8.0.33 • Encrypt Group Replication and Asynchronous replication channels • Certificate-based authentication for intra-node communication • Certificate-based authentication for Admin and Router accounts • Certificate-based authentication for Read Replicas 8.4.0
  • 57. 57 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Security 38 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Security
  • 58. 58 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Concurrency Control & Atomicity • Locking mechanism 8.0.33 • Prevent conflicting operations to run concurrently resulting in unexpected outcome • Supported on the whole API • Operations rollback • Avoid leaving the system / instance in a transient state
  • 59. 59 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Router management • More control over Router configuration • stats_updates_frequency 8.1.0 • read_only_targets 8.1.0 • all • read_replicas • secondaries • unreachable_quorum_allowed_traffic 8.2.0
  • 60. 60 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Router management
  • 61. 61 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Router management • List Router Options 8.4.0 • New command: .router_options([options]) • Router exposes all its configuration in the Metadata • 3 verbosity levels • Available on: • <Cluster> • <ReplicaSet> • <ClusterSet>
  • 62. 62 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Router management
  • 63. 63 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Router management 3 verbosity levels: • 0: includes only options that can be changed from Shell (default) • 1: Includes all global options and, per Router, the options that have a different value than the global • 2: includes all global and Router options
  • 64. 64 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. MySQL Architectures • InnoDB Cluster Read Replicas 8.1.0 • InnoDB ReplicaSet new commands: 8.3.0 • .rescan() • .dissolve() • .describe() • Support fine-grained replication options 8.2.0 • SOURCE_*, NETWORK_NAMESPACE • ClusterSet async channel & ReplicaSet
  • 65. 65 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. InnoDB Cluster Read Replicas // Default, follow primary mysqlsh-py> cluster.add_replica_instance("brussels:3006") (...) // Change to follow secondaries mysqlsh-py> cluster.set_instance:option("brussels:3006", {"replicationSources": "secondary"}) mysqlsh-py> cluster.rejoin_instance("brussels:3006") (...) // Confipyre Router to use only Read Replicas for R/O traffic mysqlsh-js> cluster.set_routing_option("read_only_targets", "read_replicas"}) (...) ~/mysql_webinar
  • 66. 66 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. Deprecations 8.2.0 & Removals 8.4.0 • 5.7 support EOL’d Oct 2023 • dba.configureLocalInstance() • Cluster.checkInstanceState() • Command options: • ipWhitelist • connectToPrimary • clearReadOnly • failoverConsistency • multiMaster • groupSeeds • memberSslMode • queryMembers • user/password • interactive • waitRecovery • updateTopologyMode
  • 67. Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 67 Thank you! Questions? Join our Slack channel bit.ly/mysql-slack
  • 68. 68 Copyright © 2024, Oracle and/or its affiliates. All rights reserved. 68