SlideShare a Scribd company logo
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Creating MySQLGroup Replicaiton
with Router
Ivan Ma
馬楚成
2016-June
February Copyright 2015, Oracle
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 © 2015, Oracle and/or its affiliates. All rights reserved. |
Our Goal
3
Experiencing
MySQL Group Replicaiton &
MySQL Router
Experiencing
MySQL Group Replicaiton &
MySQL Router
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
4
What is Group Replication?
Group Replication Use Cases
Setting up Group Replication
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL
Replication
Group
Replication*
Shared Disk/
Virtualization Solutions
MySQL Cluster
MySQL High Availability Solutions
99 99 .. 99 99 99 %%
5
*In Labs*In Labs
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Replication Concept
• Group Replication Strategy
• Synchronized Replication
• Topology of Group Replication
- Master-Master(s)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication (InnoDB Engine)
Group Replication
“Multi-master update anywhere replication plugin for MySQL with built-in
automaticconflict detection,distributedrecovery and group membership.”
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Group MySQL Replication - Active/Active Update
Anywhere
8
M M M M M
Com. API
Replication
Plugin
API
MySQL
Server
Group Comm.
System (Corosync)
Group Communication
System
Clients
ReplicationGroup
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
9
What is Group Replication?
Group Replication Use Cases
Setting up Group Replication
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The good thing about MySQL Group Replication
Group Replication Plugin
–Auto- Switch over
–Providing highly available database services
–Flexibility – to add or remove MySQL Nodes
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The good things about MySQL Group Replication
Group Replication Plugin
–Simple Installation
–HA: If there are many server nodes ins offline status, still working
–Group Replication – All nodes provides full set of data by Replication
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Requirements (by Design)
• Only Support InnoDB engine
• Requires Primary Key(for rowid indentification)
• Global Transaction Identifiers (GTIDs)
• Optimistic execution: transactions may abort on COMMIT due to conflicts
with concurrent transactions on other members
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• All group members share the same UUID, the group name.
13
M M M M M
INSERT y;
Will have GTID: group_name:2
INSERT x;
Will have GTID: group_name:1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• Users can specify the identifier for the transaction.
14
M M M M M
INSERT y;
Will have GTID: group_name:1
SET GTID_NEXT= “UUID:50”
INSERT x;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Full GTID support!
• You can even replicate from a outside server to a group, global identifiers
will be preserved.
15
M M M M M
Conflictswill be detected!
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Auto-increment configuration/handling
• Group is configured not to generate the same auto-increment value on all
members.
16
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
[1]: http://mysqlhighavailability.com/mysql-group-replication-auto-increment-configuration-handling/
Auto-increment configuration/handling
• By default, the offset is provided by server_id and increment is 7 [1].
17
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
server_id: 1
server_id: 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Auto-increment configuration/handling
• Users can change the increment size to their needs using
GROUP_REPLICATION_AUTO_INCREMENT_INCREMENT option.
18
M M M M M
INSERT y;
y: 4
INSERT z;
z: 11
INSERT x;
x: 1
server_id: 1
server_id: 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
19
What is Group Replication?
Group Replication Use Cases
Setting Up Group Replication
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Basics of Installing MySQL Group Replication for MySQL
• MySQL 5.7.10
• MySQL Group Replication Plugin – Lab 0.7
– MySQL Labs :: MySQL Group Replication for MySQL Server 5.7.10
– http://labs.mysql.com/
– group_replication.so / group_replication.dll
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Uses MySQL InnoDB Semantics
• Load the plugin and start replicating.
21
mysql> SET GLOBAL group_replication_group_name=
mysql> START
mysql> show variables like 'group_re%';
+
| Variable_name | Value |
+
| group_replication_allow_local_disjoint_gtids_join | OFF |
| group_replication_allow_local_lower_version_join | OFF |
| group_replication_auto_increment_increment | 7 |
| group_replication_bootstrap_group | OFF |
| group_replication_components_stop_timeout | 31536000 |
| group_replication_compression_threshold | 0 |
| group_replication_force_peer_addresses | |
| group_replication_group_name | 8a94f357
| group_replication_local_address | primary:4306 |
| group_replication_peer_addresses | primary:4306,primary:4316 |
| group_replication_poll_spin_loops | 0 |
| group_replication_recovery_complete_at | TRANSACTIONS_APPLIED |
| group_replication_recovery_reconnect_interval | 120 |
| group_replication_recovery_retry_count | 2 |
...
| group_replication_start_on_boot | ON |
+
24 rows in set (0.00 sec)
mysql> SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";
mysql> START GROUP_REPLICATION;
mysql> show variables like 'group_re%';
+---------------------------------------------------+--------------------------------------+
| Variable_name | Value |
+---------------------------------------------------+--------------------------------------+
| group_replication_allow_local_disjoint_gtids_join | OFF |
| group_replication_allow_local_lower_version_join | OFF |
| group_replication_auto_increment_increment | 7 |
| group_replication_bootstrap_group | OFF |
| group_replication_components_stop_timeout | 31536000 |
| group_replication_compression_threshold | 0 |
| group_replication_force_peer_addresses | |
| group_replication_group_name | 8a94f357-aab4-11df-86ab-c80aa9429562 |
| group_replication_local_address | primary:4306 |
| group_replication_peer_addresses | primary:4306,primary:4316 |
| group_replication_poll_spin_loops | 0 |
| group_replication_recovery_complete_at | TRANSACTIONS_APPLIED |
| group_replication_recovery_reconnect_interval | 120 |
| group_replication_recovery_retry_count | 2 |
...
| group_replication_start_on_boot | ON |
+---------------------------------------------------+--------------------------------------+
24 rows in set (0.00 sec)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Set Most Group Replication Variables in my.cnf
or (Startup parameters)
• The local node address (host, channel)
– /etc/hosts [ 127.0.0.1 primary ]
– Instances: primary:3306, primary:3316
• The group nodes peer addresses (a group of host and channels)
– group_replication_peer_addresses=primary:4306,primary:4316
– group_replication_local_address=primary:4306(for 3306)
– group_replication_local_address=primary:4316(for 3316)
– group_replication_recovery_user=rpl_user
– group_replication_recovery_password=rpl_pass
• Plugin location and loading plugin
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Sample : 3306
• [mysqld]
• datadir=/home/mysql/data
• basedir=/usr
• port=3306
• socket=/home/mysql/data/my.sock
• log-bin
• binlog-format=row
• binlog-checksum=NONE
• server-id=101
• gtid-mode=on
• enforce-gtid-consistency=true
• log-slave-updates=true
• master-info-repository=TABLE
• relay-log-info-repository=TABLE
23
• # Extraction Algorithm
• transaction-write-set-extraction=MURMUR32
• plugin-load=group_replication.so
• group_replication_group_name=8a94f357-aab4-11df-86ab-c80aa9429562
• group_replication_recovery_retry_count=2
• group_replication_recovery_reconnect_interval=120
• group_replication_local_address=primary:4306
• group_replication_peer_addresses=primary:4306,primary:4316
• group_replication_bootstrap_group=1
• group_replication_start_on_boot=0
• group_replication_recovery_user=rpl_user
• group_replication_recovery_password=rpl_pass
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Set Up Group Replication
00-createdb.sh Create the 2 databases
01-startdb.sh StartUp 2 database instances (3306 and 3316) with
standard configuration (no plugin installed)
02-mysqlupgrade.sh Not Necessary!!!
JUST IN CASE, the database does not have the latest
version from the PLUGIN.
03-createRpl.sh Create replication user on the 2 database instances
e.g. rpl_user / rpl_pass
04-restart-with-gcs.sh Restartthe 2 database instances with GROUP
REPLICATION configuration
05-setgrp.sh Set up the GROUP REPLICATION for the 2 instances
and
START GROUP_REPLICATION;
xx-chkgcs.sh <port> Check the status of the GROUP REPLICATION
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
00-createdb.sh
• CreateDatabase using “mysqld --initializate”
– --initialize-insecure : To initialize the database with “root” and empty password
– Initialize 2 databases
• /home/mysql/data
• /home/mysql/data2
25
rm -rf /home/mysql/data
rm -rf /home/mysql/data2
mysqld --initialize-insecure --user=mysql --
explicit_defaults_for_timestamp --basedir=/usr/local/mysql --
datadir=/home/mysql/data
mysqld --initialize-insecure --user=mysql --
explicit_defaults_for_timestamp --basedir=/usr/local/mysql --
datadir=/home/mysql/data2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• [mysqld]
• datadir=/home/mysql/data
• basedir=/usr
• port=3306
• socket=/home/mysql/data/my.sock
• log-bin
• binlog-format=row
• binlog-checksum=NONE
• server-id=101
• gtid-mode=on
• enforce-gtid-consistency=true
• log-slave-updates=true
• master-info-repository=TABLE
• relay-log-info-repository=TABLE
• transaction-write-set-extraction=MURMUR32
• [mysqld]
• datadir=/home/mysql/data2
• basedir=/usr
• port=3316
• socket=/home/mysql/data2/my.sock
• log-bin
• binlog-format=row
• binlog-checksum=NONE
• server-id=102
• gtid-mode=on
• enforce-gtid-consistency=true
• log-slave-updates=true
• master-info-repository=TABLE
• relay-log-info-repository=TABLE
• transaction-write-set-extraction=MURMUR32
26
01-startdb.sh
mysqld --defaults-file=config/my.cnf >
/home/mysql/data/my.log 2>&1 &
mysqld --defaults-file=config/my2.cnf >
/home/mysql/data2/my.log 2>&1 &
my.cnf my.2cnf
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
03-createRpl.sh
• Creating the Replication Recovery User : rpl_user / rpl_pass
• Granting the “replication slave”
27
mysql -uroot -h127.0.0.1 -P3306 -e "grant replication slave on *.* to rpl_user@'%' identified by 'rpl_pass';“
mysql -uroot -h127.0.0.1 -P3316 -e "grant replication slave on *.* to rpl_user@'%' identified by 'rpl_pass';”
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Port = 3306
• group_replication_start_on_boot=0
• grouop_replication_bootstrap_group=1
• Port = 3316
• group_replication_start_on_boot=0
• grouop_replication_bootstrap_group=0
28
04-restart-with-gcs.sh
mysqladmin -uroot -h127.0.0.1 -P3306 shutdown
mysqladmin -uroot -h127.0.0.1 -P3316 shutdown
sleep 5
mysqld --defaults-file=config/myG1.cnf --plugin-load=group_replication.so --group_replication_bootstrap_group=1 --group-
replication_start_on_boot=0 
> /home/mysql/data/my.log 2>&1 &
mysqld --defaults-file=config/myG2.cnf --plugin-load=group_replication.so --group_replication_bootstrap_group=0 --group-
replication_start_on_boot=0 
> /home/mysql/data2/my.log 2>&1 &
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 29
MySQL Group Replication Settings
• #myG1.cnf (in addition to my.cnf) - 3306
• plugin-load=group_replication.so
• group_replication_group_name=8a94f357-aab4-11df-86ab-
c80aa9429562
• group_replication_recovery_retry_count=2
• group_replication_recovery_reconnect_interval=120
• group_replication_local_address=primary:4306
• group_replication_peer_addresses=primary:4306,primary:4316
• group_replication_bootstrap_group=1
• group_replication_start_on_boot=0
• #myG2.cnf (In addition to my2.cnf) - 3316
• plugin-load=group_replication.so
• group_replication_group_name=8a94f357-aab4-11df-86ab-
c80aa9429562
• group_replication_recovery_retry_count=2
• group_replication_recovery_reconnect_interval=120
• group_replication_local_address=primary:4316
• group_replication_peer_addresses=primary:4306,primary:4316
• group_replication_bootstrap_group=0
• group_replication_start_on_boot=0
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
05-setgrp.sh
Starting Up Group Replication (bootstrap)
• Setup the Recovery User for channel ‘group_replication_recovery’
• Start the bootstrap FIRST (3306) with setting group_replication_bootstrap_group=1
•
30
mysql -uroot -h127.0.0.1 -P3306 << EOL1
reset master;
reset slave;
SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";
SET GLOBAL group_replication_recovery_retry_count= 2;
SET GLOBAL group_replication_recovery_reconnect_interval=120;
SET GLOBAL group_replication_local_address="primary:4306";
SET GLOBAL group_replication_peer_addresses="primary:4306,primary:4316";
START GROUP_REPLICATION;
show warnings;
EOL1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
05-setgrp.sh
Starting Up Group Replication (other than bootstrap)
• Setup the Recovery User for channel ‘group_replication_recovery’
• Start other instances with setting group_replication_bootstrap_group=0
•
31
mysql -uroot -h127.0.0.1 -P3316 << EOL2
reset master;
reset slave;
SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";
SET GLOBAL group_replication_recovery_retry_count= 2;
SET GLOBAL group_replication_recovery_reconnect_interval=120;
SET GLOBAL group_replication_local_address="primary:4316";
SET GLOBAL group_replication_peer_addresses="primary:4306,primary:4316";
START GROUP_REPLICATION;
show warnings;
EOL2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
xx-chkgcs.sh <port>
32
mysql -uroot -h127.0.0.1 -P$1 << EOL2
SELECT * FROM performance_schema.replication_connection_statusG
SELECT * FROM performance_schema.replication_group_members;
SELECT * FROM performance_schema.replication_group_member_statsG
EOL2
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429562
…
SERVICE_STATE: ON
…
RECEIVED_TRANSACTION_SET: 8a94f357-aab4-11df-86ab-c80aa9429562:1-8
…
*************************** 2. row ***************************
CHANNEL_NAME: group_replication_recovery
GROUP_NAME:
…
SERVICE_STATE: OFF
…
CHANNEL_NAME MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE
group_replication_applier 1ada3020-1d99-11e6-b299-080027558cda virtual-102.localhost 3306 ONLINE
group_replication_applier 1de2e5fb-1d99-11e6-b51a-080027558cda virtual-102.localhost 3316 ONLINE
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
VIEW_ID: 14639729171658053:8
MEMBER_ID: 1ada3020-1d99-11e6-b299-
080027558cda
COUNT_TRANSACTIONS_IN_QUEUE: 0
COUNT_TRANSACTIONS_CHECKED: 0
COUNT_CONFLICTS_DETECTED: 0
COUNT_TRANSACTIONS_VALIDATING: 0
TRANSACTIONS_COMMITTED_ALL_MEMBERS: 8a94f357-aab4-11df-86ab-
c80aa9429562:1-8
LAST_CONFLICT_FREE_TRANSACTION: 8a94f357-aab4-11df-86ab-
c80aa9429562:8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Limitations
• Concurrent DDL is unsupported
• CTAS (Create Table As SELECT) is unsupported
– GTID Consistency (Not because of the GROUP REPLICATION)
33
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
34
What is Group Replication?
Group Replication Use Cases
Setting Up Group Replication
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Conflict Resolution
•There is global total order for transactions
•All servers apply the same set of changes in the same
order, therefore they remain consistent within the group
–First committer wins
35
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master: Update Anywhere
• Any two transactions on differentserverscan write to the same row
• Conflictswill automatically be detected and handled
36
M M M M M
BEGIN;
UPDATE t1 SET c1=2
WHERE C1 =0;
TRX2,node 4:
M M M M M
BEGIN;
UPDATE t1 SET c1=1
WHERE C1=0;
TRX1,node 1:
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master: Update Anywhere
• TRX1commits
• TRX2rollbacks
37
M M M M M
COMMIT;
but Rollback
TRX2,node 4:
M M M M M
COMMIT;
TRX1,node 1:
OK
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Master: Update Anywhere
• TRX1commits
• TRX2rollbacks
38
M M M M M
BEGIN;
UPDATE t1 SET c1=2
WHERE C1 =0;
TRX2,node 4:
M M M M M
BEGIN;
UPDATE t1 SET c1=1
WHERE C1=0;
TRX1,node 1:
OK
M M M M M
Consistency!
SELECT * FROM T1;
c1 =1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Group Replication Agenda
39
What is Group Replication?
Group Replication Use Cases
Setting Up Group Replication
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Recovery in Group Replication
•Recovery is run when a new node is added
•Recovery is run when a node that had previously been
added but has been offline comes back online
40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic Distributed Server Recovery
• Node that joins the group automatically synchronizes with other
nodes
41
M M M M M N
Setto join group
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic Distributed Server Recovery
• Node that joins the group automatically synchronizes with other
nodes
42
M M M M M N
ONLINE
RECOVERING
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Automatic Distributed Server Recovery
• Node that joins the group automatically synchronized with other
nodes
43
M M M M M M
ONLINE
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
How To Check If Node is Recovering
44
mysql>
+
| CHANNEL_NAME
MEMBER_STATE |
+
| group_replication_applier | 87951d24
ONLINE
| group_replication_applier | 8cab8898
RECOVERING
mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+--------------------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT |
MEMBER_STATE |
+---------------------------+--------------------------------------+--------------------------+-------------+--------------+
| group_replication_applier | 87951d24-9e08-11e5-9029-9e92014f86b5 | Kathys-MacBook-Pro.local | 3307 |
ONLINE |
| group_replication_applier | 8cab8898-9e08-11e5-9888-001772f67b84 | Kathys-MacBook-Pro.local | 3308 |
RECOVERING |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Group Replication Agenda
45
What is Group Replication?
Group Replication Use Cases
Installing 5.7 and Group Replication Plugin
Conflict Resolution
Recovery
DBA Tools
2
3
4
5
1
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
How To Check If Node is Online
46
mysql> START
SELECT * FROM performance_schema.replication_group_members;
+
| CHANNEL_NAME
MEMBER_STATE |
+
| group_replication_applier | 0a40c9e8
ONLINE
| group_replication_applier | 14b680b6
ONLINE
| group_replication_applier | 191e28ca
ONLINE
+
3 rows in set (0.00 sec)
mysql> START GROUP_REPLICATION;
SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+--------------------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT |
MEMBER_STATE |
+---------------------------+--------------------------------------+--------------------------+-------------+--------------+
| group_replication_applier | 0a40c9e8-9dce-11e5-b91f-a5ae79553d33 | Kathys-MacBook-Pro.local | 3308 |
ONLINE |
| group_replication_applier | 14b680b6-9dce-11e5-ab41-f8fc0628b71d | Kathys-MacBook-Pro.local | 3309 |
ONLINE |
| group_replication_applier | 191e28ca-9dce-11e5-ac10-fe18781605d5 | Kathys-MacBook-Pro.local | 3310 |
ONLINE |
+---------------------------+--------------------------------------+--------------------------+-------------+--------------+
3 rows in set (0.00 sec)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Check Settings of Group Replication
47
mysql SELECT * FROM performance_schema.replication_group_member_statsG
*************************** 1. row ***************************
1 row in set (0.00 sec)
mysql> SELECT * FROM performance_schema.replication_group_member_statsG
*************************** 1. row ***************************
CHANNEL_NAME: group_replication_applier
VIEW_ID: 235307401:3
MEMBER_ID: a236a0ec-9e9b-11e5-8be3-8b41a7829667
COUNT_TRANSACTIONS_IN_QUEUE: 0
COUNT_TRANSACTIONS_CHECKED: 12
COUNT_CONFLICTS_DETECTED: 5
COUNT_TRANSACTIONS_VALIDATING: 6
TRANSACTIONS_COMMITTED_ALL_MEMBERS:
LAST_CONFLICT_FREE_TRANSACTION: 8a94f357-aab4-11df-86ab-c80aa9429562:3
1 row in set (0.00 sec)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Disaster Recovery
Backup and Restore
High Availability
MySQL Enterprise Edition – Business
Durability
48
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
And More
Security
Monitoring
Backup
24x7 Support
MySQL Enterprise
Engineering
49
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Learn More
http://mysqlhighavailability.com/tag/mysql-group-replication/
• MySQL Group Replication Install Information
• News/Updates
• Blogs
http://labs.mysql.com
• Download and evaluate all MySQL Group Replication from
the labs
50
Hkosc group replication-lecture_lab07

More Related Content

What's hot

MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
Vitor Oliveira
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Sven Sandberg
 
MySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudMySQL Replication Performance in the Cloud
MySQL Replication Performance in the Cloud
Vitor Oliveira
 
Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
Mats Kindahl
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
Keith Hollman
 
Everything You Need to Know About MySQL Group Replication
Everything You Need to Know About MySQL Group ReplicationEverything You Need to Know About MySQL Group Replication
Everything You Need to Know About MySQL Group Replication
Nuno Carvalho
 
MySQL Enterprise Edition - Complete Guide (2019)
MySQL Enterprise Edition - Complete Guide (2019)MySQL Enterprise Edition - Complete Guide (2019)
MySQL Enterprise Edition - Complete Guide (2019)
Keith Hollman
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
Shivji Kumar Jha
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
Miguel Araújo
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
Miguel Araújo
 
Oracle Database In-Memory Meets Oracle RAC
Oracle Database In-Memory Meets Oracle RACOracle Database In-Memory Meets Oracle RAC
Oracle Database In-Memory Meets Oracle RAC
Markus Michalewicz
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
Oracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
Oracle RAC BP for Upgrade & More by Anil Nair and Markus MichalewiczOracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
Oracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
Markus Michalewicz
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
Mark Leith
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
 
Oracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven ScalabilityOracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven Scalability
Markus Michalewicz
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology Overview
Keith Hollman
 
Oracle Database Cloud Fleet Maintenance
Oracle Database Cloud Fleet MaintenanceOracle Database Cloud Fleet Maintenance
Oracle Database Cloud Fleet Maintenance
Hari Srinivasan
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
Kenny Gryp
 

What's hot (20)

MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
MySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudMySQL Replication Performance in the Cloud
MySQL Replication Performance in the Cloud
 
Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
 
Everything You Need to Know About MySQL Group Replication
Everything You Need to Know About MySQL Group ReplicationEverything You Need to Know About MySQL Group Replication
Everything You Need to Know About MySQL Group Replication
 
MySQL Enterprise Edition - Complete Guide (2019)
MySQL Enterprise Edition - Complete Guide (2019)MySQL Enterprise Edition - Complete Guide (2019)
MySQL Enterprise Edition - Complete Guide (2019)
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
 
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL ShellMySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
MySQL InnoDB Cluster: Management and Troubleshooting with MySQL Shell
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
MySQL InnoDB Cluster / ReplicaSet - Making Provisioning & Troubleshooting as ...
 
Oracle Database In-Memory Meets Oracle RAC
Oracle Database In-Memory Meets Oracle RACOracle Database In-Memory Meets Oracle RAC
Oracle Database In-Memory Meets Oracle RAC
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Oracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
Oracle RAC BP for Upgrade & More by Anil Nair and Markus MichalewiczOracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
Oracle RAC BP for Upgrade & More by Anil Nair and Markus Michalewicz
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
Oracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven ScalabilityOracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven Scalability
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology Overview
 
Oracle Database Cloud Fleet Maintenance
Oracle Database Cloud Fleet MaintenanceOracle Database Cloud Fleet Maintenance
Oracle Database Cloud Fleet Maintenance
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 

Similar to Hkosc group replication-lecture_lab07

MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
Matt Lord
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
 
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
Olivier DASINI
 
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
Ivan Ma
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
Frederic Descamps
 
MySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL Fabric
Mark Swarbrick
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
Mario Beck
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
Mark Swarbrick
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf
Haiping Li
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
Mark Leith
 
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
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
Ivan Ma
 
High-Availability using MySQL Fabric
High-Availability using MySQL FabricHigh-Availability using MySQL Fabric
High-Availability using MySQL Fabric
Mats Kindahl
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
Mark Leith
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
MySQL Brasil
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
MySQL Brasil
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
Ligaya Turmelle
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
Ståle Deraas
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
MySQL Brasil
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
GeneXus
 

Similar to Hkosc group replication-lecture_lab07 (20)

MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
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
 
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
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
 
MySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL Fabric
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf2_MySQL_Cluster_Introduction.pdf
2_MySQL_Cluster_Introduction.pdf
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
 
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...
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 
High-Availability using MySQL Fabric
High-Availability using MySQL FabricHigh-Availability using MySQL Fabric
High-Availability using MySQL Fabric
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 

More from Ivan Ma

Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
Ivan Ma
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
Ivan Ma
 
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
Ivan Ma
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
Ivan Ma
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
Ivan Ma
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
Ivan Ma
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
Ivan Ma
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
Ivan Ma
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
Ivan Ma
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
Ivan Ma
 

More from Ivan Ma (14)

Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
 
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
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 

Hkosc group replication-lecture_lab07

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Creating MySQLGroup Replicaiton with Router Ivan Ma 馬楚成 2016-June February Copyright 2015, Oracle
  • 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 © 2015, Oracle and/or its affiliates. All rights reserved. | Our Goal 3 Experiencing MySQL Group Replicaiton & MySQL Router Experiencing MySQL Group Replicaiton & MySQL Router
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda 4 What is Group Replication? Group Replication Use Cases Setting up Group Replication Conflict Resolution Recovery DBA Tools 2 3 4 5 1 5
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Replication Group Replication* Shared Disk/ Virtualization Solutions MySQL Cluster MySQL High Availability Solutions 99 99 .. 99 99 99 %% 5 *In Labs*In Labs
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication Concept • Group Replication Strategy • Synchronized Replication • Topology of Group Replication - Master-Master(s)
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication (InnoDB Engine) Group Replication “Multi-master update anywhere replication plugin for MySQL with built-in automaticconflict detection,distributedrecovery and group membership.” 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Group MySQL Replication - Active/Active Update Anywhere 8 M M M M M Com. API Replication Plugin API MySQL Server Group Comm. System (Corosync) Group Communication System Clients ReplicationGroup
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda 9 What is Group Replication? Group Replication Use Cases Setting up Group Replication Conflict Resolution Recovery DBA Tools 2 3 4 5 1 5
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The good thing about MySQL Group Replication Group Replication Plugin –Auto- Switch over –Providing highly available database services –Flexibility – to add or remove MySQL Nodes 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The good things about MySQL Group Replication Group Replication Plugin –Simple Installation –HA: If there are many server nodes ins offline status, still working –Group Replication – All nodes provides full set of data by Replication 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Requirements (by Design) • Only Support InnoDB engine • Requires Primary Key(for rowid indentification) • Global Transaction Identifiers (GTIDs) • Optimistic execution: transactions may abort on COMMIT due to conflicts with concurrent transactions on other members 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • All group members share the same UUID, the group name. 13 M M M M M INSERT y; Will have GTID: group_name:2 INSERT x; Will have GTID: group_name:1
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • Users can specify the identifier for the transaction. 14 M M M M M INSERT y; Will have GTID: group_name:1 SET GTID_NEXT= “UUID:50” INSERT x;
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Full GTID support! • You can even replicate from a outside server to a group, global identifiers will be preserved. 15 M M M M M Conflictswill be detected!
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Auto-increment configuration/handling • Group is configured not to generate the same auto-increment value on all members. 16 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | [1]: http://mysqlhighavailability.com/mysql-group-replication-auto-increment-configuration-handling/ Auto-increment configuration/handling • By default, the offset is provided by server_id and increment is 7 [1]. 17 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1 server_id: 1 server_id: 4
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Auto-increment configuration/handling • Users can change the increment size to their needs using GROUP_REPLICATION_AUTO_INCREMENT_INCREMENT option. 18 M M M M M INSERT y; y: 4 INSERT z; z: 11 INSERT x; x: 1 server_id: 1 server_id: 4
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda 19 What is Group Replication? Group Replication Use Cases Setting Up Group Replication Conflict Resolution Recovery DBA Tools 2 3 4 5 1 5
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Basics of Installing MySQL Group Replication for MySQL • MySQL 5.7.10 • MySQL Group Replication Plugin – Lab 0.7 – MySQL Labs :: MySQL Group Replication for MySQL Server 5.7.10 – http://labs.mysql.com/ – group_replication.so / group_replication.dll 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Uses MySQL InnoDB Semantics • Load the plugin and start replicating. 21 mysql> SET GLOBAL group_replication_group_name= mysql> START mysql> show variables like 'group_re%'; + | Variable_name | Value | + | group_replication_allow_local_disjoint_gtids_join | OFF | | group_replication_allow_local_lower_version_join | OFF | | group_replication_auto_increment_increment | 7 | | group_replication_bootstrap_group | OFF | | group_replication_components_stop_timeout | 31536000 | | group_replication_compression_threshold | 0 | | group_replication_force_peer_addresses | | | group_replication_group_name | 8a94f357 | group_replication_local_address | primary:4306 | | group_replication_peer_addresses | primary:4306,primary:4316 | | group_replication_poll_spin_loops | 0 | | group_replication_recovery_complete_at | TRANSACTIONS_APPLIED | | group_replication_recovery_reconnect_interval | 120 | | group_replication_recovery_retry_count | 2 | ... | group_replication_start_on_boot | ON | + 24 rows in set (0.00 sec) mysql> SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562"; mysql> START GROUP_REPLICATION; mysql> show variables like 'group_re%'; +---------------------------------------------------+--------------------------------------+ | Variable_name | Value | +---------------------------------------------------+--------------------------------------+ | group_replication_allow_local_disjoint_gtids_join | OFF | | group_replication_allow_local_lower_version_join | OFF | | group_replication_auto_increment_increment | 7 | | group_replication_bootstrap_group | OFF | | group_replication_components_stop_timeout | 31536000 | | group_replication_compression_threshold | 0 | | group_replication_force_peer_addresses | | | group_replication_group_name | 8a94f357-aab4-11df-86ab-c80aa9429562 | | group_replication_local_address | primary:4306 | | group_replication_peer_addresses | primary:4306,primary:4316 | | group_replication_poll_spin_loops | 0 | | group_replication_recovery_complete_at | TRANSACTIONS_APPLIED | | group_replication_recovery_reconnect_interval | 120 | | group_replication_recovery_retry_count | 2 | ... | group_replication_start_on_boot | ON | +---------------------------------------------------+--------------------------------------+ 24 rows in set (0.00 sec)
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Set Most Group Replication Variables in my.cnf or (Startup parameters) • The local node address (host, channel) – /etc/hosts [ 127.0.0.1 primary ] – Instances: primary:3306, primary:3316 • The group nodes peer addresses (a group of host and channels) – group_replication_peer_addresses=primary:4306,primary:4316 – group_replication_local_address=primary:4306(for 3306) – group_replication_local_address=primary:4316(for 3316) – group_replication_recovery_user=rpl_user – group_replication_recovery_password=rpl_pass • Plugin location and loading plugin 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Sample : 3306 • [mysqld] • datadir=/home/mysql/data • basedir=/usr • port=3306 • socket=/home/mysql/data/my.sock • log-bin • binlog-format=row • binlog-checksum=NONE • server-id=101 • gtid-mode=on • enforce-gtid-consistency=true • log-slave-updates=true • master-info-repository=TABLE • relay-log-info-repository=TABLE 23 • # Extraction Algorithm • transaction-write-set-extraction=MURMUR32 • plugin-load=group_replication.so • group_replication_group_name=8a94f357-aab4-11df-86ab-c80aa9429562 • group_replication_recovery_retry_count=2 • group_replication_recovery_reconnect_interval=120 • group_replication_local_address=primary:4306 • group_replication_peer_addresses=primary:4306,primary:4316 • group_replication_bootstrap_group=1 • group_replication_start_on_boot=0 • group_replication_recovery_user=rpl_user • group_replication_recovery_password=rpl_pass
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Set Up Group Replication 00-createdb.sh Create the 2 databases 01-startdb.sh StartUp 2 database instances (3306 and 3316) with standard configuration (no plugin installed) 02-mysqlupgrade.sh Not Necessary!!! JUST IN CASE, the database does not have the latest version from the PLUGIN. 03-createRpl.sh Create replication user on the 2 database instances e.g. rpl_user / rpl_pass 04-restart-with-gcs.sh Restartthe 2 database instances with GROUP REPLICATION configuration 05-setgrp.sh Set up the GROUP REPLICATION for the 2 instances and START GROUP_REPLICATION; xx-chkgcs.sh <port> Check the status of the GROUP REPLICATION 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 00-createdb.sh • CreateDatabase using “mysqld --initializate” – --initialize-insecure : To initialize the database with “root” and empty password – Initialize 2 databases • /home/mysql/data • /home/mysql/data2 25 rm -rf /home/mysql/data rm -rf /home/mysql/data2 mysqld --initialize-insecure --user=mysql -- explicit_defaults_for_timestamp --basedir=/usr/local/mysql -- datadir=/home/mysql/data mysqld --initialize-insecure --user=mysql -- explicit_defaults_for_timestamp --basedir=/usr/local/mysql -- datadir=/home/mysql/data2
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • [mysqld] • datadir=/home/mysql/data • basedir=/usr • port=3306 • socket=/home/mysql/data/my.sock • log-bin • binlog-format=row • binlog-checksum=NONE • server-id=101 • gtid-mode=on • enforce-gtid-consistency=true • log-slave-updates=true • master-info-repository=TABLE • relay-log-info-repository=TABLE • transaction-write-set-extraction=MURMUR32 • [mysqld] • datadir=/home/mysql/data2 • basedir=/usr • port=3316 • socket=/home/mysql/data2/my.sock • log-bin • binlog-format=row • binlog-checksum=NONE • server-id=102 • gtid-mode=on • enforce-gtid-consistency=true • log-slave-updates=true • master-info-repository=TABLE • relay-log-info-repository=TABLE • transaction-write-set-extraction=MURMUR32 26 01-startdb.sh mysqld --defaults-file=config/my.cnf > /home/mysql/data/my.log 2>&1 & mysqld --defaults-file=config/my2.cnf > /home/mysql/data2/my.log 2>&1 & my.cnf my.2cnf
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 03-createRpl.sh • Creating the Replication Recovery User : rpl_user / rpl_pass • Granting the “replication slave” 27 mysql -uroot -h127.0.0.1 -P3306 -e "grant replication slave on *.* to rpl_user@'%' identified by 'rpl_pass';“ mysql -uroot -h127.0.0.1 -P3316 -e "grant replication slave on *.* to rpl_user@'%' identified by 'rpl_pass';”
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Port = 3306 • group_replication_start_on_boot=0 • grouop_replication_bootstrap_group=1 • Port = 3316 • group_replication_start_on_boot=0 • grouop_replication_bootstrap_group=0 28 04-restart-with-gcs.sh mysqladmin -uroot -h127.0.0.1 -P3306 shutdown mysqladmin -uroot -h127.0.0.1 -P3316 shutdown sleep 5 mysqld --defaults-file=config/myG1.cnf --plugin-load=group_replication.so --group_replication_bootstrap_group=1 --group- replication_start_on_boot=0 > /home/mysql/data/my.log 2>&1 & mysqld --defaults-file=config/myG2.cnf --plugin-load=group_replication.so --group_replication_bootstrap_group=0 --group- replication_start_on_boot=0 > /home/mysql/data2/my.log 2>&1 &
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 29 MySQL Group Replication Settings • #myG1.cnf (in addition to my.cnf) - 3306 • plugin-load=group_replication.so • group_replication_group_name=8a94f357-aab4-11df-86ab- c80aa9429562 • group_replication_recovery_retry_count=2 • group_replication_recovery_reconnect_interval=120 • group_replication_local_address=primary:4306 • group_replication_peer_addresses=primary:4306,primary:4316 • group_replication_bootstrap_group=1 • group_replication_start_on_boot=0 • #myG2.cnf (In addition to my2.cnf) - 3316 • plugin-load=group_replication.so • group_replication_group_name=8a94f357-aab4-11df-86ab- c80aa9429562 • group_replication_recovery_retry_count=2 • group_replication_recovery_reconnect_interval=120 • group_replication_local_address=primary:4316 • group_replication_peer_addresses=primary:4306,primary:4316 • group_replication_bootstrap_group=0 • group_replication_start_on_boot=0
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 05-setgrp.sh Starting Up Group Replication (bootstrap) • Setup the Recovery User for channel ‘group_replication_recovery’ • Start the bootstrap FIRST (3306) with setting group_replication_bootstrap_group=1 • 30 mysql -uroot -h127.0.0.1 -P3306 << EOL1 reset master; reset slave; SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562"; SET GLOBAL group_replication_recovery_retry_count= 2; SET GLOBAL group_replication_recovery_reconnect_interval=120; SET GLOBAL group_replication_local_address="primary:4306"; SET GLOBAL group_replication_peer_addresses="primary:4306,primary:4316"; START GROUP_REPLICATION; show warnings; EOL1
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 05-setgrp.sh Starting Up Group Replication (other than bootstrap) • Setup the Recovery User for channel ‘group_replication_recovery’ • Start other instances with setting group_replication_bootstrap_group=0 • 31 mysql -uroot -h127.0.0.1 -P3316 << EOL2 reset master; reset slave; SET GLOBAL group_replication_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562"; SET GLOBAL group_replication_recovery_retry_count= 2; SET GLOBAL group_replication_recovery_reconnect_interval=120; SET GLOBAL group_replication_local_address="primary:4316"; SET GLOBAL group_replication_peer_addresses="primary:4306,primary:4316"; START GROUP_REPLICATION; show warnings; EOL2
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | xx-chkgcs.sh <port> 32 mysql -uroot -h127.0.0.1 -P$1 << EOL2 SELECT * FROM performance_schema.replication_connection_statusG SELECT * FROM performance_schema.replication_group_members; SELECT * FROM performance_schema.replication_group_member_statsG EOL2 *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier GROUP_NAME: 8a94f357-aab4-11df-86ab-c80aa9429562 … SERVICE_STATE: ON … RECEIVED_TRANSACTION_SET: 8a94f357-aab4-11df-86ab-c80aa9429562:1-8 … *************************** 2. row *************************** CHANNEL_NAME: group_replication_recovery GROUP_NAME: … SERVICE_STATE: OFF … CHANNEL_NAME MEMBER_ID MEMBER_HOST MEMBER_PORT MEMBER_STATE group_replication_applier 1ada3020-1d99-11e6-b299-080027558cda virtual-102.localhost 3306 ONLINE group_replication_applier 1de2e5fb-1d99-11e6-b51a-080027558cda virtual-102.localhost 3316 ONLINE *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 14639729171658053:8 MEMBER_ID: 1ada3020-1d99-11e6-b299- 080027558cda COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 0 COUNT_CONFLICTS_DETECTED: 0 COUNT_TRANSACTIONS_VALIDATING: 0 TRANSACTIONS_COMMITTED_ALL_MEMBERS: 8a94f357-aab4-11df-86ab- c80aa9429562:1-8 LAST_CONFLICT_FREE_TRANSACTION: 8a94f357-aab4-11df-86ab- c80aa9429562:8
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Limitations • Concurrent DDL is unsupported • CTAS (Create Table As SELECT) is unsupported – GTID Consistency (Not because of the GROUP REPLICATION) 33
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda 34 What is Group Replication? Group Replication Use Cases Setting Up Group Replication Conflict Resolution Recovery DBA Tools 2 3 4 5 1 5
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Conflict Resolution •There is global total order for transactions •All servers apply the same set of changes in the same order, therefore they remain consistent within the group –First committer wins 35
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master: Update Anywhere • Any two transactions on differentserverscan write to the same row • Conflictswill automatically be detected and handled 36 M M M M M BEGIN; UPDATE t1 SET c1=2 WHERE C1 =0; TRX2,node 4: M M M M M BEGIN; UPDATE t1 SET c1=1 WHERE C1=0; TRX1,node 1:
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master: Update Anywhere • TRX1commits • TRX2rollbacks 37 M M M M M COMMIT; but Rollback TRX2,node 4: M M M M M COMMIT; TRX1,node 1: OK
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Master: Update Anywhere • TRX1commits • TRX2rollbacks 38 M M M M M BEGIN; UPDATE t1 SET c1=2 WHERE C1 =0; TRX2,node 4: M M M M M BEGIN; UPDATE t1 SET c1=1 WHERE C1=0; TRX1,node 1: OK M M M M M Consistency! SELECT * FROM T1; c1 =1
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Group Replication Agenda 39 What is Group Replication? Group Replication Use Cases Setting Up Group Replication Conflict Resolution Recovery DBA Tools 2 3 4 5 1 5
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Recovery in Group Replication •Recovery is run when a new node is added •Recovery is run when a node that had previously been added but has been offline comes back online 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic Distributed Server Recovery • Node that joins the group automatically synchronizes with other nodes 41 M M M M M N Setto join group
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic Distributed Server Recovery • Node that joins the group automatically synchronizes with other nodes 42 M M M M M N ONLINE RECOVERING
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Automatic Distributed Server Recovery • Node that joins the group automatically synchronized with other nodes 43 M M M M M M ONLINE
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | How To Check If Node is Recovering 44 mysql> + | CHANNEL_NAME MEMBER_STATE | + | group_replication_applier | 87951d24 ONLINE | group_replication_applier | 8cab8898 RECOVERING mysql> SELECT * FROM performance_schema.replication_group_members; +---------------------------+--------------------------------------+--------------------------+-------------+--------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +---------------------------+--------------------------------------+--------------------------+-------------+--------------+ | group_replication_applier | 87951d24-9e08-11e5-9029-9e92014f86b5 | Kathys-MacBook-Pro.local | 3307 | ONLINE | | group_replication_applier | 8cab8898-9e08-11e5-9888-001772f67b84 | Kathys-MacBook-Pro.local | 3308 | RECOVERING |
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Group Replication Agenda 45 What is Group Replication? Group Replication Use Cases Installing 5.7 and Group Replication Plugin Conflict Resolution Recovery DBA Tools 2 3 4 5 1 6
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | How To Check If Node is Online 46 mysql> START SELECT * FROM performance_schema.replication_group_members; + | CHANNEL_NAME MEMBER_STATE | + | group_replication_applier | 0a40c9e8 ONLINE | group_replication_applier | 14b680b6 ONLINE | group_replication_applier | 191e28ca ONLINE + 3 rows in set (0.00 sec) mysql> START GROUP_REPLICATION; SELECT * FROM performance_schema.replication_group_members; +---------------------------+--------------------------------------+--------------------------+-------------+--------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +---------------------------+--------------------------------------+--------------------------+-------------+--------------+ | group_replication_applier | 0a40c9e8-9dce-11e5-b91f-a5ae79553d33 | Kathys-MacBook-Pro.local | 3308 | ONLINE | | group_replication_applier | 14b680b6-9dce-11e5-ab41-f8fc0628b71d | Kathys-MacBook-Pro.local | 3309 | ONLINE | | group_replication_applier | 191e28ca-9dce-11e5-ac10-fe18781605d5 | Kathys-MacBook-Pro.local | 3310 | ONLINE | +---------------------------+--------------------------------------+--------------------------+-------------+--------------+ 3 rows in set (0.00 sec)
  • 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Check Settings of Group Replication 47 mysql SELECT * FROM performance_schema.replication_group_member_statsG *************************** 1. row *************************** 1 row in set (0.00 sec) mysql> SELECT * FROM performance_schema.replication_group_member_statsG *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 235307401:3 MEMBER_ID: a236a0ec-9e9b-11e5-8be3-8b41a7829667 COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 12 COUNT_CONFLICTS_DETECTED: 5 COUNT_TRANSACTIONS_VALIDATING: 6 TRANSACTIONS_COMMITTED_ALL_MEMBERS: LAST_CONFLICT_FREE_TRANSACTION: 8a94f357-aab4-11df-86ab-c80aa9429562:3 1 row in set (0.00 sec)
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Disaster Recovery Backup and Restore High Availability MySQL Enterprise Edition – Business Durability 48
  • 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | And More Security Monitoring Backup 24x7 Support MySQL Enterprise Engineering 49
  • 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Learn More http://mysqlhighavailability.com/tag/mysql-group-replication/ • MySQL Group Replication Install Information • News/Updates • Blogs http://labs.mysql.com • Download and evaluate all MySQL Group Replication from the labs 50