SlideShare a Scribd company logo
1 of 126
Download to read offline
1 / 126
MySQL Group Replication in a nutshell
the core of MySQL InnoDB Cluster
 
Oracle Open World
September 19th 2016
 
Frédéric Descamps
MySQL Community Manager
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
2 / 126
 
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purpose only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied up in
making purchasing decisions. The development, release and timing of any features or
functionality described for Oracle's product remains at the sole discretion of Oracle.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
3 / 126
Join us!
MySQL Community Reception @ Oracle
OpenWorld
Celebrate, Have Fun and Mingle with Oracle’s MySQL Engineers & Your Peers
Tuesday, September 20, 7.00 pm
Jillian’s at Metreon: 175 Fourth Street, San Francisco
At the corner of Howard and 4th st.; only 2-min walk fromMoscone Center (same
place as last year)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
4 / 126
about.me/lefred
Who am I ?
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
5 / 126
Frédéric Descamps
@lefred
MySQL Evangelist
Managing MySQL since 3.23
devops believer
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
6 / 126
get more at the conference
MySQL Group Replication
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
7 / 126
Other sessions
CON2907 - MySQL High Availability
MattLord
CON4669 - MySQL High Availability with Group Replication
NunoGomes
CON3373 - The State of the Art of MySQL Replication
LuisSoares
HOL2912 - Building a Highly Available MySQL Database Service with Group Replication
MattLord
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
8 / 126
Agenda
Group Replication concepts
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
9 / 126
Agenda
Group Replication concepts
Using new&cool tools
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
10 / 126
Agenda
Group Replication concepts
Using new&cool tools
Application interaction
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
11 / 126
the magic explained
Group Replication Concept
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
12 / 126
Group Replication : what is it ?
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
13 / 126
Group Replication : what is it ?
MySQL is one of the major components of MySQL InnoDB Cluster
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
14 / 126
Group Replication : what is it ?
MySQL is one of the major components of MySQL InnoDB Cluster  
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
15 / 126
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
16 / 126
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
17 / 126
Group replication is a plugin !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
18 / 126
Group replication is a plugin !
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
19 / 126
Group replication is a plugin !
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
MySQL Group Communication System(GCS) is based on Paxos
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
20 / 126
Group replication is a plugin !
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
MySQL Group Communication System(GCS) is based on Paxos
Provides virtually synchronous replication for MySQL 5.7+
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
21 / 126
Group replication is a plugin !
GR is a plugin for MySQL, made by MySQL and packaged with MySQL
GR is an implementation of Replicated Database State Machine theory
MySQL Group Communication System(GCS) is based on Paxos
Provides virtually synchronous replication for MySQL 5.7+
Supported on all MySQL platforms !!
Linux, Windows, Solaris, OSX, FreeBSD
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
22 / 126
 
 
 
“Multi-masterupdateanywherereplicationpluginforMySQLwithbuilt-inconflict
detectionandresolution,automaticdistributedrecovery,andgroupmembership.”
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
23 / 126
Group Replication : how does it work ?
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
24 / 126
Group Replication : how does it work ?
A node (member of the group) send the changes (binlog events) made by a
transaction to the group through the GCS.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
25 / 126
Group Replication : how does it work ?
A node (member of the group) send the changes (binlog events) made by a
transaction to the group through the GCS.
All members consume the writeset and certify it
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
26 / 126
Group Replication : how does it work ?
A node (member of the group) send the changes (binlog events) made by a
transaction to the group through the GCS.
All members consume the writeset and certify it
If passed it is applied, if failed, transaction is rolled back on originating server and
discarded at other servers.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
27 / 126
OK... but how does it work ?!
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
28 / 126
OK... but how does it work ?!
It's just magic !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
29 / 126
OK... but how does it work ?!
It's just magic !
... no, in fact the writesets replication is synchronous and then certification and apply of
the changes are local to each nodes and asynchronous.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
30 / 126
OK... but how does it work ?!
It's just magic !
... no, in fact the writesets replication is synchronous and then certification and apply of
the changes are local to each nodes and asynchronous.
not that easy to understand... right ? Let's illustrate this...
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
31 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
32 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
33 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
34 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
35 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
36 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
37 / 126
MySQL Group Replication (autocommit)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
38 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
39 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
40 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
41 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
42 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
43 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
44 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
45 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
46 / 126
MySQL Group Replication (full transaction)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
47 / 126
Group Replication : Optimistic Locking
With GR we use what we call optimistic locking, it means we consider a resource free and
this will be confirmed or not during certification.
Let's first have a look at the traditional locking to compare.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
48 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
49 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
50 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
51 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
52 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
53 / 126
Traditional locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
54 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
55 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
56 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
57 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
58 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
59 / 126
Optimistic Locking
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
60 / 126
Optimistic Locking
The systemreturns error 149 as certification failed:
ERROR 1180 (HY000): Got error 149 during COMMIT
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
61 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
62 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
every tables must have a PK defined
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
63 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
every tables must have a PK defined
only IPV4 is supported
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
64 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
every tables must have a PK defined
only IPV4 is supported
a good network with lowlatency is important
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
65 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
every tables must have a PK defined
only IPV4 is supported
a good network with lowlatency is important
maximumof 9 members per group
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
66 / 126
Group Replication : requirements
exclusively use of InnoDB tables only
every tables must have a PK defined
only IPV4 is supported
a good network with lowlatency is important
maximumof 9 members per group
log-binmust be enabled and only ROWformat is supported
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
67 / 126
Group Replication : requirements (2)
enable GTIDs
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
68 / 126
Group Replication : requirements (2)
enable GTIDs
replication meta-data must be stored on systemtables
--master-info-repository=TABLE
--relay-log-info-repository=TABLE
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
69 / 126
Group Replication : requirements (2)
enable GTIDs
replication meta-data must be stored on systemtables
--master-info-repository=TABLE
--relay-log-info-repository=TABLE
writesets extraction must be enabled
--transaction-write-set-extraction=XXHASH64
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
70 / 126
Group Replication : requirements (2)
enable GTIDs
replication meta-data must be stored on systemtables
--master-info-repository=TABLE
--relay-log-info-repository=TABLE
writesets extraction must be enabled
--transaction-write-set-extraction=XXHASH64
log-slave-updatesmust be enabled
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
71 / 126
Group Replication : limitations
There are also some technical limitations:
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
72 / 126
Group Replication : limitations
There are also some technical limitations:
binlog checksumis not supported
--binlog-checksum=NONE
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
73 / 126
Group Replication : limitations
There are also some technical limitations:
binlog checksumis not supported
--binlog-checksum=NONE
Savepoints are not supported
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
74 / 126
Group Replication : limitations
There are also some technical limitations:
binlog checksumis not supported
--binlog-checksum=NONE
Savepoints are not supported
SERIALIZABLEis not supported as transaction isolation level
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
75 / 126
Group Replication : limitations
There are also some technical limitations:
binlog checksumis not supported
--binlog-checksum=NONE
Savepoints are not supported
SERIALIZABLEis not supported as transaction isolation level
an object cannot be changed concurrently at different servers by two operations,
where one of themis a DDL and the other is either a DML or DDL.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
76 / 126
are we compatible ?
Pre-study
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
77 / 126
Is my workload ready for Group Replication ?
Large transactions are more vulnerable because:
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
78 / 126
Is my workload ready for Group Replication ?
Large transactions are more vulnerable because:
Large write set may increase the likelihood of certification conflicts
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
79 / 126
Is my workload ready for Group Replication ?
Large transactions are more vulnerable because:
Large write set may increase the likelihood of certification conflicts
Transaction taking longer to execute may be more vulnerable to be aborted by a
certified transaction.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
80 / 126
Is my workload ready for Group Replication ?
Large transactions are more vulnerable because:
Large write set may increase the likelihood of certification conflicts
Transaction taking longer to execute may be more vulnerable to be aborted by a
certified transaction.
Small transactions changing a very small set of data (hotspots):
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
81 / 126
Is my workload ready for Group Replication ?
Large transactions are more vulnerable because:
Large write set may increase the likelihood of certification conflicts
Transaction taking longer to execute may be more vulnerable to be aborted by a
certified transaction.
Small transactions changing a very small set of data (hotspots):
Concurrently executing themat different sites will trade-off contention with roll
backs due to the optimistic execution
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
82 / 126
Therefore, when using Group Replication, we should pay attention to these points:
PK is mandatory (and a good one is better)
avoid large transactions
avoid hotspot
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
83 / 126
Scheme verification
We will see nowa list a queries that allows us to analyze our scheme. We will look for:
non InnoDB tables
tables without PK
tables with a bad PK
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
84 / 126
Non InnoDB tables
 
SELECT table_schema, table_name, engine, table_rows,
(index_length+data_length)/1024/1024 AS sizeMB
FROM information_schema.tables
WHERE engine != 'innodb'
AND table_schema NOT IN
('information_schema', 'mysql', 'performance_schema');
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
85 / 126
Tables Without Primary Key
select tables.table_schema, tables.table_name,
tables.engine, tables.table_rows
from information_schema.tables
left join (
select table_schema, table_name
from information_schema.statistics
group by table_schema, table_name, index_name
having
sum(
case
when non_unique = 0
and nullable != 'YES' then 1
else 0
end
) = count(*)
) puks
on tables.table_schema = puks.table_schema
and tables.table_name = puks.table_name
where puks.table_name is null
and tables.table_type = 'BASE TABLE' and engine='InnoDB';
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
86 / 126
Tables with bad primarky keys
 
set SQL_MODE="";
select a.TABLE_SCHEMA,a.TABLE_NAME, b.ENGINE, a.COLUMN_NAME,
a.DATA_TYPE, a.COLUMN_TYPE, a.COLUMN_KEY, b.TABLE_ROWS
from information_schema.COLUMNS as a
join information_schema.TABLES as b
on b.TABLE_NAME=a.TABLE_NAME and b.TABLE_SCHEMA=a.TABLE_SCHEMA
where COLUMN_KEY='PRI' and ENGINE="InnoDB"
and DATA_TYPE not like '%int'
and DATA_TYPE not like 'enum%'
and DATA_TYPE not like 'date%'
and DATA_TYPE not like 'time%'
and a.TABLE_SCHEMA not in ('mysql','sys')
group by table_schema, table_name;
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
87 / 126
Workload analysis
Nowit's time to play with Performance_Schemato analyze our workload.
The goal is to identify:
transactions with most statements (and most writes in particular)
transactions with most rows affected
largest statements by rowaffected
queries updating most the same PK and therefore having to wait more)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
88 / 126
Setup Performance_Schema
We need to enable some consumers and instruments:
update performance_schema.setup_consumers
set enabled = 'yes'
where name like 'events_statement%' or name like 'events_transaction%';
update performance_schema.setup_instruments
set enabled = 'yes', timed = 'yes'
where name = 'transaction';
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
89 / 126
Find the transactions with most statements
 
select t.thread_id, t.event_id, count(*) statement_count,
sum(s.rows_affected) rows_affected,
length(replace(group_concat(
case when s.event_name = "statement/sql/update" then 1
when s.event_name = "statement/sql/insert" then 1
when s.event_name = "statement/sql/delete" then 1
else null end),',',''))
as "# write statements"
from performance_schema.events_transactions_history_long t
join performance_schema.events_statements_history_long s
on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id
group by t.thread_id, t.event_id order by rows_affected desc limit 10;
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
90 / 126
Find the transactions with most statements
It's possible to see what are all these statements in one transaction:
set group_concat_max_len = 1000000;
select t.thread_id, t.event_id, count(*) statement_count,
sum(s.rows_affected) rows_affected,
group_concat(sql_text order by s.event_id separator 'n') statements
from performance_schema.events_transactions_history_long t
join performance_schema.events_statements_history_long s
on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id
group by t.thread_id, t.event_id order by statement_count desc limit 1G
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
91 / 126
Find the transactions with most rows affected
 
select t.thread_id, t.event_id, count(*) statement_count,
sum(s.rows_affected) rows_affected,
length(replace(group_concat(
case
when s.event_name = "statement/sql/update" then 1
when s.event_name = "statement/sql/insert" then 1
when s.event_name = "statement/sql/delete" then 1
else null end),',','')) as "# write statements"
from performance_schema.events_transactions_history_long t
join performance_schema.events_statements_history_long s
on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id
group by t.thread_id, t.event_id order by rows_affected desc limit 10;
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
92 / 126
Find the transactions with most rows affected
It's again possible the see what are the statements:
select t.thread_id, t.event_id, count(*) statement_count,
sum(s.rows_affected) rows_affected,
group_concat(sql_text order by s.event_id separator 'n') statements
from performance_schema.events_transactions_history_long t
join performance_schema.events_statements_history_long s
on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id
group by t.thread_id, t.event_id order by rows_affected desc limit 1G
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
93 / 126
Find the transactions with most rows affected
It's again possible the see what are the statements:
select t.thread_id, t.event_id, count(*) statement_count,
sum(s.rows_affected) rows_affected,
group_concat(sql_text order by s.event_id separator 'n') statements
from performance_schema.events_transactions_history_long t
join performance_schema.events_statements_history_long s
on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id
group by t.thread_id, t.event_id order by rows_affected desc limit 1G
Don't forget to verify the auto_commit ones are they are not returned with the query
above.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
94 / 126
Find largest statements by row affected
 
select query, db, rows_affected, rows_affected_avg
from sys.statement_analysis
order by rows_affected_avg desc limit 10;
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
95 / 126
Find queries that write the most.
Looking for lots of updates/timer_wait to the same PKs.
 
select *
from performance_schema.events_statements_history_long
where rows_affected > 1 order by timer_wait desc limit 20G
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
 
96 / 126
help me to configure my InnoDB Cluster
Using new cool tools
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
97 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
98 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
JavaScript
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
99 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
JavaScript
Python
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
100 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
JavaScript
Python
SQL
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
101 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
JavaScript
Python
SQL
Supports both Document and Relational models
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
102 / 126
MySQL Shell
The MySQL Teamextended MySQL Shell to use the newAdmin API.
NowMySQL Shell is a single unified client for all adminstrative and operatons tasks.
Multi-Language:
JavaScript
Python
SQL
Supports both Document and Relational models
Exposes full Development and Admin API
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
103 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
104 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
105 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
106 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
create cluster
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
107 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
create cluster
deploy MySQL instances (in sandbox only for the moment)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
108 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
create cluster
deploy MySQL instances (in sandbox only for the moment)
get cluster info
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
109 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
create cluster
deploy MySQL instances (in sandbox only for the moment)
get cluster info
start/stop MySQL instances
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
110 / 126
MySQL Shell: Admin API
mysql-js>dba.help()
the global variable dbais used to access the MySQL API
performDBA operations to manage MySQL InnoDB Cluster:
create cluster
deploy MySQL instances (in sandbox only for the moment)
get cluster info
start/stop MySQL instances
validate MySQL instances
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
111 / 126
mysqlprovision
The mysqlprovision utility is designed to facilitate the management of MySQL Group
Replication, allowing users to start a replica set (a newreplication group), to add/remove
members to/froman existing group. It can also check if an instance meets all the
requirements to successfully create a newgroup or to be added to an existing group. This
utility is also capable of modifying MySQL option files of existing instances in order for
themto meet the requirements of Group Replication.
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
112 / 126
let's create our first MySQL InnoDB Cluster
Demo time !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
113 / 126
MySQL InnoDB Cluster
demo
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
114 / 126
full HA ?
Application interaction
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
115 / 126
MySQL Router
MySQL Shell
MySQL Group Replication
MySQL Server
MySQL InnoDB Cluster
So MySQL InnoDB Cluster is composed by:
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
116 / 126
MySQL Router
MySQL Shell
MySQL Group Replication
MySQL Server
MySQL InnoDB Cluster
So MySQL InnoDB Cluster is composed by:
 
CON2907 - MySQL High Availability - MattLord- Wed 12:15
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
117 / 126
MySQL Router
Transparent client connection routing (TCP level 4)
load balancing
connection failover
Native support for InnoDB Clusters
understands Group Replication topology
utilizes metadata schema stored on each members
bootstrap and auto-config
supports multi-master and single primary modes
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
118 / 126
MySQL Router & Group Replication
Quick demo !
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
119 / 126
MySQL Router & Group Replication
demo
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
120 / 126
Any other alternatives ?
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
121 / 126
Any other alternatives ?
It's possible to use MySQL Group Replication with other proxies/load-balancers
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
122 / 126
Any other alternatives ?
It's possible to use MySQL Group Replication with other proxies/load-balancers
HAProxy : http://lefred.be/content/mysql-group-replication-as-ha-solution/
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
123 / 126
ProxySQL : http://lefred.be/content/ha-with-mysql-group-replication-and-proxysql/
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
124 / 126
Questions ?
Thank you !
 
 
 
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
125 / 126
Join us!
Register: http://tinyurl.com/mysqloow16
MySQL Community Reception @ Oracle
OpenWorld
Tuesday, September 20, 7.00 pm
Jillian’s at Metreon: 175 Fourth Street, San Francisco
At the corner of Howard and 4th st.; only 2-min walk fromMoscone Center (same
place as last year)
Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.
126 / 126

More Related Content

What's hot

What's hot (20)

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 InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB ClusterInnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
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...
 
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...FOSDEM 2022 MySQL Devroom:  MySQL 8.0 - Logical Backups, Snapshots and Point-...
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
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
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database SystemLinuxFest Northwest 2022 - The Evolution of a MySQL Database System
LinuxFest Northwest 2022 - The Evolution of a MySQL Database System
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
MySQL Load Balancers - Maxscale, ProxySQL, HAProxy, MySQL Router & nginx - A ...
 
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
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 
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 Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 

Viewers also liked

Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
Kenny Gryp
 

Viewers also liked (20)

MySQL - checklist для новичка в Highload
MySQL - checklist для новичка в HighloadMySQL - checklist для новичка в Highload
MySQL - checklist для новичка в Highload
 
淘宝数据库架构演进历程
淘宝数据库架构演进历程淘宝数据库架构演进历程
淘宝数据库架构演进历程
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
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
 
Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1Successful Scalability Principles - Part 1
Successful Scalability Principles - Part 1
 
2010丹臣的思考
2010丹臣的思考2010丹臣的思考
2010丹臣的思考
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
 
Advanced mysql replication techniques
Advanced mysql replication techniquesAdvanced mysql replication techniques
Advanced mysql replication techniques
 
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication SetupsMix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
 
High Availability Using MySQL Group Replication
High Availability Using MySQL Group ReplicationHigh Availability Using MySQL Group Replication
High Availability Using MySQL Group Replication
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
 
MySQL Server Defaults
MySQL Server DefaultsMySQL Server Defaults
MySQL Server Defaults
 
Multi Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ VerisureMulti Source Replication With MySQL 5.7 @ Verisure
Multi Source Replication With MySQL 5.7 @ Verisure
 
Mysql展示功能与源码对应
Mysql展示功能与源码对应Mysql展示功能与源码对应
Mysql展示功能与源码对应
 
Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structure
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & Optimization
 
Requirements the Last Bottleneck
Requirements the Last BottleneckRequirements the Last Bottleneck
Requirements the Last Bottleneck
 
Explain
ExplainExplain
Explain
 
Lessons Learned: Troubleshooting Replication
Lessons Learned: Troubleshooting ReplicationLessons Learned: Troubleshooting Replication
Lessons Learned: Troubleshooting Replication
 
Эффективная отладка репликации MySQL
Эффективная отладка репликации MySQLЭффективная отладка репликации MySQL
Эффективная отладка репликации MySQL
 

Similar to MySQL InnoDB Cluster - Group Replication

Similar to MySQL InnoDB Cluster - Group Replication (20)

MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio  in a nutshell - MySQL InnoDB ClusterMySQL Group Replicatio  in a nutshell - MySQL InnoDB Cluster
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
 
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on LabMySQL InnoDB Cluster in a Nutshell - Hands-on Lab
MySQL InnoDB Cluster in a Nutshell - Hands-on Lab
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Boston meetup : MySQL Innodb Cluster - May 1st 2017
Boston meetup : MySQL Innodb Cluster - May 1st  2017Boston meetup : MySQL Innodb Cluster - May 1st  2017
Boston meetup : MySQL Innodb Cluster - May 1st 2017
 
Swedish MySQL User Group - MySQL InnoDB Cluster
Swedish MySQL User Group - MySQL InnoDB ClusterSwedish MySQL User Group - MySQL InnoDB Cluster
Swedish MySQL User Group - MySQL InnoDB Cluster
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
MySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a NutshellMySQL InnoDB Cluster and Group Replication in a Nutshell
MySQL InnoDB Cluster and Group Replication in a Nutshell
 
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
MySQL innodb cluster and Group Replication in a nutshell - hands-on tutorial ...
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Solving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise MonitorSolving Performance Problems Using MySQL Enterprise Monitor
Solving Performance Problems Using MySQL Enterprise Monitor
 
Helsinki MySQL User Group - MySQL InnoDB Cluster
Helsinki MySQL User Group - MySQL InnoDB ClusterHelsinki MySQL User Group - MySQL InnoDB Cluster
Helsinki MySQL User Group - MySQL InnoDB Cluster
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest TutorialMySQL 8.0 InnoDB Cluster - Easiest Tutorial
MySQL 8.0 InnoDB Cluster - Easiest Tutorial
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
How to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL ShellHow to operate MySQL InnoDB Cluster with MySQL Shell
How to operate MySQL InnoDB Cluster with MySQL Shell
 
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 !
 
Zend2016 dba tutorial
Zend2016 dba tutorialZend2016 dba tutorial
Zend2016 dba tutorial
 

More from Frederic Descamps

More from Frederic Descamps (20)

MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
MySQL Innovation & Cloud Day - Document Store avec MySQL HeatWave Database Se...
 
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code ExtensionMySQL Day Roma - MySQL Shell and Visual Studio Code Extension
MySQL Day Roma - MySQL Shell and Visual Studio Code Extension
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdfRivieraJUG - MySQL 8.0 - What's new for developers.pdf
RivieraJUG - MySQL 8.0 - What's new for developers.pdf
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Percona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio CodePercona Live 2022 - MySQL Shell for Visual Studio Code
Percona Live 2022 - MySQL Shell for Visual Studio Code
 
Percona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database SystemPercona Live 2022 - The Evolution of a MySQL Database System
Percona Live 2022 - The Evolution of a MySQL Database System
 
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
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Pi Day 2022 -  from IoT to MySQL HeatWave Database ServicePi Day 2022 -  from IoT to MySQL HeatWave Database Service
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0Les nouveautés de MySQL 8.0
Les nouveautés de MySQL 8.0
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
Deploying Magento on OCI with MDS
Deploying Magento on OCI with MDSDeploying Magento on OCI with MDS
Deploying Magento on OCI with MDS
 
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
 
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native -  Why to use MySQL 8.0 and how to use it on oci with MDSCloud native -  Why to use MySQL 8.0 and how to use it on oci with MDS
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
 
MySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mdsMySQL Database Service Webinar: Installing Drupal in oci with mds
MySQL Database Service Webinar: Installing Drupal in oci with mds
 
the State of the Dolphin - October 2020
the State of the Dolphin - October 2020the State of the Dolphin - October 2020
the State of the Dolphin - October 2020
 
MySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New WorldMySQL 8.0 Document Store - Discovery of a New World
MySQL 8.0 Document Store - Discovery of a New World
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

MySQL InnoDB Cluster - Group Replication

  • 2. MySQL Group Replication in a nutshell the core of MySQL InnoDB Cluster   Oracle Open World September 19th 2016   Frédéric Descamps MySQL Community Manager Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 2 / 126
  • 3.   Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle's product remains at the sole discretion of Oracle. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 3 / 126
  • 4. Join us! MySQL Community Reception @ Oracle OpenWorld Celebrate, Have Fun and Mingle with Oracle’s MySQL Engineers & Your Peers Tuesday, September 20, 7.00 pm Jillian’s at Metreon: 175 Fourth Street, San Francisco At the corner of Howard and 4th st.; only 2-min walk fromMoscone Center (same place as last year) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 4 / 126
  • 5. about.me/lefred Who am I ? Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 5 / 126
  • 6. Frédéric Descamps @lefred MySQL Evangelist Managing MySQL since 3.23 devops believer Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 6 / 126
  • 7. get more at the conference MySQL Group Replication Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 7 / 126
  • 8. Other sessions CON2907 - MySQL High Availability MattLord CON4669 - MySQL High Availability with Group Replication NunoGomes CON3373 - The State of the Art of MySQL Replication LuisSoares HOL2912 - Building a Highly Available MySQL Database Service with Group Replication MattLord Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 8 / 126
  • 10. Agenda Group Replication concepts Using new&cool tools Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 10 / 126
  • 11. Agenda Group Replication concepts Using new&cool tools Application interaction Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 11 / 126
  • 12. the magic explained Group Replication Concept Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 12 / 126
  • 13. Group Replication : what is it ? Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 13 / 126
  • 14. Group Replication : what is it ? MySQL is one of the major components of MySQL InnoDB Cluster Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 14 / 126
  • 15. Group Replication : what is it ? MySQL is one of the major components of MySQL InnoDB Cluster   Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 15 / 126
  • 18. Group replication is a plugin ! Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 18 / 126
  • 19. Group replication is a plugin ! GR is a plugin for MySQL, made by MySQL and packaged with MySQL Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 19 / 126
  • 20. Group replication is a plugin ! GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory MySQL Group Communication System(GCS) is based on Paxos Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 20 / 126
  • 21. Group replication is a plugin ! GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory MySQL Group Communication System(GCS) is based on Paxos Provides virtually synchronous replication for MySQL 5.7+ Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 21 / 126
  • 22. Group replication is a plugin ! GR is a plugin for MySQL, made by MySQL and packaged with MySQL GR is an implementation of Replicated Database State Machine theory MySQL Group Communication System(GCS) is based on Paxos Provides virtually synchronous replication for MySQL 5.7+ Supported on all MySQL platforms !! Linux, Windows, Solaris, OSX, FreeBSD Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 22 / 126
  • 24. Group Replication : how does it work ? Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 24 / 126
  • 25. Group Replication : how does it work ? A node (member of the group) send the changes (binlog events) made by a transaction to the group through the GCS. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 25 / 126
  • 26. Group Replication : how does it work ? A node (member of the group) send the changes (binlog events) made by a transaction to the group through the GCS. All members consume the writeset and certify it Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 26 / 126
  • 27. Group Replication : how does it work ? A node (member of the group) send the changes (binlog events) made by a transaction to the group through the GCS. All members consume the writeset and certify it If passed it is applied, if failed, transaction is rolled back on originating server and discarded at other servers. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 27 / 126
  • 28. OK... but how does it work ?! Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 28 / 126
  • 29. OK... but how does it work ?! It's just magic ! Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 29 / 126
  • 30. OK... but how does it work ?! It's just magic ! ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 30 / 126
  • 31. OK... but how does it work ?! It's just magic ! ... no, in fact the writesets replication is synchronous and then certification and apply of the changes are local to each nodes and asynchronous. not that easy to understand... right ? Let's illustrate this... Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 31 / 126
  • 32. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 32 / 126
  • 33. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 33 / 126
  • 34. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 34 / 126
  • 35. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 35 / 126
  • 36. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 36 / 126
  • 37. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 37 / 126
  • 38. MySQL Group Replication (autocommit) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 38 / 126
  • 39. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 39 / 126
  • 40. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 40 / 126
  • 41. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 41 / 126
  • 42. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 42 / 126
  • 43. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 43 / 126
  • 44. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 44 / 126
  • 45. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 45 / 126
  • 46. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 46 / 126
  • 47. MySQL Group Replication (full transaction) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 47 / 126
  • 48. Group Replication : Optimistic Locking With GR we use what we call optimistic locking, it means we consider a resource free and this will be confirmed or not during certification. Let's first have a look at the traditional locking to compare. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 48 / 126
  • 61. Optimistic Locking The systemreturns error 149 as certification failed: ERROR 1180 (HY000): Got error 149 during COMMIT Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 61 / 126
  • 62. Group Replication : requirements exclusively use of InnoDB tables only Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 62 / 126
  • 63. Group Replication : requirements exclusively use of InnoDB tables only every tables must have a PK defined Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 63 / 126
  • 64. Group Replication : requirements exclusively use of InnoDB tables only every tables must have a PK defined only IPV4 is supported Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 64 / 126
  • 65. Group Replication : requirements exclusively use of InnoDB tables only every tables must have a PK defined only IPV4 is supported a good network with lowlatency is important Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 65 / 126
  • 66. Group Replication : requirements exclusively use of InnoDB tables only every tables must have a PK defined only IPV4 is supported a good network with lowlatency is important maximumof 9 members per group Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 66 / 126
  • 67. Group Replication : requirements exclusively use of InnoDB tables only every tables must have a PK defined only IPV4 is supported a good network with lowlatency is important maximumof 9 members per group log-binmust be enabled and only ROWformat is supported Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 67 / 126
  • 68. Group Replication : requirements (2) enable GTIDs Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 68 / 126
  • 69. Group Replication : requirements (2) enable GTIDs replication meta-data must be stored on systemtables --master-info-repository=TABLE --relay-log-info-repository=TABLE Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 69 / 126
  • 70. Group Replication : requirements (2) enable GTIDs replication meta-data must be stored on systemtables --master-info-repository=TABLE --relay-log-info-repository=TABLE writesets extraction must be enabled --transaction-write-set-extraction=XXHASH64 Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 70 / 126
  • 71. Group Replication : requirements (2) enable GTIDs replication meta-data must be stored on systemtables --master-info-repository=TABLE --relay-log-info-repository=TABLE writesets extraction must be enabled --transaction-write-set-extraction=XXHASH64 log-slave-updatesmust be enabled Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 71 / 126
  • 72. Group Replication : limitations There are also some technical limitations: Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 72 / 126
  • 73. Group Replication : limitations There are also some technical limitations: binlog checksumis not supported --binlog-checksum=NONE Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 73 / 126
  • 74. Group Replication : limitations There are also some technical limitations: binlog checksumis not supported --binlog-checksum=NONE Savepoints are not supported Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 74 / 126
  • 75. Group Replication : limitations There are also some technical limitations: binlog checksumis not supported --binlog-checksum=NONE Savepoints are not supported SERIALIZABLEis not supported as transaction isolation level Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 75 / 126
  • 76. Group Replication : limitations There are also some technical limitations: binlog checksumis not supported --binlog-checksum=NONE Savepoints are not supported SERIALIZABLEis not supported as transaction isolation level an object cannot be changed concurrently at different servers by two operations, where one of themis a DDL and the other is either a DML or DDL. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 76 / 126
  • 77. are we compatible ? Pre-study Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 77 / 126
  • 78. Is my workload ready for Group Replication ? Large transactions are more vulnerable because: Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 78 / 126
  • 79. Is my workload ready for Group Replication ? Large transactions are more vulnerable because: Large write set may increase the likelihood of certification conflicts Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 79 / 126
  • 80. Is my workload ready for Group Replication ? Large transactions are more vulnerable because: Large write set may increase the likelihood of certification conflicts Transaction taking longer to execute may be more vulnerable to be aborted by a certified transaction. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 80 / 126
  • 81. Is my workload ready for Group Replication ? Large transactions are more vulnerable because: Large write set may increase the likelihood of certification conflicts Transaction taking longer to execute may be more vulnerable to be aborted by a certified transaction. Small transactions changing a very small set of data (hotspots): Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 81 / 126
  • 82. Is my workload ready for Group Replication ? Large transactions are more vulnerable because: Large write set may increase the likelihood of certification conflicts Transaction taking longer to execute may be more vulnerable to be aborted by a certified transaction. Small transactions changing a very small set of data (hotspots): Concurrently executing themat different sites will trade-off contention with roll backs due to the optimistic execution Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 82 / 126
  • 83. Therefore, when using Group Replication, we should pay attention to these points: PK is mandatory (and a good one is better) avoid large transactions avoid hotspot Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 83 / 126
  • 84. Scheme verification We will see nowa list a queries that allows us to analyze our scheme. We will look for: non InnoDB tables tables without PK tables with a bad PK Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 84 / 126
  • 85. Non InnoDB tables   SELECT table_schema, table_name, engine, table_rows, (index_length+data_length)/1024/1024 AS sizeMB FROM information_schema.tables WHERE engine != 'innodb' AND table_schema NOT IN ('information_schema', 'mysql', 'performance_schema'); Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   85 / 126
  • 86. Tables Without Primary Key select tables.table_schema, tables.table_name, tables.engine, tables.table_rows from information_schema.tables left join ( select table_schema, table_name from information_schema.statistics group by table_schema, table_name, index_name having sum( case when non_unique = 0 and nullable != 'YES' then 1 else 0 end ) = count(*) ) puks on tables.table_schema = puks.table_schema and tables.table_name = puks.table_name where puks.table_name is null and tables.table_type = 'BASE TABLE' and engine='InnoDB'; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   86 / 126
  • 87. Tables with bad primarky keys   set SQL_MODE=""; select a.TABLE_SCHEMA,a.TABLE_NAME, b.ENGINE, a.COLUMN_NAME, a.DATA_TYPE, a.COLUMN_TYPE, a.COLUMN_KEY, b.TABLE_ROWS from information_schema.COLUMNS as a join information_schema.TABLES as b on b.TABLE_NAME=a.TABLE_NAME and b.TABLE_SCHEMA=a.TABLE_SCHEMA where COLUMN_KEY='PRI' and ENGINE="InnoDB" and DATA_TYPE not like '%int' and DATA_TYPE not like 'enum%' and DATA_TYPE not like 'date%' and DATA_TYPE not like 'time%' and a.TABLE_SCHEMA not in ('mysql','sys') group by table_schema, table_name; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   87 / 126
  • 88. Workload analysis Nowit's time to play with Performance_Schemato analyze our workload. The goal is to identify: transactions with most statements (and most writes in particular) transactions with most rows affected largest statements by rowaffected queries updating most the same PK and therefore having to wait more) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 88 / 126
  • 89. Setup Performance_Schema We need to enable some consumers and instruments: update performance_schema.setup_consumers set enabled = 'yes' where name like 'events_statement%' or name like 'events_transaction%'; update performance_schema.setup_instruments set enabled = 'yes', timed = 'yes' where name = 'transaction'; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   89 / 126
  • 90. Find the transactions with most statements   select t.thread_id, t.event_id, count(*) statement_count, sum(s.rows_affected) rows_affected, length(replace(group_concat( case when s.event_name = "statement/sql/update" then 1 when s.event_name = "statement/sql/insert" then 1 when s.event_name = "statement/sql/delete" then 1 else null end),',','')) as "# write statements" from performance_schema.events_transactions_history_long t join performance_schema.events_statements_history_long s on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id group by t.thread_id, t.event_id order by rows_affected desc limit 10; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   90 / 126
  • 91. Find the transactions with most statements It's possible to see what are all these statements in one transaction: set group_concat_max_len = 1000000; select t.thread_id, t.event_id, count(*) statement_count, sum(s.rows_affected) rows_affected, group_concat(sql_text order by s.event_id separator 'n') statements from performance_schema.events_transactions_history_long t join performance_schema.events_statements_history_long s on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id group by t.thread_id, t.event_id order by statement_count desc limit 1G Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   91 / 126
  • 92. Find the transactions with most rows affected   select t.thread_id, t.event_id, count(*) statement_count, sum(s.rows_affected) rows_affected, length(replace(group_concat( case when s.event_name = "statement/sql/update" then 1 when s.event_name = "statement/sql/insert" then 1 when s.event_name = "statement/sql/delete" then 1 else null end),',','')) as "# write statements" from performance_schema.events_transactions_history_long t join performance_schema.events_statements_history_long s on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id group by t.thread_id, t.event_id order by rows_affected desc limit 10; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   92 / 126
  • 93. Find the transactions with most rows affected It's again possible the see what are the statements: select t.thread_id, t.event_id, count(*) statement_count, sum(s.rows_affected) rows_affected, group_concat(sql_text order by s.event_id separator 'n') statements from performance_schema.events_transactions_history_long t join performance_schema.events_statements_history_long s on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id group by t.thread_id, t.event_id order by rows_affected desc limit 1G Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   93 / 126
  • 94. Find the transactions with most rows affected It's again possible the see what are the statements: select t.thread_id, t.event_id, count(*) statement_count, sum(s.rows_affected) rows_affected, group_concat(sql_text order by s.event_id separator 'n') statements from performance_schema.events_transactions_history_long t join performance_schema.events_statements_history_long s on t.thread_id = s.thread_id and t.event_id = s.nesting_event_id group by t.thread_id, t.event_id order by rows_affected desc limit 1G Don't forget to verify the auto_commit ones are they are not returned with the query above. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   94 / 126
  • 95. Find largest statements by row affected   select query, db, rows_affected, rows_affected_avg from sys.statement_analysis order by rows_affected_avg desc limit 10; Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   95 / 126
  • 96. Find queries that write the most. Looking for lots of updates/timer_wait to the same PKs.   select * from performance_schema.events_statements_history_long where rows_affected > 1 order by timer_wait desc limit 20G Copyright @ 2016 Oracle and/or its affiliates. All rights reserved.   96 / 126
  • 97. help me to configure my InnoDB Cluster Using new cool tools Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 97 / 126
  • 98. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 98 / 126
  • 99. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: JavaScript Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 99 / 126
  • 100. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: JavaScript Python Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 100 / 126
  • 101. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: JavaScript Python SQL Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 101 / 126
  • 102. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: JavaScript Python SQL Supports both Document and Relational models Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 102 / 126
  • 103. MySQL Shell The MySQL Teamextended MySQL Shell to use the newAdmin API. NowMySQL Shell is a single unified client for all adminstrative and operatons tasks. Multi-Language: JavaScript Python SQL Supports both Document and Relational models Exposes full Development and Admin API Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 103 / 126
  • 104. MySQL Shell: Admin API mysql-js>dba.help() Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 104 / 126
  • 105. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 105 / 126
  • 106. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 106 / 126
  • 107. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: create cluster Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 107 / 126
  • 108. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: create cluster deploy MySQL instances (in sandbox only for the moment) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 108 / 126
  • 109. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: create cluster deploy MySQL instances (in sandbox only for the moment) get cluster info Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 109 / 126
  • 110. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: create cluster deploy MySQL instances (in sandbox only for the moment) get cluster info start/stop MySQL instances Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 110 / 126
  • 111. MySQL Shell: Admin API mysql-js>dba.help() the global variable dbais used to access the MySQL API performDBA operations to manage MySQL InnoDB Cluster: create cluster deploy MySQL instances (in sandbox only for the moment) get cluster info start/stop MySQL instances validate MySQL instances Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 111 / 126
  • 112. mysqlprovision The mysqlprovision utility is designed to facilitate the management of MySQL Group Replication, allowing users to start a replica set (a newreplication group), to add/remove members to/froman existing group. It can also check if an instance meets all the requirements to successfully create a newgroup or to be added to an existing group. This utility is also capable of modifying MySQL option files of existing instances in order for themto meet the requirements of Group Replication. Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 112 / 126
  • 113. let's create our first MySQL InnoDB Cluster Demo time ! Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 113 / 126
  • 115. full HA ? Application interaction Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 115 / 126
  • 116. MySQL Router MySQL Shell MySQL Group Replication MySQL Server MySQL InnoDB Cluster So MySQL InnoDB Cluster is composed by: Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 116 / 126
  • 117. MySQL Router MySQL Shell MySQL Group Replication MySQL Server MySQL InnoDB Cluster So MySQL InnoDB Cluster is composed by:   CON2907 - MySQL High Availability - MattLord- Wed 12:15 Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 117 / 126
  • 118. MySQL Router Transparent client connection routing (TCP level 4) load balancing connection failover Native support for InnoDB Clusters understands Group Replication topology utilizes metadata schema stored on each members bootstrap and auto-config supports multi-master and single primary modes Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 118 / 126
  • 119. MySQL Router & Group Replication Quick demo ! Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 119 / 126
  • 120. MySQL Router & Group Replication demo Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 120 / 126
  • 121. Any other alternatives ? Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 121 / 126
  • 122. Any other alternatives ? It's possible to use MySQL Group Replication with other proxies/load-balancers Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 122 / 126
  • 123. Any other alternatives ? It's possible to use MySQL Group Replication with other proxies/load-balancers HAProxy : http://lefred.be/content/mysql-group-replication-as-ha-solution/ Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 123 / 126
  • 125. Questions ? Thank you !       Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 125 / 126
  • 126. Join us! Register: http://tinyurl.com/mysqloow16 MySQL Community Reception @ Oracle OpenWorld Tuesday, September 20, 7.00 pm Jillian’s at Metreon: 175 Fourth Street, San Francisco At the corner of Howard and 4th st.; only 2-min walk fromMoscone Center (same place as last year) Copyright @ 2016 Oracle and/or its affiliates. All rights reserved. 126 / 126