SlideShare a Scribd company logo
1 of 93
Download to read offline
MySQL InnoDB Cluster
Olivier Dasini
MySQL Principal Solutions Architect EMEA
olivier.dasini@oracle.com
@freshdaz
Copyright 2017, Oracle and/or its affiliates. All rights reserved
A complete High Availability solution for MySQL
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes 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 upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Me, Myself & I
➢ MySQL Geek
âś” Addicted to MySQL for 15+ years!
âś” Playing with databases for 20+ years
➢ MySQL Writer, Blogger and Speaker
âś” Also former : DBA, Consultant, Architect, Trainer, ...
➢ MySQL Principal Solutions Architect EMEA at Oracle
➢ Stay tuned! :
âś” @freshdaz
âś” http://dasini.net/blog
3
Olivier DASINI
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Program Agenda
1
2
3
4
High Availability
MySQL InnoDB Cluster
Architectures and Best Practices
Demo : Deploying MySQL InnoDB Cluster
4
Copyright 2017, Oracle and/or its affiliates. All rights reserved
The world's most popular open source database
Copyright 2017, Oracle and/or its affiliates. All rights reserved
1. Google
2. Facebook
3. YouTube
4. Baidu
5. Yahoo!
6. Amazon
7. Wikipedia
8. QQ
9. Google.co.in
10. Twitter
11. Live.com
12. Taobao
13. Msn.com
14. Yahoo.co.jp
15. Sina
16. Linkedin.com
17. Google.co.jp
18. Weibo
19. Bing.com
20. Yandaz.ru
Global Top 20 Sites: Powered by MySQL
Source: Wikipedia 2016 6
Powers the Web
Copyright 2017, Oracle and/or its affiliates. All rights reserved
They Scale
with MySQL
Mobile Network Supporting
Over 800 Million
Subscribers
2+ Billion Active Users
100 TB of User Data for PayPal
IDs Processed for
1 Billion Citizens
850 Million Candy Crush Game
Plays/Day
2 Billion Events/Day for Booking.com
7
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Powers Social
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Powers eCommerce
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Powers SaaS
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Powers FinTech
11
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Powers Unicorns
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 14
High Availability: Factors
• Environment
– Redundant servers in different datacenters and geographical areas will protect you against regional
issues—power grid failures, hurricanes, earthquakes, etc.
• Hardware
– Each part of your hardware stack—networking, storage, servers—should be redundant
• Software
– Every layer of the software stack needs to be duplicated and distributed across separate hardware and
environments
• Data
– Data loss and inconsistency/corruption must be prevented by having multiple copies of each piece of
data, with consistency checks and guarantees for each change
15
High Availability: The Causes of Downtime
16
40,00 %
40,00 %
20,00 %
Software/Application Human Error Hardware
* Source: Gartner Group 1998 survey
A study by the Gartner Group
projected that through 2015, 80% of
downtime will be due to people and
process issues
High Availability: The Business Cost of Downtime
• Calculate a cost per minute of downtime
– Average revenue generated per-minute over a year
– Cost of not meeting any customer SLAs
– Factor in costs that are harder to quantify
1. Revenue
2. Reputation
3. Customer sentiment
4. Stock price
5. Service’s success
6. Company’s very existence
17
THIS is why HA
matters!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Multiple copies of data with replication process
Copyright 2017, Oracle and/or its affiliates. All rights reserved
HA solutions with MySQL : Replication modes
• Asynchronous => MySQL Replication
— MySQL Default; In parallel: Master acks to app and sends transaction to slave
— Fast; Risk of lost changes if master dies
• Semi-Synchronous => MySQL Replication w/ semisynchronous plugin
— MySQL 5.5+ Enhanced in MySQL 5.7; Serially: Master waits for change to be received by slave then In parallel ack to app and apply changes on slave
— Intermediate latency; Lossless (MySQL 5.7)
• Virtual-Synchronous => MySQL InnoDB Cluster w/ MySQL Group Replication
— MySQL Group Replication; Multi-masters updates on nodes applied in parallel
— MySQL Plugin delivered by MySQL for MySQL :)
— Intermediate latency; Best suited to small transactions; Lossless
• Synchronous => MySQL NDB Cluster
— Only available with MySQL Cluster; Serially: Master waits for change to be applied on all slaves before ack to app
— Higher latency; If Active/Active, best suited to small transactions; Lossless
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Multiple copies of data with replication process
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Database Replication: Some Notes
Coordination Between Servers
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
This talk is not about...
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Replication
23
Off topicOff topic
Copyright 2017, Oracle and/or its affiliates. All rights reserved
Use MySQL Replication For HA
27
Redundancy: If master crashes, promote slave to master
B
C
CrashCrash
B is the
new master
Ouch!!! Whew!
https://dev.mysql.com/downloads/utilities/
B
C
A
C
B
Slave promotion managed by mysqlrpladmin or mysqlfailover
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
This talk is not about...
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
NDB Cluster
29
Off topicOff topic
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
• MySQL NDB Cluster
–In memory distributed database
–NDB storage engine
–Automatic sharding
–Native access via several API
–Read/write consistency
–Read/write scalability
–Management via MCM/mgm-tool
MySQL NDB Cluster
Rock Solid
Availability
In-Memory
Real-Time
Performance
Extreme
Read & Write
Scalability
Elasticity
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
1
2
3
4
High Availability
MySQL InnoDB Cluster
Architectures and Best Practices
Demo : Deploying MySQL InnoDB Cluster
33
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 34
MySQL InnoDB Cluster
Collection of products that work together to provide a complete High Availability solution for MySQL
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
InnoDB Cluster
35
App Servers with
MySQL Router
MySQL Group Replication
“High Availability becomes a core
first class feature of MySQL!”
MySQL Shell
Setup, Manage,
Orchestrate
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 36
A single product: MySQL
• All components created together
• Tested together
• Packaged together
Flexible and Modern
• C++ 11
• Protocol Buffers
• Developer friendly
MySQL InnoDB Cluster – Goals
Easy to use
• A single client: MySQL Shell
• Easy packaging
• Homogenous servers
Scale-out
• Sharded clusters
• Federated system of N replica sets
• Each replica set manages a shard
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 37
MySQL InnoDB Cluster: The Big Picture
P
App
S S
MySQL Shell and Orchestration Tooling
App
Simple Mapping,
State and Extra Metadata
Control, Coordinate,
Provision
Monitoring (MEM)
MySQL Router
MySQL Group Replication
MySQL Router
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication
Native, built-in High Availability for your MySQL databases
38
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Group Replication
39
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
MySQL Group Replication: What Is It?
• Group Replication library
– Implementation of Replicated Database State Machine theory
• MySQL GCS is based on Paxos (variant of Mencius)
– Provides virtually synchronous replication for MySQL 5.7+
– Supported on all MySQL platforms
• Linux, Windows, Solaris, OSX, FreeBSD
“Single/Multi-master update everywhere replication plugin for MySQL with built-in automatic
distributed recovery, conflict detection and group membership.”
41
http://dasini.net/blog/2016/11/08/deployer-un-cluster-mysql-group-replication/
• A Highly Available distributed MySQL database service
– Clustering eliminates single points of failure (No SPOF)
• Allows for online maintenance
– Removes the need for handling server fail-over
– Provides fault tolerance
– Enables update everywhere setups
– Automates group reconfiguration (handling of crashes, failures, re-connects)
– Provides a highly available replicated database
– Automatically ensures data consistency ie no data loss
• Detects and handles conflicts
• Prevents data loss
• Prevents data corruption
42
MySQL Group Replication: What Does It Provide?
MySQL Group Replication: Use Cases
• Elastic Replication
– Environments that require a very fluid replication infrastructure, where the
number of servers has to grow or shrink dynamically and with little pain as possible.
• Highly Available Shards
– Sharding is a popular approach to achieve write scale-out. Users can use MySQL
Group Replication to implement highly available shards in a federated system.
Each shard can map into a Replication Group.
• Alternative to Master-Slave Replication
– Single-primary mode provides further automation on such setups
â—Ź Automatic PRIMARY/SECONDARY roles assignment
â—Ź Automatic new PRIMARY election on PRIMARY failures
â—Ź Automatic setup of read/write modes on PRIMARY and SECONDARIES
â—Ź Global consistent view of which server is the PRIMARY
43
MySQL Group Replication: What Sets It Apart?
• Built by the MySQL Engineering Team
– Natively integrated into Server: InnoDB, Replication, GTIDs, Performance Schema, SYS
– Built-in, no need for separate downloads
– Available on all platforms [Linux, Windows, Solaris, FreeBSD, etc]
• Better performance than similar offerings
– MySQL GCS has optimized network protocol that reduces the impact on latency
• Easier monitoring
– Simple Performance Schema tables for group and node status/stats
– Native support for Group Replication in MySQL Enterprise Monitor
• Modern full stack MySQL HA being built around it
44
MySQL Group Replication: Architecture
Node Types
R: Traffic routers/proxies: mysqlrouter, ProxySQL, HAProxy...
M: mysqld nodes participating in Group Replication
45
MySQL Group Replication: Performance
46
MySQL Group Replication: Performance Comparison
47
Full stack secure connections
• Following the industry standards, Group Replication supports secure connections along the
complete stack
– Client connections
– Distributed recovery connections
– Connections between members
• IP Whitelisting
– Restrict which hosts are allowed to connect to the group
– By default it is set to the values AUTOMATIC, which allow connections from private subnetworks active
on the host
48
http://mysqlhighavailability.com/mysql-group-replication-securing-the-perimeter/
Prioritize member for the Primary Member Election
• group_replication_member_weight
– allows users to influence primary member election
– takes integer value between 0 and 100
– default value = 50
• The first primary member is still the member which bootstrapped the group irrespective of
group_replication_member_weight value.
49
http://mysqlhighavailability.com/group-replication-prioritise-member-for-the-primary-member-election/
node1> SET GLOBAL group_replication_member_weight= 90;
node2> SET GLOBAL group_replication_member_weight= 70;
node1> SET GLOBAL group_replication_member_weight= 90;
node2> SET GLOBAL group_replication_member_weight= 70;
Parallel applier support
• Group Replication now also takes full advantage of parallel binary log applier infrastructure
– Reduces applier lad and improves replication performance considerably
– Configured in the sale way as asynchronous replication
50
slave_parallel_workers=<NUMBER>
slave_parallel_type=logical_clock
slave_preserve_commit_order=ON
slave_parallel_workers=<NUMBER>
slave_parallel_type=logical_clock
slave_preserve_commit_order=ON
Single Primary Mode
• Configuration mode that makes a single member act as a writeable master (PRIMARY) and the rest of the members
act as hot-standbys (SECONDARIES)
– The group itself coordinates automatically to figure out which is the member that will act as the PRIMARY, through an
automatic primary election mechanism
– Secondaries are automatically set to read-only
• Single_primary mode is the default mode
– Closer to classic asynchronous replication setups, simpler to reason about the beginning
– Avoids some limitations of multi-primary mode by default
• The current PRIMARY member UUID can be know by executing the following SQL statement:
51
mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME='group_replication_primary_member'G
*************************** 1. row ***************************
VARIABLE_NAME: group_replication_primary_member
VARIABLE_VALUE: dcd3b36b-79c5-11e6-97b8-00212844d44e
mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME='group_replication_primary_member'G
*************************** 1. row ***************************
VARIABLE_NAME: group_replication_primary_member
VARIABLE_VALUE: dcd3b36b-79c5-11e6-97b8-00212844d44e
Multi-primary Mode
• Configuration mode that makes all members writeable
– Enabled by setting option --group_replication_single_primary_mode to OFF
• Any two transactions on different servers can write to the same tuple
• Conflicts will be detected and dealt with
– First committer wins rule
52
• Execute locally
– Group Replication starts replicating a transaction when it is ready to commit, just before being written to the binary log
• Send in-order to all members
– At that point, transactions are broadcast to the network using a group communication protocol (Paxos, similar to the
Mencius variant)
• Certify independently
– All members receive the transactions in order and execute a deterministic certification algorithms to check if the received
transaction can be applied safely
• Apply asynchronously
– On remote members successfully certified transactions are written to the relay log and asynchronously applied by the
members, just as happens for other replication methods.
– On local member, the prepared transactions is committed to the storage engine.
53
MySQL Group Replication
Transaction life cycle
MySQL Group Replication
Transaction life cycle
54
MySQL Group Replication
Synchronous Transaction Delivery
55
MySQL Group Replication
Full Transaction life cycle
56
MySQL Group Replication
Traditional vs Optimistic locking
57
Traditional locking Optimistic locking
Trx 2 waits
on Trx 1 commit
ERROR 1180 (HY000): Got error 149 during COMMIT
• Optimize the system as a whole
– Sometimes it is beneficial to delay some parts of a distributed system it to improve the throughput of the system as a whole
– In MySQL Group Replication, it is used to
â—Ź keep writers operating below the sustained capacity of the system;
â—Ź reduce buffering stress on the replication pipeline;
â—Ź protect the correct execution of the system.
• Designed as a safety measure
– Throttling will never be active while the system is operating below its sustained capacity.
• To better support unbalanced systems and unfriedly workloads
– Keep members closer for faster failover
– Keep members closer for reduced replication lag
– Reduce the number of transactions aborts in multi-master
• Make sure new members can always join write-intensive groups
– Nodes entering the group need to catch up previous work while also storing current work to apply later
– In case excess capacity is not available, the cluster will need to be put at lower throughput for new members to catch up
60
Flow Control
• MySQL 5.7 - Basic configuration options
– group-replicaton-fow-control-mode = QUOTA | DISABLED
– group-replicaton-fow-control-certfer-threshold = 0..n
– group-replicaton-fow-control-applier-threshold = 0..n
• Certifier/applier thresholds
– The thresholds are the point at which the flow-control system will delay the writes at the master
– The default is set to 25000 and should be kept larger then one second of sustained commit rate
– But some members will be up to 25000 transactions delayed, if, and only if, they are unable to keep up with the writer members
• MySQL 8.0.3 introduce additional options to fine-tune the heuristics
– group_replicaton_fow_control_min_quota = X commits/s
– group_replicaton_fow_control_min_recovery_quota = X commits/s
– group_replicaton_fow_control_max_commit_quota = X commits/s
– group_replicaton_fow_control_member_quota_percent = Y %
– group_replicaton_fow_control_period = Z seconds
– group_replicaton_fow_control_hold_percent = Y %
– group_replicaton_fow_control_release_percent = Y %
61
Flow Control options
MySQL Group Replication: Requirement
•InnoDB Storage Engine
– Data must be stored in the InnoDB transactional storage engine.
•Primary Keys
– Every table that is to be replicated by the group must have an explicit primary key
defined.
•IPv4 Network
– The group communication engine used by MySQL Group Replication only supports
IPv4.
•Network Performance
– Group Replication is designed to be deployed in a cluster environment where server
instances are very close to each other, and is impacted by both network latency as
well as network bandwidth.
62
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Storage Engine InnoDB
Distributed Architecture Shared nothing
Network failure protection Quorum
NoSQL APIs MySQL Document Store / InnoDB Memcached
Replication mode Virtually Synchronous
Database Failover Automatic
OS Supported Linux, Windows, Solaris, OSX, FreeBSD
Operational Complexity Medium
Administration Standard (MySQL)
MySQL Group Replication overview
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 65
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
Router 2.1
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Router 2.1
• MySQL Router is lightweight middleware that provides transparent routing
between your application and back-end MySQL Servers.
• MySQL Router also provides High Availability and Scalability by effectively
routing database traffic to appropriate back-end MySQL Servers.
• The pluggable architecture also enables developers to extend MySQL Router
for custom use cases.
66
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Router 2.1
• Native support for MySQL InnoDB clusters
– Understands Group Replication topology
– Utilizes metadata schema stored on each member
• Bootstraps itself and sets up client routing for the GR cluster
• Allows for intelligent client routing into the GR cluster
• Supports multi-master and single primary modes
• Core improvements
– Logging
– Monitoring
– Performance
– Security
67
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 68
Shell
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell
69
A single unified client for all administrative and operations tasks
• Advanced command-line client and code editor for the MySQL Server
– Supports development & administration for the MySQL Server
– Can be used to perform data queries/update & administration operations
• Interactive multi-language: JavaScript, Python, and SQL
– Naturally scriptable (with development & administrative APIs)
– Both interactive and batch operations
• Supports both Document (CRUD) and Relational models (SQL)
– Modern fluent API for the MySQL Document Store
– Supports the traditional Table results, as well as JSON or Tab separated output
• Exposes full Development and Admin API
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL Shell: Admin API
• Creation and Management of InnoDB Clusters
– Hide the complexity of Configuration, Provisioning, Orchestration
– mysql-js> dba.help()
• The global variable 'dba' is used to access the MySQL
AdminAPI
• Perform DBA operations
– Manage MySQL InnoDB clusters
• Create clusters
• Get cluster info
• Start/Stop MySQL Instances
• Validate MySQL instances
• …
Database Administration Interface
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
70
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
InnoDB Cluster
71
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
1
2
3
4
High Availability
MySQL InnoDB Cluster
Architectures and Best Practices
Demo : Deploying MySQL InnoDB Cluster
72
73
Architectures
Hardware and Infrastructure Notes
• 3, 5, or 7 machines per group
– Isolate machine resources as much as possible
– Limit virtualization layers
– Machines configured for dedicated database server role
• Recommended configuration
– 32-64 vCPUs with fast CPU clock (2.5GHz+)
– SSDs (for data and replication logs)
– High quality network connection between each machine
• Low latency, high throughput, reliable
• Limit routers and hubs as much as possible
• Isolated and dedicated network when possible
74
Shared Nothing Cluster – Single Data Center
75
Application Servers
MySQL Router in Stack
MySQL Database Service
Group Replication
Shared Nothing Cluster Active / Passive – Cross Data Center
76
MySQL Database Service
Group Replication
Active Data Center Backup Data Center
Clients
Shared Nothing Cluster – Cross Data Center
77
MySQL Database Service
Group Replication
Data Center 1 Data Center 2
Clients
Geographically Redundant Cluster
78
Async Replication
Active Data Center Backup Data Center
Clients
Fail-soft mode
79
Async Replication
Active Data Center Data Center 2
Clients
Active/Active Multi-Data Center Setup
80
Async Replication
Regional Data Center Regional Data Center
Regional ClientsRegional Clients
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
1
2
3
4
High Availability
MySQL InnoDB Cluster
Architectures and Best Practices
Demo : Deploying MySQL InnoDB Cluster
81
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Demo : Deploying MySQL InnoDB Cluster
in Single-Primary Mode
82
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL InnoDB Cluster: Architecture
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 1/6
http://dasini.net/blog/2017/03/13/tester-mysql-innodb-cluster/
1/ Connect to MySQL Shell
$ mysqlsh
2/ Deploy 3 local MySQL instances on ports : 3310 - 3320 - 3330
mysql-js> dba.deploySandboxInstance(3310)
mysql-js> dba.deploySandboxInstance(3320)
mysql-js> dba.deploySandboxInstance(3330)
• Deploying local sandbox MySQL Instances
Now we have 3 MySQL server instances
running on ports 3310, 3320 and 3330.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 2/6
Stop
mysql-js> dba.stopSandboxInstance(3310);
Start
mysql-js> dba.startSandboxInstance(3320);
Kill : simulate an unexpected halt while testing failover
mysql-js> dba.killSandboxInstance(3330);
Delete : Completely removes the sandbox instance from your file system
mysql-js> dba.deleteSandboxInstance(3330);
• Managing local sandbox MySQL Instances
Once a sandbox instance is running, it is possible to change its status at any time :
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 3/6
Check instance configuration before the deployment
mysql-js> dba.checkInstanceConfiguration('root@localhost:3310')
mysql-js> dba.checkInstanceConfiguration('root@localhost:3320')
mysql-js> dba.checkInstanceConfiguration('root@localhost:3330')
• Checking the configuration
Configuration issues could be fixed manually or with configureLocalInstance
e.g.
mysql-js> dba.configureLocalInstance('root@localhost:3310')
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 4/6
1/ Connect to instance 3310
mysql-js> c root@localhost:3310
2/ Create the cluster
mysql-js> var cluster=dba.createCluster('demoCluster');
3/ Check the transaction set and add node 3320 to the cluster
mysql-js> cluster.checkInstanceState('root@localhost:3320')
mysql-js> cluster.addInstance('root@localhost:3320')
4/ Check the transaction set and add node 3330 to the cluster
mysql-js> cluster.checkInstanceState('root@localhost:3330')
mysql-js> cluster.addInstance('root@localhost:3330')
5/ Check cluster status
mysql-js> cluster.status()
• Deploying the InnoDB Cluster
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 5/6
# Bootstrap MySQL Router
$ mysqlrouter --bootstrap root@localhost:3310 --directory /demoSandbox
# Start MySQL router
$ /demoSandbox/start.sh
• Deploying the Router
The following connection information can be used to connect to the cluster.
Classic MySQL protocol connections to cluster 'demoCluster':
- Read/Write Connections: localhost : 6446
- Read/Only Connections: localhost : 6447
X protocol connections to cluster 'demoCluster':
- Read/Write Connections: localhost : 64460
- Read/Only Connections: localhost : 64470
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Testing MySQL InnoDB Cluster in a sandbox – Demo 6/6
1/ Connect to MySQL Router (default port = 6446)
$ mysqlsh --uri=root@localhost:64466446
2/ Select primary node’s port
mysql-js> sql
mysql-sql>
SELECT @@port; -- display 3310
3/ Primary node crash!
mysql-sql> js
mysql-js>
dba.killSandboxInstance(3310)
• Failover
4/ Select primary node’s port
mysql-js> c root@localhost:6446
mysql-sql>
SELECT @@port; -- display 3320
5/ Member is back to the group
mysql-sql> js
mysql-js> dba.startSandboxInstance(3310)
var cluster =
dba.getCluster('demoCluster')
mysql-js>
cluster.rejoinInstance('root@localhost:3310')
mysql-js> cluster.status()
103
Administration - Monitoring
MySQL Enterprise Monitor 4.0
• Native holistic support for Group Replication clusters
– Intelligent monitoring and alerting
– Topology views
– Detailed metrics and graphs
– Best Practice advice
• Monitoring of MySQL Group Replication
104
MySQL Enterprise Monitor
105
• Group Replication with 3 online nodes
• Group Replication with 3 nodes :
– 2 online
– 1 unreachable
MySQL Enterprise Monitor
106
• Asynchronous replication between
– Group Replication cluster : master
– Standalone instances : slaves
MySQL Enterprise Monitor
107
• Asynchronous replication between
– Group Replication cluster 1 : master
– Group Replication cluster 2 : slave
Monitoring: replication_group_member_stats
• Useful to understand :
– how the applier queue is growing
– how many conflicts have been found
– how many transactions were checked
– which transactions are committed everywhere
â—Ź Important for monitoring the performance of the members connected in the group
node1> SELECT * FROM performance_schema.replication_group_member_statsG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
VIEW_ID: 14845735801161197:3
MEMBER_ID: 00014001-1111-1111-1111-111111111111
COUNT_TRANSACTIONS_IN_QUEUE: 0
COUNT_TRANSACTIONS_CHECKED: 0
COUNT_CONFLICTS_DETECTED: 0
COUNT_TRANSACTIONS_ROWS_VALIDATING: 0
TRANSACTIONS_COMMITTED_ALL_MEMBERS: 4e0f05b7-d9d0-11e6-87cf-002710cccc64:1-2
LAST_CONFLICT_FREE_TRANSACTION:
108
Monitoring: replication_group_members 1/2
• Used for monitoring the status of the different server instances that are tracked in the current view
node1> SELECT * FROM performance_schema.replication_group_membersG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00014001-1111-1111-1111-111111111111
MEMBER_HOST: localhost
MEMBER_PORT: 14001
MEMBER_STATE: ONLINE
*************************** 2. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00014002-2222-2222-2222-222222222222
MEMBER_HOST: localhost
MEMBER_PORT: 14002
MEMBER_STATE: ONLINE
*************************** 2. row ***************************
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00014003-3333-3333-3333-333333333333
MEMBER_HOST: localhost
MEMBER_PORT: 14003
MEMBER_STATE: ONLINE
109
Monitoring: replication_group_members 2/2
• replication_group_members table is updated whenever there is a view change
• There are various states that a server instance can be in
• If servers are communicating properly, all report the same states for all servers
• If there is a network partition, or a server leaves the group, then different information may be reported,
depending on which server is queried
110
Field Description Group Synchronized
ONLINE
The member is ready to serve as a fully functional group member, meaning that the client can connect and
start executing transactions Yes
RECOVERING
The member is in the process of becoming an active member of the group and is currently going through
the recovery process, receiving state information from a donor No
OFFLINE The plugin is loaded but the member does not belong to any group No
ERROR
The state of the local node. Whenever there is an error on the recovery phase or while applying changes,
the server enters this state No
UNREACHABLE
Whenever the local failure detector suspects that a given server is not reachable, because maybe it has
crashed or was disconnected involuntarily, it shows that server's state as 'unreachable' No
Monitoring: replication_connection_status
• Show information regarding Group Replication :
– transactions that have been received from the group and queued in the applier queue (the relay log)
– Recovery
node1> SELECT * FROM performance_schema.replication_connection_statusG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: 4e0f05b7-d9d0-11e6-87cf-002710cccc64
SOURCE_UUID: 4e0f05b7-d9d0-11e6-87cf-002710cccc64
THREAD_ID: NULL
SERVICE_STATE: ON
COUNT_RECEIVED_HEARTBEATS: 0
LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
RECEIVED_TRANSACTION_SET: 4e0f05b7-d9d0-11e6-87cf-002710cccc64:1-2
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
111
Monitoring: replication_applier_status
• The state of the Group Replication related channels and thread
• If there are many different worker threads applying transactions then the worker tables can
also be used to monitor what each worker thread is doing
node1> SELECT * FROM
performance_schema.replication_applier_statusG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
SERVICE_STATE: ON
REMAINING_DELAY: NULL
COUNT_TRANSACTIONS_RETRIES: 0
112
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Links
• Tutoriel – Configurer ProxySQL 1.4 pour MySQL 5.7 Group Replication
– http://dasini.net/blog/2018/01/09/configurer-proxysql-1-4-pour-mysql-5-7-group-replication/
• Tutoriel – Déployer MySQL InnoDB Cluster
– http://dasini.net/blog/2017/05/11/tutoriel-deployer-mysql-innodb-cluster/
• MySQL InnoDB Cluster Documentation
– https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-userguide.html
• Tester MySQL InnoDB Cluster
– http://dasini.net/blog/2017/03/13/tester-mysql-innodb-cluster/
• Adopte un… cluster MySQL Group Replication
– http://dasini.net/blog/2017/04/10/adopte-un-cluster-mysql-group-replication/
• MySQL Group Replication Documentation
– https://dev.mysql.com/doc/refman/5.7/en/group-replication.html
• Déployer un cluster MySQL Group Replication
– http://dasini.net/blog/2016/11/08/deployer-un-cluster-mysql-group-replication/
115
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Thank you!
MySQL 5.7 InnoDB Cluster (Jan 2018)

More Related Content

What's hot

MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Frederic Descamps
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10Kenny Gryp
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Mydbops
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinWagner Bianchi
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScaleMariaDB plc
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupKenny Gryp
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼NeoClova
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera ClusterAbdul Manaf
 
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 High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsMydbops
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)Altinity Ltd
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기NHN FORWARD
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Miguel AraĂşjo
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 

What's hot (20)

MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
 
Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 

Similar to MySQL 5.7 InnoDB Cluster (Jan 2018)

MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisOlivier DASINI
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability MattersMatt 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 InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
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
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1Ivan Ma
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017Ivan Ma
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!Vittorio Cioe
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology OverviewKeith Hollman
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014Sanjay Manwani
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...Olivier DASINI
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)OracleMySQL
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataOracleMySQL
 
MySQL Web Reference Architecture
MySQL Web Reference Architecture MySQL Web Reference Architecture
MySQL Web Reference Architecture Ricky Setyawan
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Manuel Contreras
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharingIvan Ma
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...OracleMySQL
 

Similar to MySQL 5.7 InnoDB Cluster (Jan 2018) (20)

MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP ParisMySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
MySQL InnoDB Cluster - Meetup Oracle MySQL / AFUP Paris
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
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 InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
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...
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
 
MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!MySQL InnoDB Cluster: High Availability Made Easy!
MySQL InnoDB Cluster: High Availability Made Easy!
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology Overview
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
Robust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL DataRobust easy affordable disaster recovery for MySQL Data
Robust easy affordable disaster recovery for MySQL Data
 
MySQL Web Reference Architecture
MySQL Web Reference Architecture MySQL Web Reference Architecture
MySQL Web Reference Architecture
 
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
Oracle MySQL Tutorial -- MySQL NoSQL Cloud Buenos Aires Nov, 13 2014
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
 

More from Olivier DASINI

MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsOlivier DASINI
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryOlivier DASINI
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamOlivier DASINI
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryOlivier DASINI
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryOlivier DASINI
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryOlivier DASINI
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryOlivier DASINI
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryOlivier DASINI
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinOlivier DASINI
 
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsOlivier DASINI
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreOlivier DASINI
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?Olivier DASINI
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018Olivier DASINI
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...Olivier DASINI
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?Olivier DASINI
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...Olivier DASINI
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionOlivier DASINI
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceOlivier DASINI
 

More from Olivier DASINI (20)

MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features Summary
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features Summary
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features Summary
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
 
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
 

Recently uploaded

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 

MySQL 5.7 InnoDB Cluster (Jan 2018)

  • 1. MySQL InnoDB Cluster Olivier Dasini MySQL Principal Solutions Architect EMEA olivier.dasini@oracle.com @freshdaz Copyright 2017, Oracle and/or its affiliates. All rights reserved A complete High Availability solution for MySQL
  • 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes 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 upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Me, Myself & I ➢ MySQL Geek âś” Addicted to MySQL for 15+ years! âś” Playing with databases for 20+ years ➢ MySQL Writer, Blogger and Speaker âś” Also former : DBA, Consultant, Architect, Trainer, ... ➢ MySQL Principal Solutions Architect EMEA at Oracle ➢ Stay tuned! : âś” @freshdaz âś” http://dasini.net/blog 3 Olivier DASINI
  • 4. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | Program Agenda 1 2 3 4 High Availability MySQL InnoDB Cluster Architectures and Best Practices Demo : Deploying MySQL InnoDB Cluster 4
  • 5. Copyright 2017, Oracle and/or its affiliates. All rights reserved The world's most popular open source database
  • 6. Copyright 2017, Oracle and/or its affiliates. All rights reserved 1. Google 2. Facebook 3. YouTube 4. Baidu 5. Yahoo! 6. Amazon 7. Wikipedia 8. QQ 9. Google.co.in 10. Twitter 11. Live.com 12. Taobao 13. Msn.com 14. Yahoo.co.jp 15. Sina 16. Linkedin.com 17. Google.co.jp 18. Weibo 19. Bing.com 20. Yandaz.ru Global Top 20 Sites: Powered by MySQL Source: Wikipedia 2016 6 Powers the Web
  • 7. Copyright 2017, Oracle and/or its affiliates. All rights reserved They Scale with MySQL Mobile Network Supporting Over 800 Million Subscribers 2+ Billion Active Users 100 TB of User Data for PayPal IDs Processed for 1 Billion Citizens 850 Million Candy Crush Game Plays/Day 2 Billion Events/Day for Booking.com 7
  • 8. Copyright 2017, Oracle and/or its affiliates. All rights reserved Powers Social
  • 9. Copyright 2017, Oracle and/or its affiliates. All rights reserved Powers eCommerce
  • 10. Copyright 2017, Oracle and/or its affiliates. All rights reserved Powers SaaS
  • 11. Copyright 2017, Oracle and/or its affiliates. All rights reserved Powers FinTech 11
  • 12. Copyright 2017, Oracle and/or its affiliates. All rights reserved Powers Unicorns
  • 13. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | 14
  • 14. High Availability: Factors • Environment – Redundant servers in different datacenters and geographical areas will protect you against regional issues—power grid failures, hurricanes, earthquakes, etc. • Hardware – Each part of your hardware stack—networking, storage, servers—should be redundant • Software – Every layer of the software stack needs to be duplicated and distributed across separate hardware and environments • Data – Data loss and inconsistency/corruption must be prevented by having multiple copies of each piece of data, with consistency checks and guarantees for each change 15
  • 15. High Availability: The Causes of Downtime 16 40,00 % 40,00 % 20,00 % Software/Application Human Error Hardware * Source: Gartner Group 1998 survey A study by the Gartner Group projected that through 2015, 80% of downtime will be due to people and process issues
  • 16. High Availability: The Business Cost of Downtime • Calculate a cost per minute of downtime – Average revenue generated per-minute over a year – Cost of not meeting any customer SLAs – Factor in costs that are harder to quantify 1. Revenue 2. Reputation 3. Customer sentiment 4. Stock price 5. Service’s success 6. Company’s very existence 17 THIS is why HA matters!
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Multiple copies of data with replication process
  • 18. Copyright 2017, Oracle and/or its affiliates. All rights reserved HA solutions with MySQL : Replication modes • Asynchronous => MySQL Replication — MySQL Default; In parallel: Master acks to app and sends transaction to slave — Fast; Risk of lost changes if master dies • Semi-Synchronous => MySQL Replication w/ semisynchronous plugin — MySQL 5.5+ Enhanced in MySQL 5.7; Serially: Master waits for change to be received by slave then In parallel ack to app and apply changes on slave — Intermediate latency; Lossless (MySQL 5.7) • Virtual-Synchronous => MySQL InnoDB Cluster w/ MySQL Group Replication — MySQL Group Replication; Multi-masters updates on nodes applied in parallel — MySQL Plugin delivered by MySQL for MySQL :) — Intermediate latency; Best suited to small transactions; Lossless • Synchronous => MySQL NDB Cluster — Only available with MySQL Cluster; Serially: Master waits for change to be applied on all slaves before ack to app — Higher latency; If Active/Active, best suited to small transactions; Lossless
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Multiple copies of data with replication process
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Database Replication: Some Notes Coordination Between Servers
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | This talk is not about...
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Replication 23 Off topicOff topic
  • 23. Copyright 2017, Oracle and/or its affiliates. All rights reserved Use MySQL Replication For HA 27 Redundancy: If master crashes, promote slave to master B C CrashCrash B is the new master Ouch!!! Whew! https://dev.mysql.com/downloads/utilities/ B C A C B Slave promotion managed by mysqlrpladmin or mysqlfailover
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | This talk is not about...
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | NDB Cluster 29 Off topicOff topic
  • 26. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | • MySQL NDB Cluster –In memory distributed database –NDB storage engine –Automatic sharding –Native access via several API –Read/write consistency –Read/write scalability –Management via MCM/mgm-tool MySQL NDB Cluster Rock Solid Availability In-Memory Real-Time Performance Extreme Read & Write Scalability Elasticity
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 1 2 3 4 High Availability MySQL InnoDB Cluster Architectures and Best Practices Demo : Deploying MySQL InnoDB Cluster 33
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 34 MySQL InnoDB Cluster Collection of products that work together to provide a complete High Availability solution for MySQL
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | InnoDB Cluster 35 App Servers with MySQL Router MySQL Group Replication “High Availability becomes a core first class feature of MySQL!” MySQL Shell Setup, Manage, Orchestrate
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 36 A single product: MySQL • All components created together • Tested together • Packaged together Flexible and Modern • C++ 11 • Protocol Buffers • Developer friendly MySQL InnoDB Cluster – Goals Easy to use • A single client: MySQL Shell • Easy packaging • Homogenous servers Scale-out • Sharded clusters • Federated system of N replica sets • Each replica set manages a shard
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 37 MySQL InnoDB Cluster: The Big Picture P App S S MySQL Shell and Orchestration Tooling App Simple Mapping, State and Extra Metadata Control, Coordinate, Provision Monitoring (MEM) MySQL Router MySQL Group Replication MySQL Router
  • 32. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Native, built-in High Availability for your MySQL databases 38
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Group Replication 39 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate
  • 34. MySQL Group Replication: What Is It? • Group Replication library – Implementation of Replicated Database State Machine theory • MySQL GCS is based on Paxos (variant of Mencius) – Provides virtually synchronous replication for MySQL 5.7+ – Supported on all MySQL platforms • Linux, Windows, Solaris, OSX, FreeBSD “Single/Multi-master update everywhere replication plugin for MySQL with built-in automatic distributed recovery, conflict detection and group membership.” 41 http://dasini.net/blog/2016/11/08/deployer-un-cluster-mysql-group-replication/
  • 35. • A Highly Available distributed MySQL database service – Clustering eliminates single points of failure (No SPOF) • Allows for online maintenance – Removes the need for handling server fail-over – Provides fault tolerance – Enables update everywhere setups – Automates group reconfiguration (handling of crashes, failures, re-connects) – Provides a highly available replicated database – Automatically ensures data consistency ie no data loss • Detects and handles conflicts • Prevents data loss • Prevents data corruption 42 MySQL Group Replication: What Does It Provide?
  • 36. MySQL Group Replication: Use Cases • Elastic Replication – Environments that require a very fluid replication infrastructure, where the number of servers has to grow or shrink dynamically and with little pain as possible. • Highly Available Shards – Sharding is a popular approach to achieve write scale-out. Users can use MySQL Group Replication to implement highly available shards in a federated system. Each shard can map into a Replication Group. • Alternative to Master-Slave Replication – Single-primary mode provides further automation on such setups â—Ź Automatic PRIMARY/SECONDARY roles assignment â—Ź Automatic new PRIMARY election on PRIMARY failures â—Ź Automatic setup of read/write modes on PRIMARY and SECONDARIES â—Ź Global consistent view of which server is the PRIMARY 43
  • 37. MySQL Group Replication: What Sets It Apart? • Built by the MySQL Engineering Team – Natively integrated into Server: InnoDB, Replication, GTIDs, Performance Schema, SYS – Built-in, no need for separate downloads – Available on all platforms [Linux, Windows, Solaris, FreeBSD, etc] • Better performance than similar offerings – MySQL GCS has optimized network protocol that reduces the impact on latency • Easier monitoring – Simple Performance Schema tables for group and node status/stats – Native support for Group Replication in MySQL Enterprise Monitor • Modern full stack MySQL HA being built around it 44
  • 38. MySQL Group Replication: Architecture Node Types R: Traffic routers/proxies: mysqlrouter, ProxySQL, HAProxy... M: mysqld nodes participating in Group Replication 45
  • 39. MySQL Group Replication: Performance 46
  • 40. MySQL Group Replication: Performance Comparison 47
  • 41. Full stack secure connections • Following the industry standards, Group Replication supports secure connections along the complete stack – Client connections – Distributed recovery connections – Connections between members • IP Whitelisting – Restrict which hosts are allowed to connect to the group – By default it is set to the values AUTOMATIC, which allow connections from private subnetworks active on the host 48 http://mysqlhighavailability.com/mysql-group-replication-securing-the-perimeter/
  • 42. Prioritize member for the Primary Member Election • group_replication_member_weight – allows users to influence primary member election – takes integer value between 0 and 100 – default value = 50 • The first primary member is still the member which bootstrapped the group irrespective of group_replication_member_weight value. 49 http://mysqlhighavailability.com/group-replication-prioritise-member-for-the-primary-member-election/ node1> SET GLOBAL group_replication_member_weight= 90; node2> SET GLOBAL group_replication_member_weight= 70; node1> SET GLOBAL group_replication_member_weight= 90; node2> SET GLOBAL group_replication_member_weight= 70;
  • 43. Parallel applier support • Group Replication now also takes full advantage of parallel binary log applier infrastructure – Reduces applier lad and improves replication performance considerably – Configured in the sale way as asynchronous replication 50 slave_parallel_workers=<NUMBER> slave_parallel_type=logical_clock slave_preserve_commit_order=ON slave_parallel_workers=<NUMBER> slave_parallel_type=logical_clock slave_preserve_commit_order=ON
  • 44. Single Primary Mode • Configuration mode that makes a single member act as a writeable master (PRIMARY) and the rest of the members act as hot-standbys (SECONDARIES) – The group itself coordinates automatically to figure out which is the member that will act as the PRIMARY, through an automatic primary election mechanism – Secondaries are automatically set to read-only • Single_primary mode is the default mode – Closer to classic asynchronous replication setups, simpler to reason about the beginning – Avoids some limitations of multi-primary mode by default • The current PRIMARY member UUID can be know by executing the following SQL statement: 51 mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME='group_replication_primary_member'G *************************** 1. row *************************** VARIABLE_NAME: group_replication_primary_member VARIABLE_VALUE: dcd3b36b-79c5-11e6-97b8-00212844d44e mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME='group_replication_primary_member'G *************************** 1. row *************************** VARIABLE_NAME: group_replication_primary_member VARIABLE_VALUE: dcd3b36b-79c5-11e6-97b8-00212844d44e
  • 45. Multi-primary Mode • Configuration mode that makes all members writeable – Enabled by setting option --group_replication_single_primary_mode to OFF • Any two transactions on different servers can write to the same tuple • Conflicts will be detected and dealt with – First committer wins rule 52
  • 46. • Execute locally – Group Replication starts replicating a transaction when it is ready to commit, just before being written to the binary log • Send in-order to all members – At that point, transactions are broadcast to the network using a group communication protocol (Paxos, similar to the Mencius variant) • Certify independently – All members receive the transactions in order and execute a deterministic certification algorithms to check if the received transaction can be applied safely • Apply asynchronously – On remote members successfully certified transactions are written to the relay log and asynchronously applied by the members, just as happens for other replication methods. – On local member, the prepared transactions is committed to the storage engine. 53 MySQL Group Replication Transaction life cycle
  • 48. MySQL Group Replication Synchronous Transaction Delivery 55
  • 49. MySQL Group Replication Full Transaction life cycle 56
  • 50. MySQL Group Replication Traditional vs Optimistic locking 57 Traditional locking Optimistic locking Trx 2 waits on Trx 1 commit ERROR 1180 (HY000): Got error 149 during COMMIT
  • 51. • Optimize the system as a whole – Sometimes it is beneficial to delay some parts of a distributed system it to improve the throughput of the system as a whole – In MySQL Group Replication, it is used to â—Ź keep writers operating below the sustained capacity of the system; â—Ź reduce buffering stress on the replication pipeline; â—Ź protect the correct execution of the system. • Designed as a safety measure – Throttling will never be active while the system is operating below its sustained capacity. • To better support unbalanced systems and unfriedly workloads – Keep members closer for faster failover – Keep members closer for reduced replication lag – Reduce the number of transactions aborts in multi-master • Make sure new members can always join write-intensive groups – Nodes entering the group need to catch up previous work while also storing current work to apply later – In case excess capacity is not available, the cluster will need to be put at lower throughput for new members to catch up 60 Flow Control
  • 52. • MySQL 5.7 - Basic configuration options – group-replicaton-fow-control-mode = QUOTA | DISABLED – group-replicaton-fow-control-certfer-threshold = 0..n – group-replicaton-fow-control-applier-threshold = 0..n • Certifier/applier thresholds – The thresholds are the point at which the flow-control system will delay the writes at the master – The default is set to 25000 and should be kept larger then one second of sustained commit rate – But some members will be up to 25000 transactions delayed, if, and only if, they are unable to keep up with the writer members • MySQL 8.0.3 introduce additional options to fine-tune the heuristics – group_replicaton_fow_control_min_quota = X commits/s – group_replicaton_fow_control_min_recovery_quota = X commits/s – group_replicaton_fow_control_max_commit_quota = X commits/s – group_replicaton_fow_control_member_quota_percent = Y % – group_replicaton_fow_control_period = Z seconds – group_replicaton_fow_control_hold_percent = Y % – group_replicaton_fow_control_release_percent = Y % 61 Flow Control options
  • 53. MySQL Group Replication: Requirement •InnoDB Storage Engine – Data must be stored in the InnoDB transactional storage engine. •Primary Keys – Every table that is to be replicated by the group must have an explicit primary key defined. •IPv4 Network – The group communication engine used by MySQL Group Replication only supports IPv4. •Network Performance – Group Replication is designed to be deployed in a cluster environment where server instances are very close to each other, and is impacted by both network latency as well as network bandwidth. 62
  • 54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Storage Engine InnoDB Distributed Architecture Shared nothing Network failure protection Quorum NoSQL APIs MySQL Document Store / InnoDB Memcached Replication mode Virtually Synchronous Database Failover Automatic OS Supported Linux, Windows, Solaris, OSX, FreeBSD Operational Complexity Medium Administration Standard (MySQL) MySQL Group Replication overview
  • 55. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 65 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate Router 2.1
  • 56. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Router 2.1 • MySQL Router is lightweight middleware that provides transparent routing between your application and back-end MySQL Servers. • MySQL Router also provides High Availability and Scalability by effectively routing database traffic to appropriate back-end MySQL Servers. • The pluggable architecture also enables developers to extend MySQL Router for custom use cases. 66
  • 57. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Router 2.1 • Native support for MySQL InnoDB clusters – Understands Group Replication topology – Utilizes metadata schema stored on each member • Bootstraps itself and sets up client routing for the GR cluster • Allows for intelligent client routing into the GR cluster • Supports multi-master and single primary modes • Core improvements – Logging – Monitoring – Performance – Security 67
  • 58. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 68 Shell App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate
  • 59. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Shell 69 A single unified client for all administrative and operations tasks • Advanced command-line client and code editor for the MySQL Server – Supports development & administration for the MySQL Server – Can be used to perform data queries/update & administration operations • Interactive multi-language: JavaScript, Python, and SQL – Naturally scriptable (with development & administrative APIs) – Both interactive and batch operations • Supports both Document (CRUD) and Relational models (SQL) – Modern fluent API for the MySQL Document Store – Supports the traditional Table results, as well as JSON or Tab separated output • Exposes full Development and Admin API
  • 60. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL Shell: Admin API • Creation and Management of InnoDB Clusters – Hide the complexity of Configuration, Provisioning, Orchestration – mysql-js> dba.help() • The global variable 'dba' is used to access the MySQL AdminAPI • Perform DBA operations – Manage MySQL InnoDB clusters • Create clusters • Get cluster info • Start/Stop MySQL Instances • Validate MySQL instances • … Database Administration Interface App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate 70
  • 61. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | InnoDB Cluster 71 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate
  • 62. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 1 2 3 4 High Availability MySQL InnoDB Cluster Architectures and Best Practices Demo : Deploying MySQL InnoDB Cluster 72
  • 64. Hardware and Infrastructure Notes • 3, 5, or 7 machines per group – Isolate machine resources as much as possible – Limit virtualization layers – Machines configured for dedicated database server role • Recommended configuration – 32-64 vCPUs with fast CPU clock (2.5GHz+) – SSDs (for data and replication logs) – High quality network connection between each machine • Low latency, high throughput, reliable • Limit routers and hubs as much as possible • Isolated and dedicated network when possible 74
  • 65. Shared Nothing Cluster – Single Data Center 75 Application Servers MySQL Router in Stack MySQL Database Service Group Replication
  • 66. Shared Nothing Cluster Active / Passive – Cross Data Center 76 MySQL Database Service Group Replication Active Data Center Backup Data Center Clients
  • 67. Shared Nothing Cluster – Cross Data Center 77 MySQL Database Service Group Replication Data Center 1 Data Center 2 Clients
  • 68. Geographically Redundant Cluster 78 Async Replication Active Data Center Backup Data Center Clients
  • 69. Fail-soft mode 79 Async Replication Active Data Center Data Center 2 Clients
  • 70. Active/Active Multi-Data Center Setup 80 Async Replication Regional Data Center Regional Data Center Regional ClientsRegional Clients
  • 71. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Program Agenda 1 2 3 4 High Availability MySQL InnoDB Cluster Architectures and Best Practices Demo : Deploying MySQL InnoDB Cluster 81
  • 72. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | Demo : Deploying MySQL InnoDB Cluster in Single-Primary Mode 82
  • 73. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | MySQL InnoDB Cluster: Architecture
  • 74. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 1/6 http://dasini.net/blog/2017/03/13/tester-mysql-innodb-cluster/ 1/ Connect to MySQL Shell $ mysqlsh 2/ Deploy 3 local MySQL instances on ports : 3310 - 3320 - 3330 mysql-js> dba.deploySandboxInstance(3310) mysql-js> dba.deploySandboxInstance(3320) mysql-js> dba.deploySandboxInstance(3330) • Deploying local sandbox MySQL Instances Now we have 3 MySQL server instances running on ports 3310, 3320 and 3330.
  • 75. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 2/6 Stop mysql-js> dba.stopSandboxInstance(3310); Start mysql-js> dba.startSandboxInstance(3320); Kill : simulate an unexpected halt while testing failover mysql-js> dba.killSandboxInstance(3330); Delete : Completely removes the sandbox instance from your file system mysql-js> dba.deleteSandboxInstance(3330); • Managing local sandbox MySQL Instances Once a sandbox instance is running, it is possible to change its status at any time :
  • 76. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 3/6 Check instance configuration before the deployment mysql-js> dba.checkInstanceConfiguration('root@localhost:3310') mysql-js> dba.checkInstanceConfiguration('root@localhost:3320') mysql-js> dba.checkInstanceConfiguration('root@localhost:3330') • Checking the configuration Configuration issues could be fixed manually or with configureLocalInstance e.g. mysql-js> dba.configureLocalInstance('root@localhost:3310')
  • 77. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 4/6 1/ Connect to instance 3310 mysql-js> c root@localhost:3310 2/ Create the cluster mysql-js> var cluster=dba.createCluster('demoCluster'); 3/ Check the transaction set and add node 3320 to the cluster mysql-js> cluster.checkInstanceState('root@localhost:3320') mysql-js> cluster.addInstance('root@localhost:3320') 4/ Check the transaction set and add node 3330 to the cluster mysql-js> cluster.checkInstanceState('root@localhost:3330') mysql-js> cluster.addInstance('root@localhost:3330') 5/ Check cluster status mysql-js> cluster.status() • Deploying the InnoDB Cluster
  • 78. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
  • 79. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 5/6 # Bootstrap MySQL Router $ mysqlrouter --bootstrap root@localhost:3310 --directory /demoSandbox # Start MySQL router $ /demoSandbox/start.sh • Deploying the Router The following connection information can be used to connect to the cluster. Classic MySQL protocol connections to cluster 'demoCluster': - Read/Write Connections: localhost : 6446 - Read/Only Connections: localhost : 6447 X protocol connections to cluster 'demoCluster': - Read/Write Connections: localhost : 64460 - Read/Only Connections: localhost : 64470
  • 80. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Testing MySQL InnoDB Cluster in a sandbox – Demo 6/6 1/ Connect to MySQL Router (default port = 6446) $ mysqlsh --uri=root@localhost:64466446 2/ Select primary node’s port mysql-js> sql mysql-sql> SELECT @@port; -- display 3310 3/ Primary node crash! mysql-sql> js mysql-js> dba.killSandboxInstance(3310) • Failover 4/ Select primary node’s port mysql-js> c root@localhost:6446 mysql-sql> SELECT @@port; -- display 3320 5/ Member is back to the group mysql-sql> js mysql-js> dba.startSandboxInstance(3310) var cluster = dba.getCluster('demoCluster') mysql-js> cluster.rejoinInstance('root@localhost:3310') mysql-js> cluster.status()
  • 82. MySQL Enterprise Monitor 4.0 • Native holistic support for Group Replication clusters – Intelligent monitoring and alerting – Topology views – Detailed metrics and graphs – Best Practice advice • Monitoring of MySQL Group Replication 104
  • 83. MySQL Enterprise Monitor 105 • Group Replication with 3 online nodes • Group Replication with 3 nodes : – 2 online – 1 unreachable
  • 84. MySQL Enterprise Monitor 106 • Asynchronous replication between – Group Replication cluster : master – Standalone instances : slaves
  • 85. MySQL Enterprise Monitor 107 • Asynchronous replication between – Group Replication cluster 1 : master – Group Replication cluster 2 : slave
  • 86. Monitoring: replication_group_member_stats • Useful to understand : – how the applier queue is growing – how many conflicts have been found – how many transactions were checked – which transactions are committed everywhere â—Ź Important for monitoring the performance of the members connected in the group node1> SELECT * FROM performance_schema.replication_group_member_statsG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 14845735801161197:3 MEMBER_ID: 00014001-1111-1111-1111-111111111111 COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 0 COUNT_CONFLICTS_DETECTED: 0 COUNT_TRANSACTIONS_ROWS_VALIDATING: 0 TRANSACTIONS_COMMITTED_ALL_MEMBERS: 4e0f05b7-d9d0-11e6-87cf-002710cccc64:1-2 LAST_CONFLICT_FREE_TRANSACTION: 108
  • 87. Monitoring: replication_group_members 1/2 • Used for monitoring the status of the different server instances that are tracked in the current view node1> SELECT * FROM performance_schema.replication_group_membersG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: 00014001-1111-1111-1111-111111111111 MEMBER_HOST: localhost MEMBER_PORT: 14001 MEMBER_STATE: ONLINE *************************** 2. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: 00014002-2222-2222-2222-222222222222 MEMBER_HOST: localhost MEMBER_PORT: 14002 MEMBER_STATE: ONLINE *************************** 2. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: 00014003-3333-3333-3333-333333333333 MEMBER_HOST: localhost MEMBER_PORT: 14003 MEMBER_STATE: ONLINE 109
  • 88. Monitoring: replication_group_members 2/2 • replication_group_members table is updated whenever there is a view change • There are various states that a server instance can be in • If servers are communicating properly, all report the same states for all servers • If there is a network partition, or a server leaves the group, then different information may be reported, depending on which server is queried 110 Field Description Group Synchronized ONLINE The member is ready to serve as a fully functional group member, meaning that the client can connect and start executing transactions Yes RECOVERING The member is in the process of becoming an active member of the group and is currently going through the recovery process, receiving state information from a donor No OFFLINE The plugin is loaded but the member does not belong to any group No ERROR The state of the local node. Whenever there is an error on the recovery phase or while applying changes, the server enters this state No UNREACHABLE Whenever the local failure detector suspects that a given server is not reachable, because maybe it has crashed or was disconnected involuntarily, it shows that server's state as 'unreachable' No
  • 89. Monitoring: replication_connection_status • Show information regarding Group Replication : – transactions that have been received from the group and queued in the applier queue (the relay log) – Recovery node1> SELECT * FROM performance_schema.replication_connection_statusG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier GROUP_NAME: 4e0f05b7-d9d0-11e6-87cf-002710cccc64 SOURCE_UUID: 4e0f05b7-d9d0-11e6-87cf-002710cccc64 THREAD_ID: NULL SERVICE_STATE: ON COUNT_RECEIVED_HEARTBEATS: 0 LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00 RECEIVED_TRANSACTION_SET: 4e0f05b7-d9d0-11e6-87cf-002710cccc64:1-2 LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 111
  • 90. Monitoring: replication_applier_status • The state of the Group Replication related channels and thread • If there are many different worker threads applying transactions then the worker tables can also be used to monitor what each worker thread is doing node1> SELECT * FROM performance_schema.replication_applier_statusG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier SERVICE_STATE: ON REMAINING_DELAY: NULL COUNT_TRANSACTIONS_RETRIES: 0 112
  • 91. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Links • Tutoriel – Configurer ProxySQL 1.4 pour MySQL 5.7 Group Replication – http://dasini.net/blog/2018/01/09/configurer-proxysql-1-4-pour-mysql-5-7-group-replication/ • Tutoriel – DĂ©ployer MySQL InnoDB Cluster – http://dasini.net/blog/2017/05/11/tutoriel-deployer-mysql-innodb-cluster/ • MySQL InnoDB Cluster Documentation – https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-userguide.html • Tester MySQL InnoDB Cluster – http://dasini.net/blog/2017/03/13/tester-mysql-innodb-cluster/ • Adopte un… cluster MySQL Group Replication – http://dasini.net/blog/2017/04/10/adopte-un-cluster-mysql-group-replication/ • MySQL Group Replication Documentation – https://dev.mysql.com/doc/refman/5.7/en/group-replication.html • DĂ©ployer un cluster MySQL Group Replication – http://dasini.net/blog/2016/11/08/deployer-un-cluster-mysql-group-replication/ 115
  • 92. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Thank you!