SlideShare uma empresa Scribd logo
1 de 74
Baixar para ler offline
InnoDB Cluster
Now including Best Practices!
Kenny Gryp
MySQL Product Manager
1 / 58
2 / 582 / 58
 
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purpose only, and may not be
incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up
in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s
product remains at the sole discretion of Oracle.
3 / 58
MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
4 / 58
MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
4 / 58
Components:
MySQL Group Replication
MySQL Shell
MySQL Router
MySQL InnoDB Cluster
"A single product — MySQL — with high availability and scaling features baked in;
providing an integrated end-to-end solution that is easy to use."
4 / 58
One Product: MySQL
All components developed together
Integration of all components
Full stack testing
MySQL InnoDB Cluster - Goals
5 / 58
One Product: MySQL
All components developed together
Integration of all components
Full stack testing
Easy to Use
One client: MySQL Shell
Integrated orchestration
Homogenous servers
MySQL InnoDB Cluster - Goals
5 / 58
One Product: MySQL
All components developed together
Integration of all components
Full stack testing
Easy to Use
One client: MySQL Shell
Integrated orchestration
Homogenous servers
Flexible and Modern - X Protocol
SQL and NoSQL together
Protocol Buffers
Asynchronous API
Developer friendly
MySQL InnoDB Cluster - Goals
5 / 58
MySQL Group Replication
6 / 58
MySQL Group Replication
7 / 58
High Available Distributed MySQL DB
Fault tolerance
Automatic failover
Active/Active update anywhere (limits apply)
Automatic membership management
Adding/removing members
Network partitions, failures
Conflict detection and resolution
Prevents data loss
MySQL Group Replication
7 / 58
MySQL Group Replication
Implementation of Replicated Database State Machine
Total Order - Writes
XCOM - Paxos implementation
Configurable Consistency Guarantees
eventual consistency
8.0+: per session & global read/write consistency
Using MySQL replication framework by design
binary logs
relay logs
GTIDs: Global Transaction IDs
Generally Available since MySQL 5.7
Supported on all platforms: linux, windows, solaris, macosx, freebsd
8 / 58
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
MySQL Group Replication - Use Cases
9 / 58
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
MySQL Group Replication - Use Cases
9 / 58
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
Read Scaleout
Add/Remove members as needed
Replication Lag handling with Flow Control
Configurable Consistency Levels
Eventual
Full Consistency -- no stale reads
MySQL Group Replication - Use Cases
9 / 58
Consistency: No Data Loss (RPO=0)
in event of failure of (primary) member
Split brain prevention (Quorum)
Highly Available: Automatic Failover
Primary members are automatically elected
Automatic Network Partition handling
Read Scaleout
Add/Remove members as needed
Replication Lag handling with Flow Control
Configurable Consistency Levels
Eventual
Full Consistency -- no stale reads
Active/Active environments
Write to many members at the same time
ordered writes within the group (XCOM)
guaranteed consistency
Good write performance
due to Optimistic Locking
(workload dependent)
MySQL Group Replication - Use Cases
9 / 58
MySQL Group Replication - Architecture
Node Types:
R: Traffic proxy: MySQL Router
M: mysqld nodes participating in MySQL Group Replication
10 / 58
MySQL Router
11 / 58
MySQL Router
12 / 58
Transparent Access to Database Arch.
"provide transparent routing between your application and
back-end MySQL Servers"
Transparent client connection routing
Load balancing
Application connection failover
Little to no configuration needed
Stateless design offers easy HA client routing
Router as part of the application stack
Native support for InnoDB clusters
Understands Group Replication topology
Currently TCP Port each for PRIMARY and NON-PRIMARY
traffic
MySQL Router
12 / 58
MySQL Shell
13 / 58
MySQL Shell
14 / 58
Database Administration Interface
"MySQL Shell provides the developer and DBA with a single
intuitive, flexible, and powerful interface for all MySQL
related tasks!"
Multi-Language: JavaScript, Python, and SQL
Naturally scriptable
Supports Document and Relational models
Exposes full Development and Admin API
Classic MySQL protocol and X protocol
MySQL Shell
14 / 58
MySQL Shell - Easy to Use
15 / 58
MySQL Shell - Easy to Use
Create a Cluster:
mysql-js> c clusteradmin@mysql1
mysql-js> cluster = dba.createCluster('important_cluster')
15 / 58
MySQL Shell - Easy to Use
Create a Cluster:
mysql-js> c clusteradmin@mysql1
mysql-js> cluster = dba.createCluster('important_cluster')
Configure server to add later:
mysql-js> dba.con gureInstance('clusteradmin@mysql2')
15 / 58
MySQL Shell - Easy to Use
Create a Cluster:
mysql-js> c clusteradmin@mysql1
mysql-js> cluster = dba.createCluster('important_cluster')
Configure server to add later:
mysql-js> dba.con gureInstance('clusteradmin@mysql2')
Add server to the Cluster:
mysql-js> cluster.addInstance('clusteradmin@mysql2')
15 / 58
MySQL Shell - Easy to Use
Check the Cluster status:
mysql-js> cluster.status()
{
"clusterName": "important_cluster",
"defaultReplicaSet": {
"name": "default",
"primary": "mysql3:3306",
"ssl": "REQUIRED",
"status": "OK",
"statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
"topology": {
"mysql2:3306": {
"address": "mysql2:3306",
"mode": "R/O",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"mysql3:3306": {
"address": "mysql3:3306",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
...
16 / 58
MySQL InnoDB Cluster 8.0
17 / 58
MySQL InnoDB Cluster - Evolving
18 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
19 / 58
MySQL Shell 8.0.4 - Upgrade Checker
mysql-js> util.checkForServerUpgrade("root@localhost:3306")
The MySQL server at localhost:3306 will now be checked for compatibility issues for upgrade to MySQL 8.0..
MySQL version: 5.7.19 - MySQL Community Server (GPL)
1) Usage of db objects with names con icting with reserved keywords in 8.0 -- No issues found
2) Usage of utf8mb3 charset
Warning: The following objects use the utf8mb3 character set. It is recommended to convert them to use utf8mb4 instead,
for improved Unicode support.
simple_schema.city.name - column's default character set: utf8
simple_schema.city.country_code - column's default character set: utf8
3) Usage of use ZEROFILL/display length type attributes
Notice: The following table columns specify a ZEROFILL/display length attributes. Please be aware that they will be
ignored in MySQL 8.0
test.big_table.ORDINAL_POSITION - bigint(21) unsigned
4) Issues reported by 'check table x for upgrade' command -- No issues found
5) Table names in the mysql schema con icting with new tables in 8.0 -- No issues found
6) Usage of old temporal type -- No issues found
7) Foreign key constraint names longer than 64 characters -- No issues found
No fatal errors were found that would prevent a MySQL 8 upgrade, but some potential issues were detected.
Please ensure that the reported issues are not signi cant before upgrading.
https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/
20 / 58
MySQL Shell 8.0
MySQL Shell 8.0.12: storing MySQL passwords securely
https://mysqlserverteam.com/mysql-shell-8-0-12-storing-mysql-passwords-securely/
Added new Shell options to simplify connections to InnoDB clusters
$ mysqlsh --redirect-primary
--cluster
MySQL Shell 8.0.13: Unix Shell command line syntax
$ mysqlsh myAdmin@localhost:3306 -- dba create-cluster testCluster --member-weight=65 
--exit-state-action=READ_ONLY
21 / 58
MySQL Shell 8.0
MySQL Shell 8.0.12: storing MySQL passwords securely
https://mysqlserverteam.com/mysql-shell-8-0-12-storing-mysql-passwords-securely/
Added new Shell options to simplify connections to InnoDB clusters
$ mysqlsh --redirect-primary
--cluster
MySQL Shell 8.0.13: Unix Shell command line syntax
$ mysqlsh myAdmin@localhost:3306 -- dba create-cluster testCluster --member-weight=65 
--exit-state-action=READ_ONLY
Use MySQL Shell 8.0 even with 5.7 Group Replication!
21 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
22 / 58
MySQL Router 8.0
MySQL Router 8.0.14: Dynamic Config
{
"metadata-cache": {
"group-replication-id": "4b9e817a-0254-11e9-9cc0-080027bb5030",
"cluster-metadata-servers": [
"mysql://localhost:3310",
"mysql://localhost:3320",
"mysql://localhost:3330"
]
},
"version": "1.0.0"
}
https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-conf-options.html#option_mysqlrouter_dynamic_config
MySQL Router 8.0.17: Invalidate Metadata Cache based on Group Replication Notification
X Protocol notifies Routers of Group Replication status/membership change.
Best Practice with lots of Routers: $ mysqlrouter --bootstrap --conf-use-gr-noti cations
23 / 58
curl -s http://host:8080/api/20190715/metadata | jq
{
"items": [
{
"name": "myCluster"
}
]
}
$ curl -s 
http://host:8080/api/20190715/metadata/myCluster/con g 
| jq
{
"clusterName": "myCluster",
"timeRefreshInMs": 500,
"groupReplicationId": "b2025e72-9e5e-11e9-95c9-08002718d305",
"nodes": [
{
"hostname": "mysql1",
"port": 3306
},
{
"hostname": "mysql2",
"port": 3306
}
]
}
MySQL Router 8.0 - REST API Monitoring
8.0.17: REST API Monitoring
Use MySQL Router 8.0 even with 5.7 Group Replication!
24 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
25 / 58
MySQL Server 8.0 - Remote con gureInstance()
dba.con gureInstance("root@ic-1:3306")
Please provide the password for 'root@ic-1:3306': ***
Con guring MySQL instance at ic-1:3306 for use in an InnoDB cluster...
Some con guration options need to be xed:
+--------------------------+---------------+----------------+--------------------------------------------------+
| Variable | Current Value | Required Value | Note |
+--------------------------+---------------+----------------+--------------------------------------------------+
| binlog_checksum | CRC32 | NONE | Update the server variable |
| enforce_gtid_consistency | OFF | ON | Update read-only variable and restart the server |
| gtid_mode | OFF | ON | Update read-only variable and restart the server |
+--------------------------+---------------+----------------+--------------------------------------------------+
Do you want to perform the required con guration changes? [y/n]: y
Do you want to restart the instance after con guring it? [y/n]: y
Con guring instance...
The instance 'ic-1:3306' was con gured for cluster usage.
Restarting MySQL...
MySQL server at ic-1:3306 was restarted.
SET PERSIST gtid_mode = ON;
RESTART
https://dev.mysql.com/doc/refman/8.0/en/persisted-system-variables.html
26 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
27 / 58
Diagnostics - Shell 8.0
Shell 8.0.14: Extended cluster information
https://mysqlserverteam.com/mysql-innodb-cluster-extended-cluster-information-and-rescan/
Shell 8.0.14: Redesigned .rescan()
https://mysqlserverteam.com/mysql-innodb-cluster-extended-cluster-information-and-rescan/
28 / 58
Diagnostics - Replication 8.0
8.0: Dynamic tracing and debugging log for Group Replication
group_replication_communication_debug_options="GCS_DEBUG_ALL,XCOM_DEBUG_TRACE"
8.0: Extending Group Replication performance_schema tables
https://mysqlhighavailability.com/group-replication-extending-group-replication-performance_schema-tables/
8.0: Performance Schema Instrumentation for Group Replication
https://mysqlhighavailability.com/more-p_s-instrumentation-for-group-replication/
8.0.1: New monitoring replication features
https://mysqlhighavailability.com/new-monitoring-replication-features-and-more/
8.0.12: XCOM Cache instrumentation
https://mysqlhighavailability.com/extending-replication-instrumentation-account-for-memory-used-in-xcom/
8.0.13: Replication Instrumentation: TRX Retries
https://mysqlhighavailability.com/extending-replication-instrumentation-an-insight-on-transaction-retries/
29 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
30 / 58
Network
8.0.14: IPv6 Support
8.0.16: Enhanced Support for Large Transactions
group_replication_communication_max_message_size=10MB
https://mysqlhighavailability.com/enhanced-support-for-large-transactions-in-group-replication/
https://dev.mysql.com/doc/refman/8.0/en/group-replication-performance-message-fragmentation.html
8.0.2: Fine tuning options for the flow control mechanism
group_replication_ ow_control_period
group_replication_ ow_control_release_percent
31 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
32 / 58
Network Partition Handling
8.0.2: Configurable Member Weight (backported to 5.7.20)
group_replication_member_weight
8.0.12: Preventing Stale Reads
group_replication_exit_state_action=ABORT_SERVER/READ_ONLY/OFFLINE_MODE
https://mysqlhighavailability.com/fail-early-fail-fast-preventing-stale-reads-in-group-replication/
https://dev.mysql.com/doc/refman/8.0/en/group-replication-responses-failure.html
8.0.18: OFFLINE_MODE
https://mysqlhighavailability.com/automatic-member-fencing-with-offline_mode-in-group-replication/
Best Practice: Leave default, let Router handle it
8.0.2: Configurable Majority Timeout
group_replication_unreachable_majority_timeout
Best Practice: Leave default
33 / 58
Network Partition Handling
8.0.16: Auto-rejoin: Automatically join back group after leaving/being expelled
group_replication_autorejoin_tries
https://mysqlhighavailability.com/no-ping-will-tear-us-apart-enabling-member-auto-rejoin-in-group-replication/
https://dev.mysql.com/doc/refman/8.0/en/group-replication-responses-failure.html
Best Practice: set group_replication_autorejoin_tries=3
8.0.13: Configurable Member Expel Timeout
group_replication_member_expel_timeout
https://mysqlserverteam.com/mysql-innodb-cluster-controlling-data-consistency-and-expel-timeouts/
https://mysqlhighavailability.com/group-replication-coping-with-unreliable-failure-detection/
Best Practice: set group_replication_member_expel_timeout=5,
and with less reliable networks (public cloud), consider setting higher to 30-60, but not too high!
34 / 58
MySQL Group Replication - Network Partitions
35 / 58
Quorum based Network Partition Handling
Prevents Split-Brain
Best Practice:
Ensure uneven amount of nodes
view of <=50% of total members: Minority
view of >50% of total members: Majority
will accept reads/writes
MySQL Group Replication - Network Partitions
35 / 58
Quorum based Network Partition Handling
Prevents Split-Brain
Best Practice:
Ensure uneven amount of nodes
view of <=50% of total members: Minority
view of >50% of total members: Majority
will accept reads/writes
In case of event of loss of majority:
a minority partition can be forced ONLINE
Nodes in minority:
MySQL Router: moves away traffic
Fencing: members become
READ_ONLY,ABORT_SERVER,OFFLINE_MODE
MySQL Group Replication - Network Partitions
35 / 58
MySQL Group Replication - Network Partitions
Majority
1. wait 5 seconds, then suspect minority is gone
2. expel minority after group_replication_member_expel_timeout seconds
(default 0, immediately) (best: 5 seconds or ~30s with less reliable networks)
During: members cannot be added/removed, no new PRIMARY can be elected
3. Elect a new PRIMARY if needed (if original PRIMARY is not part of MAJORITY)
Minority
1. wait 5 seconds before suspecting itself to lost connection to the majority
2. MySQL Router immediately disconnects existing connections to minority members.
3. wait group_replication_unreachable_majority_timeout (default 0, forever) (best: 0, forever)
4. when timeout: group_replication_autorejoin_tries (default 0 times) (best: 3 times)
retries every 5 minutes
5. After group_replication_exit_state_action (best: default READ_ONLY)
READ_ONLY: allow stale reads to be served (latest default)
ABORT_SERVER: Shutdown MySQL
OFFLINE_MODE: disallow connections to MySQL (except admins)
36 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
37 / 58
Group Replication
group_replication_set_as_primary()
group_replication_switch_to_single_primary_mode()
group_replication_switch_to_multi_primary_mode()
Shell
setPrimaryInstance()
switchToSinglePrimaryMode()
switchToMultiPrimaryMode()
Dynamic Changes
Shell 8.0.14: Changing cluster options “live”
https://mysqlserverteam.com/mysql-innodb-cluster-changing-cluster-options-live/
8.0.13: Changing (Multi-)Primary Dynamically
https://mysqlserverteam.com/mysql-innodb-cluster-changing-cluster-topology-modes-live/
https://mysqlhighavailability.com/on-demand-primary-election/
https://dev.mysql.com/doc/refman/8.0/en/group-replication-changing-group-mode.html
38 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
39 / 58
Configurable Consistency Levels
8.0.14: Consistent Reads
group_replication_consistency
https://mysqlhighavailability.com/group-replication-consistency-levels/
https://mysqlhighavailability.com/group-replication-consistent-reads/
https://mysqlhighavailability.com/group-replication-preventing-stale-reads-on-primary-fail-over/
https://mysqlhighavailability.com/group-replication-consistent-reads-deep-dive/
https://mysqlserverteam.com/mysql-innodb-cluster-controlling-data-consistency-and-expel-timeouts/
40 / 58
MySQL Group Replication - Consistency
Default consistency guarantee is EVENTUAL
Write some data on nodeA,
Read same data immediately on nodeB,
data might be there yet... or not yet.
(Writes remain ordered and write consistency is never compromised)
Consistency level is configurable since MySQL 8.0.14 The scope can be SESSION or GLOBAL.
The possible values are:
EVENTUAL (default)
BEFORE_ON_PRIMARY_FAILOVER
BEFORE
AFTER
BEFORE_AND_AFTER
41 / 58
MySQL Group Replication - Consistency - EVENTUAL
42 / 58
MySQL Group Replication - Consistency - BEFORE
BEFORE READ or WRITE: wait for all trx to be applied
Impact on READ & WRITE: added response time: at least network latency
43 / 58
MySQL Group Replication - Consistency - AFTER
AFTER WRITE: wait for all trx to be applied
Impact on WRITE only: added response time: at least network latency
44 / 58
MySQL Group Replication - Consistency - BEFORE_AND_AFTER
BEFORE READ or WRITE: wait for all trx to be applied
AFTER WRITE: wait for all trx to be applied
45 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
46 / 58
Security
8.0.14: Binary Log Encryption https://mysqlhighavailability.com/binary-log-encryption-at-rest/
https://mysqlhighavailability.com/how-to-manually-decrypt-an-encrypted-binary-log-file/
8.0.16: Binary Log Encryption Key Rotation
https://mysqlhighavailability.com/rotating-binary-log-master-key-online/
47 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
48 / 58
Performance & Efficiency
8.0.1: replication performance improvements
https://mysqlhighavailability.com/replication-performance-improvements-in-mysql-8-0-1/
8.0.1: Replication connection / applier enhancements
https://mysqlhighavailability.com/no-new-options-no-new-commands-just-faster-at-full-load-where-it-counts/
8.0.3: Efficient JSON Replication in MySQL 8.0
https://mysqlhighavailability.com/efficient-json-replication-in-mysql-8-0/
8.0: Performance Improvements
https://mysqlhighavailability.com/performance-improvements-in-mysql-8-0-replication/
8.0.14: More efficient communication between GCS and XCOM
https://mysqlhighavailability.com/group-replication-now-interacts-with-the-group-communication-engine-more-efficiently/
8.0.16: Tunable Paxos Message Cache for Group Replication.
group_replication_message_cache_size=1G
https://dev.mysql.com/doc/refman/8.0/en/group-replication-performance-xcom-cache.html
49 / 58
Performance & Efficiency - Writeset Based Replication
8.0.1: Writeset based Parallel Replication - Best Practice: Enable it!
https://mysqlhighavailability.com/improving-the-parallel-applier-with-writeset-based-dependency-tracking/
binlog_transaction_dependency_tracking=WRITESET
used during distributed recovery & Group Replication
non conflicting transactions can be executed in parallel
50 / 58
Reasons to use MySQL InnoDB Cluster 8.0
MySQL Shell
MySQL Router
MySQL Server
Diagnostics
Network
Network Partition Handling
Dynamic Changes
Configurable Consistency Levels
Security
Performance & Efficiency
Node Provisioning
51 / 58
8.0.17: Node Provisioning
Provision members that have no data
Takes Physical snapshot of data
Using standard MySQL connection (3306)
Built-in the MySQL Server
Fully integrated in MySQL InnoDB Cluster
https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning
https://mysqlhighavailability.com/a-breakthrough-in-usability-automatic-node-provisioning
52 / 58
8.0.17: Node Provisioning
mysqlsh-js> cluster.addInstance("root@10.175.165.243:3320")
Please provide the password for 'root@10.175.165.243:3320': ******
Save password for 'root@10.175.165.243:3320'? [Y]es/[N]o/Ne[v]er (default No):
NOTE: A GTID set check of the MySQL instance at '10.175.165.243:3320' determined that
it is missing transactions that were purged from all cluster members.
Please select a recovery method [C]lone/[A]bort (default Abort): c
Validating instance at 10.175.165.243:3320...
NOTE: Instance detected as a sandbox.
Please note that sandbox instances are only suitable for deploying test clusters for use within the same host.
This instance reports its own address as 10.175.165.243:3320
Instance con guration is suitable.
A new instance will be added to the InnoDB cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.
Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.
Clone based state recovery is now in progress.
NOTE: A server restart is expected to happen as part of the clone process. If the
server does not support the RESTART command or does not come back after a
while, you may need to manually start it back.
53 / 58
8.0.17: Node Provisioning
* Waiting for clone to nish...
NOTE: 10.175.165.243:3320 is being cloned from 10.175.165.243:3310
** Stage DROP DATA: Completed
** Clone Transfer
FILE COPY ################################################# 100% Completed
PAGE COPY ################################################# 100% Completed
REDO COPY ################################################# 100% Completed
** Stage RECOVERY: 
NOTE: 10.175.165.243:3320 is shutting down...
* Waiting for server restart... ready
* 10.175.165.243:3320 has restarted, waiting for clone to nish...
* Clone process has nished: 3.66 GB transferred in 10 sec (366.14 MB/s)
State recovery already nished for '10.175.165.243:3320'
The instance '10.175.165.243:3320' was successfully added to the cluster.
54 / 58
8.0.17: Node Provisioning
Demo available on https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning
00:00
55 / 58
MySQL Replication: What's New
mysqlhighavailability.com/mysql-8-0-new-features-in-replication/
mysqlhighavailability.com/performance-improvements-in-mysql-8-0-replication/
mysqlhighavailability.com/replication-performance-improvements-in-mysql-8-0-1/
mysqlhighavailability.com/replication-features-in-mysql-8-0-1/
mysqlhighavailability.com/replication-features-in-mysql-8-0-2/
mysqlhighavailability.com/replication-features-in-mysql-8-0-3/
mysqlhighavailability.com/replication-features-in-mysql-8-0-4/
mysqlhighavailability.com/mysql-8-0-14-replication-enhancements/
mysqlhighavailability.com/mysql-8-0-16-replication-enhancements/
mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/
mysqlhighavailability.com/mysql-8-0-18-replication-enhancements/
MySQL InnoDB Cluster: What's New
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-ga-release/
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-13-ga-release/
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-14-ga-release/
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-16-release/
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-17-release/
mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-shell-adminapi-8-0-18-release/
Key Reference Blog Posts
56 / 58
MySQL InnoDB Cluster - Evolving
57 / 58
Best Practice: Time to upgrade to 8.0!
Questions ?
https://dev.mysql.com/
http://www.mysql.com
https://mysqlhighavailability.com/
https://mysqlserverteam.com/
58 / 58

Mais conteúdo relacionado

Mais procurados

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
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialJean-François Gagné
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorialFrederic 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
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...Miguel Araújo
 
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
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationUlf Wendel
 
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 - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationFrederic Descamps
 
Automate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleAutomate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleIvica Arsov
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginnersPini Dibask
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationKenny Gryp
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfJesmar Cannao'
 
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorAlmost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorJean-François Gagné
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...Severalnines
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationNuno Carvalho
 

Mais procurados (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
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
 
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
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
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 - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
Automate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleAutomate DBA Tasks With Ansible
Automate DBA Tasks With Ansible
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorAlmost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 

Semelhante a MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices

MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10Kenny Gryp
 
Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk Dave Stokes
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoKeith Hollman
 
Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmapOpenSourceIndia
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15Dave Stokes
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlsqlhjalp
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterOlivier DASINI
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationBogdan Kecman
 
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 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 Operator for Kubernetes
MySQL Operator for KubernetesMySQL Operator for Kubernetes
MySQL Operator for KubernetesKenny Gryp
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding Ulf Wendel
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
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
 
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
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com JavaMySQL Brasil
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 

Semelhante a MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices (20)

MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
 
Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk Scaling MySQL -- Swanseacon.co.uk
Scaling MySQL -- Swanseacon.co.uk
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
 
Megha_Osi my sql productroadmap
Megha_Osi my sql productroadmapMegha_Osi my sql productroadmap
Megha_Osi my sql productroadmap
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdl
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group 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 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 Operator for Kubernetes
MySQL Operator for KubernetesMySQL Operator for Kubernetes
MySQL Operator for Kubernetes
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding MySQL 5.7 Fabric: Introduction to High Availability and Sharding
MySQL 5.7 Fabric: Introduction to High Availability and Sharding
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
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
 
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
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com Java
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 

Mais de Kenny Gryp

MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08Kenny Gryp
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialMySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialKenny Gryp
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLKenny Gryp
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationKenny Gryp
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureKenny Gryp
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialKenny Gryp
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupKenny Gryp
 
Advanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suiteAdvanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suiteKenny Gryp
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationKenny Gryp
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB ClusterKenny Gryp
 

Mais de Kenny Gryp (10)

MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialMySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - Tutorial
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ Verisure
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
 
Advanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suiteAdvanced Percona XtraDB Cluster in a nutshell... la suite
Advanced Percona XtraDB Cluster in a nutshell... la suite
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & Optimization
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
 

Último

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 

Último (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices

  • 1. InnoDB Cluster Now including Best Practices! Kenny Gryp MySQL Product Manager 1 / 58
  • 2. 2 / 582 / 58
  • 3.   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. 3 / 58
  • 4. MySQL InnoDB Cluster "A single product — MySQL — with high availability and scaling features baked in; providing an integrated end-to-end solution that is easy to use." 4 / 58
  • 5. MySQL InnoDB Cluster "A single product — MySQL — with high availability and scaling features baked in; providing an integrated end-to-end solution that is easy to use." 4 / 58
  • 6. Components: MySQL Group Replication MySQL Shell MySQL Router MySQL InnoDB Cluster "A single product — MySQL — with high availability and scaling features baked in; providing an integrated end-to-end solution that is easy to use." 4 / 58
  • 7. One Product: MySQL All components developed together Integration of all components Full stack testing MySQL InnoDB Cluster - Goals 5 / 58
  • 8. One Product: MySQL All components developed together Integration of all components Full stack testing Easy to Use One client: MySQL Shell Integrated orchestration Homogenous servers MySQL InnoDB Cluster - Goals 5 / 58
  • 9. One Product: MySQL All components developed together Integration of all components Full stack testing Easy to Use One client: MySQL Shell Integrated orchestration Homogenous servers Flexible and Modern - X Protocol SQL and NoSQL together Protocol Buffers Asynchronous API Developer friendly MySQL InnoDB Cluster - Goals 5 / 58
  • 12. High Available Distributed MySQL DB Fault tolerance Automatic failover Active/Active update anywhere (limits apply) Automatic membership management Adding/removing members Network partitions, failures Conflict detection and resolution Prevents data loss MySQL Group Replication 7 / 58
  • 13. MySQL Group Replication Implementation of Replicated Database State Machine Total Order - Writes XCOM - Paxos implementation Configurable Consistency Guarantees eventual consistency 8.0+: per session & global read/write consistency Using MySQL replication framework by design binary logs relay logs GTIDs: Global Transaction IDs Generally Available since MySQL 5.7 Supported on all platforms: linux, windows, solaris, macosx, freebsd 8 / 58
  • 14. Consistency: No Data Loss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) MySQL Group Replication - Use Cases 9 / 58
  • 15. Consistency: No Data Loss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) Highly Available: Automatic Failover Primary members are automatically elected Automatic Network Partition handling MySQL Group Replication - Use Cases 9 / 58
  • 16. Consistency: No Data Loss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) Highly Available: Automatic Failover Primary members are automatically elected Automatic Network Partition handling Read Scaleout Add/Remove members as needed Replication Lag handling with Flow Control Configurable Consistency Levels Eventual Full Consistency -- no stale reads MySQL Group Replication - Use Cases 9 / 58
  • 17. Consistency: No Data Loss (RPO=0) in event of failure of (primary) member Split brain prevention (Quorum) Highly Available: Automatic Failover Primary members are automatically elected Automatic Network Partition handling Read Scaleout Add/Remove members as needed Replication Lag handling with Flow Control Configurable Consistency Levels Eventual Full Consistency -- no stale reads Active/Active environments Write to many members at the same time ordered writes within the group (XCOM) guaranteed consistency Good write performance due to Optimistic Locking (workload dependent) MySQL Group Replication - Use Cases 9 / 58
  • 18. MySQL Group Replication - Architecture Node Types: R: Traffic proxy: MySQL Router M: mysqld nodes participating in MySQL Group Replication 10 / 58
  • 21. Transparent Access to Database Arch. "provide transparent routing between your application and back-end MySQL Servers" Transparent client connection routing Load balancing Application connection failover Little to no configuration needed Stateless design offers easy HA client routing Router as part of the application stack Native support for InnoDB clusters Understands Group Replication topology Currently TCP Port each for PRIMARY and NON-PRIMARY traffic MySQL Router 12 / 58
  • 24. Database Administration Interface "MySQL Shell provides the developer and DBA with a single intuitive, flexible, and powerful interface for all MySQL related tasks!" Multi-Language: JavaScript, Python, and SQL Naturally scriptable Supports Document and Relational models Exposes full Development and Admin API Classic MySQL protocol and X protocol MySQL Shell 14 / 58
  • 25. MySQL Shell - Easy to Use 15 / 58
  • 26. MySQL Shell - Easy to Use Create a Cluster: mysql-js> c clusteradmin@mysql1 mysql-js> cluster = dba.createCluster('important_cluster') 15 / 58
  • 27. MySQL Shell - Easy to Use Create a Cluster: mysql-js> c clusteradmin@mysql1 mysql-js> cluster = dba.createCluster('important_cluster') Configure server to add later: mysql-js> dba.con gureInstance('clusteradmin@mysql2') 15 / 58
  • 28. MySQL Shell - Easy to Use Create a Cluster: mysql-js> c clusteradmin@mysql1 mysql-js> cluster = dba.createCluster('important_cluster') Configure server to add later: mysql-js> dba.con gureInstance('clusteradmin@mysql2') Add server to the Cluster: mysql-js> cluster.addInstance('clusteradmin@mysql2') 15 / 58
  • 29. MySQL Shell - Easy to Use Check the Cluster status: mysql-js> cluster.status() { "clusterName": "important_cluster", "defaultReplicaSet": { "name": "default", "primary": "mysql3:3306", "ssl": "REQUIRED", "status": "OK", "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", "topology": { "mysql2:3306": { "address": "mysql2:3306", "mode": "R/O", "readReplicas": {}, "role": "HA", "status": "ONLINE" }, "mysql3:3306": { "address": "mysql3:3306", "mode": "R/W", "readReplicas": {}, "role": "HA", "status": "ONLINE" ... 16 / 58
  • 30. MySQL InnoDB Cluster 8.0 17 / 58
  • 31. MySQL InnoDB Cluster - Evolving 18 / 58
  • 32. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 19 / 58
  • 33. MySQL Shell 8.0.4 - Upgrade Checker mysql-js> util.checkForServerUpgrade("root@localhost:3306") The MySQL server at localhost:3306 will now be checked for compatibility issues for upgrade to MySQL 8.0.. MySQL version: 5.7.19 - MySQL Community Server (GPL) 1) Usage of db objects with names con icting with reserved keywords in 8.0 -- No issues found 2) Usage of utf8mb3 charset Warning: The following objects use the utf8mb3 character set. It is recommended to convert them to use utf8mb4 instead, for improved Unicode support. simple_schema.city.name - column's default character set: utf8 simple_schema.city.country_code - column's default character set: utf8 3) Usage of use ZEROFILL/display length type attributes Notice: The following table columns specify a ZEROFILL/display length attributes. Please be aware that they will be ignored in MySQL 8.0 test.big_table.ORDINAL_POSITION - bigint(21) unsigned 4) Issues reported by 'check table x for upgrade' command -- No issues found 5) Table names in the mysql schema con icting with new tables in 8.0 -- No issues found 6) Usage of old temporal type -- No issues found 7) Foreign key constraint names longer than 64 characters -- No issues found No fatal errors were found that would prevent a MySQL 8 upgrade, but some potential issues were detected. Please ensure that the reported issues are not signi cant before upgrading. https://mysqlserverteam.com/mysql-shell-8-0-4-introducing-upgrade-checker-utility/ 20 / 58
  • 34. MySQL Shell 8.0 MySQL Shell 8.0.12: storing MySQL passwords securely https://mysqlserverteam.com/mysql-shell-8-0-12-storing-mysql-passwords-securely/ Added new Shell options to simplify connections to InnoDB clusters $ mysqlsh --redirect-primary --cluster MySQL Shell 8.0.13: Unix Shell command line syntax $ mysqlsh myAdmin@localhost:3306 -- dba create-cluster testCluster --member-weight=65 --exit-state-action=READ_ONLY 21 / 58
  • 35. MySQL Shell 8.0 MySQL Shell 8.0.12: storing MySQL passwords securely https://mysqlserverteam.com/mysql-shell-8-0-12-storing-mysql-passwords-securely/ Added new Shell options to simplify connections to InnoDB clusters $ mysqlsh --redirect-primary --cluster MySQL Shell 8.0.13: Unix Shell command line syntax $ mysqlsh myAdmin@localhost:3306 -- dba create-cluster testCluster --member-weight=65 --exit-state-action=READ_ONLY Use MySQL Shell 8.0 even with 5.7 Group Replication! 21 / 58
  • 36. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 22 / 58
  • 37. MySQL Router 8.0 MySQL Router 8.0.14: Dynamic Config { "metadata-cache": { "group-replication-id": "4b9e817a-0254-11e9-9cc0-080027bb5030", "cluster-metadata-servers": [ "mysql://localhost:3310", "mysql://localhost:3320", "mysql://localhost:3330" ] }, "version": "1.0.0" } https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-conf-options.html#option_mysqlrouter_dynamic_config MySQL Router 8.0.17: Invalidate Metadata Cache based on Group Replication Notification X Protocol notifies Routers of Group Replication status/membership change. Best Practice with lots of Routers: $ mysqlrouter --bootstrap --conf-use-gr-noti cations 23 / 58
  • 38. curl -s http://host:8080/api/20190715/metadata | jq { "items": [ { "name": "myCluster" } ] } $ curl -s http://host:8080/api/20190715/metadata/myCluster/con g | jq { "clusterName": "myCluster", "timeRefreshInMs": 500, "groupReplicationId": "b2025e72-9e5e-11e9-95c9-08002718d305", "nodes": [ { "hostname": "mysql1", "port": 3306 }, { "hostname": "mysql2", "port": 3306 } ] } MySQL Router 8.0 - REST API Monitoring 8.0.17: REST API Monitoring Use MySQL Router 8.0 even with 5.7 Group Replication! 24 / 58
  • 39. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 25 / 58
  • 40. MySQL Server 8.0 - Remote con gureInstance() dba.con gureInstance("root@ic-1:3306") Please provide the password for 'root@ic-1:3306': *** Con guring MySQL instance at ic-1:3306 for use in an InnoDB cluster... Some con guration options need to be xed: +--------------------------+---------------+----------------+--------------------------------------------------+ | Variable | Current Value | Required Value | Note | +--------------------------+---------------+----------------+--------------------------------------------------+ | binlog_checksum | CRC32 | NONE | Update the server variable | | enforce_gtid_consistency | OFF | ON | Update read-only variable and restart the server | | gtid_mode | OFF | ON | Update read-only variable and restart the server | +--------------------------+---------------+----------------+--------------------------------------------------+ Do you want to perform the required con guration changes? [y/n]: y Do you want to restart the instance after con guring it? [y/n]: y Con guring instance... The instance 'ic-1:3306' was con gured for cluster usage. Restarting MySQL... MySQL server at ic-1:3306 was restarted. SET PERSIST gtid_mode = ON; RESTART https://dev.mysql.com/doc/refman/8.0/en/persisted-system-variables.html 26 / 58
  • 41. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 27 / 58
  • 42. Diagnostics - Shell 8.0 Shell 8.0.14: Extended cluster information https://mysqlserverteam.com/mysql-innodb-cluster-extended-cluster-information-and-rescan/ Shell 8.0.14: Redesigned .rescan() https://mysqlserverteam.com/mysql-innodb-cluster-extended-cluster-information-and-rescan/ 28 / 58
  • 43. Diagnostics - Replication 8.0 8.0: Dynamic tracing and debugging log for Group Replication group_replication_communication_debug_options="GCS_DEBUG_ALL,XCOM_DEBUG_TRACE" 8.0: Extending Group Replication performance_schema tables https://mysqlhighavailability.com/group-replication-extending-group-replication-performance_schema-tables/ 8.0: Performance Schema Instrumentation for Group Replication https://mysqlhighavailability.com/more-p_s-instrumentation-for-group-replication/ 8.0.1: New monitoring replication features https://mysqlhighavailability.com/new-monitoring-replication-features-and-more/ 8.0.12: XCOM Cache instrumentation https://mysqlhighavailability.com/extending-replication-instrumentation-account-for-memory-used-in-xcom/ 8.0.13: Replication Instrumentation: TRX Retries https://mysqlhighavailability.com/extending-replication-instrumentation-an-insight-on-transaction-retries/ 29 / 58
  • 44. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 30 / 58
  • 45. Network 8.0.14: IPv6 Support 8.0.16: Enhanced Support for Large Transactions group_replication_communication_max_message_size=10MB https://mysqlhighavailability.com/enhanced-support-for-large-transactions-in-group-replication/ https://dev.mysql.com/doc/refman/8.0/en/group-replication-performance-message-fragmentation.html 8.0.2: Fine tuning options for the flow control mechanism group_replication_ ow_control_period group_replication_ ow_control_release_percent 31 / 58
  • 46. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 32 / 58
  • 47. Network Partition Handling 8.0.2: Configurable Member Weight (backported to 5.7.20) group_replication_member_weight 8.0.12: Preventing Stale Reads group_replication_exit_state_action=ABORT_SERVER/READ_ONLY/OFFLINE_MODE https://mysqlhighavailability.com/fail-early-fail-fast-preventing-stale-reads-in-group-replication/ https://dev.mysql.com/doc/refman/8.0/en/group-replication-responses-failure.html 8.0.18: OFFLINE_MODE https://mysqlhighavailability.com/automatic-member-fencing-with-offline_mode-in-group-replication/ Best Practice: Leave default, let Router handle it 8.0.2: Configurable Majority Timeout group_replication_unreachable_majority_timeout Best Practice: Leave default 33 / 58
  • 48. Network Partition Handling 8.0.16: Auto-rejoin: Automatically join back group after leaving/being expelled group_replication_autorejoin_tries https://mysqlhighavailability.com/no-ping-will-tear-us-apart-enabling-member-auto-rejoin-in-group-replication/ https://dev.mysql.com/doc/refman/8.0/en/group-replication-responses-failure.html Best Practice: set group_replication_autorejoin_tries=3 8.0.13: Configurable Member Expel Timeout group_replication_member_expel_timeout https://mysqlserverteam.com/mysql-innodb-cluster-controlling-data-consistency-and-expel-timeouts/ https://mysqlhighavailability.com/group-replication-coping-with-unreliable-failure-detection/ Best Practice: set group_replication_member_expel_timeout=5, and with less reliable networks (public cloud), consider setting higher to 30-60, but not too high! 34 / 58
  • 49. MySQL Group Replication - Network Partitions 35 / 58
  • 50. Quorum based Network Partition Handling Prevents Split-Brain Best Practice: Ensure uneven amount of nodes view of <=50% of total members: Minority view of >50% of total members: Majority will accept reads/writes MySQL Group Replication - Network Partitions 35 / 58
  • 51. Quorum based Network Partition Handling Prevents Split-Brain Best Practice: Ensure uneven amount of nodes view of <=50% of total members: Minority view of >50% of total members: Majority will accept reads/writes In case of event of loss of majority: a minority partition can be forced ONLINE Nodes in minority: MySQL Router: moves away traffic Fencing: members become READ_ONLY,ABORT_SERVER,OFFLINE_MODE MySQL Group Replication - Network Partitions 35 / 58
  • 52. MySQL Group Replication - Network Partitions Majority 1. wait 5 seconds, then suspect minority is gone 2. expel minority after group_replication_member_expel_timeout seconds (default 0, immediately) (best: 5 seconds or ~30s with less reliable networks) During: members cannot be added/removed, no new PRIMARY can be elected 3. Elect a new PRIMARY if needed (if original PRIMARY is not part of MAJORITY) Minority 1. wait 5 seconds before suspecting itself to lost connection to the majority 2. MySQL Router immediately disconnects existing connections to minority members. 3. wait group_replication_unreachable_majority_timeout (default 0, forever) (best: 0, forever) 4. when timeout: group_replication_autorejoin_tries (default 0 times) (best: 3 times) retries every 5 minutes 5. After group_replication_exit_state_action (best: default READ_ONLY) READ_ONLY: allow stale reads to be served (latest default) ABORT_SERVER: Shutdown MySQL OFFLINE_MODE: disallow connections to MySQL (except admins) 36 / 58
  • 53. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 37 / 58
  • 54. Group Replication group_replication_set_as_primary() group_replication_switch_to_single_primary_mode() group_replication_switch_to_multi_primary_mode() Shell setPrimaryInstance() switchToSinglePrimaryMode() switchToMultiPrimaryMode() Dynamic Changes Shell 8.0.14: Changing cluster options “live” https://mysqlserverteam.com/mysql-innodb-cluster-changing-cluster-options-live/ 8.0.13: Changing (Multi-)Primary Dynamically https://mysqlserverteam.com/mysql-innodb-cluster-changing-cluster-topology-modes-live/ https://mysqlhighavailability.com/on-demand-primary-election/ https://dev.mysql.com/doc/refman/8.0/en/group-replication-changing-group-mode.html 38 / 58
  • 55. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 39 / 58
  • 56. Configurable Consistency Levels 8.0.14: Consistent Reads group_replication_consistency https://mysqlhighavailability.com/group-replication-consistency-levels/ https://mysqlhighavailability.com/group-replication-consistent-reads/ https://mysqlhighavailability.com/group-replication-preventing-stale-reads-on-primary-fail-over/ https://mysqlhighavailability.com/group-replication-consistent-reads-deep-dive/ https://mysqlserverteam.com/mysql-innodb-cluster-controlling-data-consistency-and-expel-timeouts/ 40 / 58
  • 57. MySQL Group Replication - Consistency Default consistency guarantee is EVENTUAL Write some data on nodeA, Read same data immediately on nodeB, data might be there yet... or not yet. (Writes remain ordered and write consistency is never compromised) Consistency level is configurable since MySQL 8.0.14 The scope can be SESSION or GLOBAL. The possible values are: EVENTUAL (default) BEFORE_ON_PRIMARY_FAILOVER BEFORE AFTER BEFORE_AND_AFTER 41 / 58
  • 58. MySQL Group Replication - Consistency - EVENTUAL 42 / 58
  • 59. MySQL Group Replication - Consistency - BEFORE BEFORE READ or WRITE: wait for all trx to be applied Impact on READ & WRITE: added response time: at least network latency 43 / 58
  • 60. MySQL Group Replication - Consistency - AFTER AFTER WRITE: wait for all trx to be applied Impact on WRITE only: added response time: at least network latency 44 / 58
  • 61. MySQL Group Replication - Consistency - BEFORE_AND_AFTER BEFORE READ or WRITE: wait for all trx to be applied AFTER WRITE: wait for all trx to be applied 45 / 58
  • 62. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 46 / 58
  • 63. Security 8.0.14: Binary Log Encryption https://mysqlhighavailability.com/binary-log-encryption-at-rest/ https://mysqlhighavailability.com/how-to-manually-decrypt-an-encrypted-binary-log-file/ 8.0.16: Binary Log Encryption Key Rotation https://mysqlhighavailability.com/rotating-binary-log-master-key-online/ 47 / 58
  • 64. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 48 / 58
  • 65. Performance & Efficiency 8.0.1: replication performance improvements https://mysqlhighavailability.com/replication-performance-improvements-in-mysql-8-0-1/ 8.0.1: Replication connection / applier enhancements https://mysqlhighavailability.com/no-new-options-no-new-commands-just-faster-at-full-load-where-it-counts/ 8.0.3: Efficient JSON Replication in MySQL 8.0 https://mysqlhighavailability.com/efficient-json-replication-in-mysql-8-0/ 8.0: Performance Improvements https://mysqlhighavailability.com/performance-improvements-in-mysql-8-0-replication/ 8.0.14: More efficient communication between GCS and XCOM https://mysqlhighavailability.com/group-replication-now-interacts-with-the-group-communication-engine-more-efficiently/ 8.0.16: Tunable Paxos Message Cache for Group Replication. group_replication_message_cache_size=1G https://dev.mysql.com/doc/refman/8.0/en/group-replication-performance-xcom-cache.html 49 / 58
  • 66. Performance & Efficiency - Writeset Based Replication 8.0.1: Writeset based Parallel Replication - Best Practice: Enable it! https://mysqlhighavailability.com/improving-the-parallel-applier-with-writeset-based-dependency-tracking/ binlog_transaction_dependency_tracking=WRITESET used during distributed recovery & Group Replication non conflicting transactions can be executed in parallel 50 / 58
  • 67. Reasons to use MySQL InnoDB Cluster 8.0 MySQL Shell MySQL Router MySQL Server Diagnostics Network Network Partition Handling Dynamic Changes Configurable Consistency Levels Security Performance & Efficiency Node Provisioning 51 / 58
  • 68. 8.0.17: Node Provisioning Provision members that have no data Takes Physical snapshot of data Using standard MySQL connection (3306) Built-in the MySQL Server Fully integrated in MySQL InnoDB Cluster https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning https://mysqlhighavailability.com/a-breakthrough-in-usability-automatic-node-provisioning 52 / 58
  • 69. 8.0.17: Node Provisioning mysqlsh-js> cluster.addInstance("root@10.175.165.243:3320") Please provide the password for 'root@10.175.165.243:3320': ****** Save password for 'root@10.175.165.243:3320'? [Y]es/[N]o/Ne[v]er (default No): NOTE: A GTID set check of the MySQL instance at '10.175.165.243:3320' determined that it is missing transactions that were purged from all cluster members. Please select a recovery method [C]lone/[A]bort (default Abort): c Validating instance at 10.175.165.243:3320... NOTE: Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as 10.175.165.243:3320 Instance con guration is suitable. A new instance will be added to the InnoDB cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background. Clone based state recovery is now in progress. NOTE: A server restart is expected to happen as part of the clone process. If the server does not support the RESTART command or does not come back after a while, you may need to manually start it back. 53 / 58
  • 70. 8.0.17: Node Provisioning * Waiting for clone to nish... NOTE: 10.175.165.243:3320 is being cloned from 10.175.165.243:3310 ** Stage DROP DATA: Completed ** Clone Transfer FILE COPY ################################################# 100% Completed PAGE COPY ################################################# 100% Completed REDO COPY ################################################# 100% Completed ** Stage RECOVERY: NOTE: 10.175.165.243:3320 is shutting down... * Waiting for server restart... ready * 10.175.165.243:3320 has restarted, waiting for clone to nish... * Clone process has nished: 3.66 GB transferred in 10 sec (366.14 MB/s) State recovery already nished for '10.175.165.243:3320' The instance '10.175.165.243:3320' was successfully added to the cluster. 54 / 58
  • 71. 8.0.17: Node Provisioning Demo available on https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning 00:00 55 / 58
  • 72. MySQL Replication: What's New mysqlhighavailability.com/mysql-8-0-new-features-in-replication/ mysqlhighavailability.com/performance-improvements-in-mysql-8-0-replication/ mysqlhighavailability.com/replication-performance-improvements-in-mysql-8-0-1/ mysqlhighavailability.com/replication-features-in-mysql-8-0-1/ mysqlhighavailability.com/replication-features-in-mysql-8-0-2/ mysqlhighavailability.com/replication-features-in-mysql-8-0-3/ mysqlhighavailability.com/replication-features-in-mysql-8-0-4/ mysqlhighavailability.com/mysql-8-0-14-replication-enhancements/ mysqlhighavailability.com/mysql-8-0-16-replication-enhancements/ mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/ mysqlhighavailability.com/mysql-8-0-18-replication-enhancements/ MySQL InnoDB Cluster: What's New mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-ga-release/ mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-13-ga-release/ mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-14-ga-release/ mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-16-release/ mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-17-release/ mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-shell-adminapi-8-0-18-release/ Key Reference Blog Posts 56 / 58
  • 73. MySQL InnoDB Cluster - Evolving 57 / 58
  • 74. Best Practice: Time to upgrade to 8.0! Questions ? https://dev.mysql.com/ http://www.mysql.com https://mysqlhighavailability.com/ https://mysqlserverteam.com/ 58 / 58