SlideShare a Scribd company logo
1 of 65
Download to read offline
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
An Overview of the New Replication
Features in MySQL 5.7
Presentation by
Venkatesh Duggirala (venkatesh.duggiral@oracle.com)
Senior Principal Member Technical Staff
Slides prepared by
Luís Soares (luis.soares@oracle.com)
Principal Software Engineer, MySQL Replication Team Lead
1
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.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Background
Celebrating MySQL 5.7 Replication
The New Replication Features in MySQL 5.7
Summary
1
2
3
4
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Celebrating MySQL 5.7 Replication
GA ready!
1
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Interesting Stats Related to MySQL 5.7
• 40 replication worklogs pushed to MySQL 5.7
– 29 related to on MySQL replication Core
– 11 related to MySQL Group Replication.
• 8 contributions merged into MySQL 5.7.
• 19 major enhancements to the replication core.
• 14 refactoring and modularization related changes to the code.
• 1 entirely new out-of-core replication plugin: MySQL Group Replication.
– Still on labs, but exhibiting a rapid release rate.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thank You!
• After two and half years baking the team is very happy to share the
outcome with you!
– We did it for you!
• Thank you for being part of it!
• Enjoy MySQL 5.7, in particular the replication features! ;)
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background2
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background: Replication Components
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background: Replication Components
• Binary Log
– File based logical log that records the changes on the master.
– Statement or Row based format (may be intermixed).
– Each transaction is split into groups of events.
– Control events: Rotate, Format Description, Gtid, ...
Tuesday, October 27, 2015
Layout of a
Binary Log File
BEGIN ...E1 E2 COMMIT BEGIN ...E1 E2 COMMIT
MySQL Central @ Oracle Open World 2015 - San Francisco 10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
M S
S
S
S
M
write clients read clients
read clients
write clients
More
reads?
More
slaves!
Read scale-out
Background: What is Replication Used For?
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
M M?
write clients write clients
More
writes?
More
Masters?
M?
M?
MySQL Fabric helps sharding your data with MySQL...
What about write scale-out?
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
C
B
A
C
B
ACrash
C
B
A
B is the
new master
Uh Oh! Whew!
Redundancy: If master crashes, promote slave to master
Background: What is Replication Used For?
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
M
S
write clients
business intelligent client applications
reporting client applications
big queries client applications
On-line Backup and Reporting
Background: What is Replication Used For?
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CB
BA
AC
Image from
www.ginkgomaps.com
Background: What is Replication Used For?
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.73
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
3
Tuesday, October 27, 2015
3.1
MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Global Transaction Identifiers
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 18
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Global Transaction Identifiers
• The procedure is online.
– Both reads and writes are allowed while global transaction identifiers are being
turned on or off in the entire replication cluster.
• No need to synchronize servers, ever.
• No need to restart servers.
• No need to change replication topology.
– Works in arbitrary topologies.
• Should anything happen in the middle of the procedure, you can always roll
back.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Global Transaction Identifiers
• Over simplified procedure to turn on global transaction identifiers:
• Details: http://dev.mysql.com/doc/refman/5.7/en/replication-mode-
change-online-enable-gtids.html
Tuesday, October 27, 2015
1) SET @@GLOBAL.GTID_MODE = OFF_PERMISSIVE; (on every server)
2) SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE; (on every server)
3) wait for a bit longer than your replication lag
4) SET @@GLOBAL.GTID_MODE = ON; (on every server)
MySQL Central @ Oracle Open World 2015 - San Francisco 20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Filters
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Filters
• Change Slave's Replication Filters dynamically.
– No need to stop and restart the slave server for setting new replication filtering rules.
– All slave filters are supported.
– Values can be input in various character sets.
Tuesday, October 27, 2015
mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2)
MySQL Central @ Oracle Open World 2015 - San Francisco 22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Receiver/Applier
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Change master from A to B without stopping the applier threads.
Online Reconfiguration of Replication Receiver/Applier
Tuesday, October 27, 2015
C
B
A
C
B
ACrash
C
B
A
B is the
new master
Uh Oh! Whew!
MySQL Central @ Oracle Open World 2015 - San Francisco 24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Change master from A to B without stopping the applier threads.
Online Reconfiguration of Replication Receiver/Applier
Tuesday, October 27, 2015
C
B
A
C
B
ACrash
C
B
A
Uh Oh! Whew!
DBA did not need C to stop applying its
relay log to change C's master from A to B.
MySQL Central @ Oracle Open World 2015 - San Francisco 25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Receiver/Applier
• Enables more online operations during fail-over:
• Stopping, changing master and restarting the receiver thread are all done
while the applier thread is running.
• Change applier properties while the receiver thread is working:
Tuesday, October 27, 2015
mysql> STOP SLAVE IO_THREAD;
mysql> CHANGE MASTER TO MASTER_HOST='master2', …;
mysql> START SLAVE IO_THREAD;
mysql> STOP SLAVE SQL_THREAD;
mysql> CHANGE MASTER TO MASTER_DELAY=3600, …;
mysql> START SLAVE SQL_THREAD;
MySQL Central @ Oracle Open World 2015 - San Francisco 26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 27
DBA
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
• Monitoring through SQL.
• Logically unrelated information into different places.
• Extensible, can be adapted to new features.
• More accurate and consistent identifier names.
• Master-slave, Multi-source, Group Replication support.
Performance Schema Replication Tables
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Tuesday, October 27, 2015
Connection
Configuration
Connection
Status
Applier
Configuration
Applier
Status
(Slave) Receiver and Applier Status
Applier / Coordinator
Status
Workers
Status
MySQL Central @ Oracle Open World 2015 - San Francisco 29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Tuesday, October 27, 2015
mysql> select * from performance_schema.replication_applier_status_by_workerG
*************************** 1. row ***************************
CHANNEL_NAME:
WORKER_ID: 1
THREAD_ID: 35
SERVICE_STATE: ON
LAST_SEEN_TRANSACTION: 4ba0eb86-63c3-11e4-92ba-28b2bd168d07:2368
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
*************************** 2. row ***************************
CHANNEL_NAME:
WORKER_ID: 2
THREAD_ID: 36
SERVICE_STATE: ON
LAST_SEEN_TRANSACTION: 4ba0eb86-63c3-11e4-92ba-28b2bd168d07:2367
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
2 rows in set (0,00 sec)
MySQL Central @ Oracle Open World 2015 - San Francisco 30
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
3
Tuesday, October 27, 2015
3.1
3.2
MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 32
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
Tuesday, October 27, 2015
Single Threaded Apply 8 Threads Applier 24 Threads Applier 48 Threads Applier 96 Threads Applier
0%
50%
100%
150%
200%
250%
Fast and Scalable Multi-threaded Replication Applier
(statement-based replication, durable settings, SSD storage)
Slaveapplytime
(SysbenchRWonthemasterwith96threads=100%)
10X
MySQL Central @ Oracle Open World 2015 - San Francisco 33
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
• Leverage parallelization information from master execution:
– Concurrent transactions, which have not blocked each other on the master, are
marked as non-contending in the binary log.
• Meanwhile, at the slave:
– Non-contending transactions are scheduled in parallel;
– Concurrent transactions commit independently, thus no waiting involved.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
• T2 is scheduled to execute
together with T1.
• T3 is scheduled to execute
as soon as T1 finishes.
Tuesday, October 27, 2015
T1
T2
T3
Time
Commit Finishes
Last Lock Acquired
Concurrent Execution History
on the Master
Execution
Commit
T1 and T2 execute in
parallel on the slave.
T2 and T3 execute in
parallel on the slave.
MySQL Central @ Oracle Open World 2015 - San Francisco 35
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
• Supports statement-based or row-based formats.
• Scheduling policy controlled through:
– logical_clock - means schedule based on the locking interval timestamps.
– database - the scheduling policy from 5.6 (concurrency control done per database).
• Work to improve slave scalability continues, does not stop here.
Tuesday, October 27, 2015
mysql> SET slave_parallel_type= [logical_clock|database]
MySQL Central @ Oracle Open World 2015 - San Francisco 36
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved User Threads-Sender Threads Synchronization
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 37
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved User Threads-Sender Threads Synchronization
• Concurrent reads by the sender thread with ongoing writes from user
threads.
– Sender thread does not block user sessions more than necessary.
– Higher throughput for both sender threads and user sessions.
Tuesday, October 27, 2015
Sender Thread Reads Binary Log User Thread Writes to Binary Log
Sender Thread Reads Binary Log
User Thread Writes to Binary Log
pre 5.7.2
5.7.2+
MySQL Central @ Oracle Open World 2015 - San Francisco 38
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Sender Thread
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Sender Thread
Tuesday, October 27, 2015
• Send buffer is not allocated and freed every time an event is sent.
• When sender threads require larger send buffer - buffer grows as needed.
• When buffer is larger than needed - buffer shrinks dynamically.
• Together with the sender thread enhancements released on MySQL 5.7.2:
– increases master scalability;
– reduces resource consumption (CPU);
– Master, with dump threads attached, copes better with peak loads.
MySQL Central @ Oracle Open World 2015 - San Francisco 40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Sender Thread
• Ad hoc microbenchmark using
mysqlslap
• 1M queries, concurrency=200,
commit=1
• N slaves attached (fake slaves using
remote mysqlbinlogs)
• 48 cores HT / 512 GB RAM / HDD
Tuesday, October 27, 2015
0
2000
4000
6000
8000
10000
12000
14000
16000
0 1 5 10 20 30 40 50 100
QpS
Number of Connected Sender Threads
Master’s Throughput
MySQL 5.6.16 MySQL 5.7.4
MySQL Central @ Oracle Open World 2015 - San Francisco 41
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Semi-sync Replication – ACK Receiver Thread
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
ACK
Receiver
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
Sender
thread
MySQL Central @ Oracle Open World 2015 - San Francisco 42
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Semi-sync Replication – ACK Receiver Thread
• Consecutive transactions do not block each other while waiting for ACKs
– Transaction t1 and t2 are sent immediately to the slave by the sender thread
– ACKs are received only by a special thread
– Transaction t2 does not include t1 round trip in its semi-sync overall latency
• Thread starts when semi-sync is activated
• Thread stops when semi-sync is deactivated
Tuesday, October 27, 2015
mysql> SET GLOBAL rpl_semi_sync_master_enabled= ON
mysql> SET GLOBAL rpl_semi_sync_master_enabled= OFF
MySQL Central @ Oracle Open World 2015 - San Francisco 43
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Semi-sync: Durability over the Network
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 44
Orange bar percentage shows the throughput gain (orange) when compared to the corresponding
blue bar. Blue and stacked bars show throughput ratio computed against the best blue bar.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
Dependability
3
Tuesday, October 27, 2015
3.1
3.2
3.3
MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Loss-less Semi-sync Replication
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 46
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Loss-less Semi-sync Replication
Tuesday, October 27, 2015
Master
Slave
T1: INSERT INTO t1 VALUES (1000)
ACK
Time
T2: SELECT * FROM t1; empty set
execute prepare binlog
relay log
commitexecute
MySQL Central @ Oracle Open World 2015 - San Francisco 47
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Loss-less Semi-sync Replication
• Master waits for slave's ACK before committing (as opposed to: master
waits for slave's ACK after committing).
– Therefore, concurrent transactions do not see changes while this transaction waits for
ack.
• Should a master fail, then any transaction that it may have externalized is
also persisted on a slave.
• User can choose between the original semi-sync behavior and the new
one.
Tuesday, October 27, 2015
mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT]
MySQL Central @ Oracle Open World 2015 - San Francisco 48
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Semi-sync Replication – Wait for Multiple ACKs
Tuesday, October 27, 2015
Insert...
Insert...
B
binary log
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 49
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Semi-sync Replication – Wait for Multiple ACKs
• Master does not commit transaction until it receives N ACKs from N slaves.
• Dynamically settable:
Tuesday, October 27, 2015
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N
MySQL Central @ Oracle Open World 2015 - San Francisco 50
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Semi-sync Replication – Wait for Multiple ACKs
• Master does not commit transaction until it receives N ACKs from N slaves.
• Dynamically settable:
Tuesday, October 27, 2015
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N
Master
Slave 2
T1: COMMIT
ACK
Slave 1
ACK
T1: COMMIT
succeeds
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= 2
Slave 3
Time
relay log
relay log
relay log
MySQL Central @ Oracle Open World 2015 - San Francisco 51
ACK
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
Dependability
Flexibility
3
Tuesday, October 27, 2015
3.1
3.2
3.3
3.4
MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Storing Global Transaction Identifiers in a Table
Tuesday, October 27, 2015
Insert...
B
Insert...
relay log
Insert...
A
binary log
Client
Sender
thread
Receiver
thread
Applier
Threads
Receiver
Meta-data
Update
Applier
Meta-data
Update
Network
MySQL Central @ Oracle Open World 2015 - San Francisco 53
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Storing Global Transaction Identifiers in a Table
• Slaves can use GTIDs with binary logs disabled.
– Slaves that are never candidates to become a master can still use GTIDs for auto
positioning.
Use Cases
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 54
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Storing Global Transaction Identifiers in a Table
• GTIDs are saved into a mysql system table (range-compressed).
• GTIDs are inserted into the table as transactions commit.
• A compression thread runs periodically and compresses the table into
ranges.
– New global variable controls the period: gtid_executed_compression_period.
Mechanics
Tuesday, October 27, 2015
CREATE TABLE gtid_executed(
source_uuid CHAR(36) NOT NULL,
interval_start BIGINT NOT NULL,
interval_end BIGINT NOT NULL,
PRIMARY KEY(source_uuid, interval_start)
);
mysql> SET GLOBAL gtid_executed_compression_period= N;(N – number of transactions)
MySQL Central @ Oracle Open World 2015 - San Francisco 55
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Storing Global Transaction Identifiers in a Table
• Binary Log Enabled
– Store GTID in binary log (transactionally).
– Copy GTID set to table on binary log rotation.
• Binary Log Disabled
– Store GTID in table (transactionally).
– New transactions are do not get an automatic GTID assigned.
• Always store GTIDs transactionally.
Mechanics
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 56
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Source Replication
Tuesday, October 27, 2015
S
M M Slave can have more than one master.M M
The need for gathering data in a central server:
• Integrated backup;
• Complex queries for analytics purposes;
• Data HUB for inter-cluster replication.
MySQL Central @ Oracle Open World 2015 - San Francisco 57
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Source Replication
• A server (slave) can replicate from multiple sources (masters).
• Multiple channels (channel: receiver thread, relay logs, applier threads) that
can be stopped started individually.
• Integrated with Multi-threaded Slave (each channel has its own multi-
threaded applier set of threads).
• Integrated with the new P_S tables.
– replication_applier_status_by_coordinator shows multiple entries, one per
channel/source coordinator.
– replication_applier_status_by_worker shows multiple entries, multiple entries per
channel
– replication_connection_status shows multiple entries, one per connection to different
sources.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 58
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Source Replication
• Integrated with GTIDs.
• Integrated with crash-safe tables.
– Progress state is stored in these tables for recoverability purposes.
• Virtually no limit on the number of sources (capped to 256, but can be
changed if server binary is rebuilt).
• Able to manage each source separately.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 59
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
Dependability
Flexibility
Misc
3
Tuesday, October 27, 2015
3.1
3.2
3.3
3.4
3.5
MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
“Smaller”, yet interesting, enhancements!
• Multi-threaded applier is able to retry failed transactions.
• Option to make the Multi-threaded applier preserve commit order.
• SSL options for mysqlbinlog tool.
• Rewrite DB rules for the mysqlbinlog tool.
• Function to wait for transactions to be applied, regardless of the replication stream
they come from.
• Options to track global transaction identifiers in the return packet of the mysql
protocol. Useful for tracking GTID session state and enabler for session consistency.
• Support for XA transactions when the binary log is enabled.
• Change in the defaults. E.g., binlog_format=ROW and sync_binlog=1.
• Options to fine tune the binary log group commit procedure.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 61
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary4
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary
• Replication feature set in MySQL 5.7 shows many improvements:
– Semi-sync is more flexible and faster.
– Less contention on the binary log.
– Slave is faster and provides an inter-transaction parallelization scheme.
– More online reconfiguration: Global Transaction Identifiers, filters, configuration.
– Improved monitoring.
– Even more flexible replication with multi-source enabling new deployment scenarios.
– Enhancements all over: transaction retries, sequential commits, XA support, new
replication functions, security.
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 63
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Where to go from here?
• Packages
– http://dev.mysql.com
– http://labs.mysql.com
• Reference Documentation
– http://dev.mysql.com/doc/#manual
• Blogs from the Engineers (news, quirks, technical information and much
more)
– http://mysqlhighavailability.com
Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 64
MySQL user camp march 11th 2016

More Related Content

What's hot

Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7MySQL Brasil
 
MySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesMySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesShivji Kumar Jha
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMark Swarbrick
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1Ivan Ma
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL ScalabilityRonald Bradford
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013Andrew Morgan
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMiguel Araújo
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialKenny Gryp
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010Kris Buytaert
 
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big Module
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big ModuleUpdating the Salesforce Suite to Drupal 8: Major Changes for a Big Module
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big ModuleAcquia
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMiguel Araújo
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackMatt Lord
 
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?Miguel Araújo
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreAlfranio Júnior
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorialFrederic Descamps
 
Moving Your Oracle Databases To The Oracle Cloud
Moving Your Oracle Databases To The Oracle CloudMoving Your Oracle Databases To The Oracle Cloud
Moving Your Oracle Databases To The Oracle CloudAlex Zaballa
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...Miguel Araújo
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
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 ShellMiguel Araújo
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 

What's hot (20)

Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
 
MySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded SlavesMySQL User Camp: Multi-threaded Slaves
MySQL User Camp: Multi-threaded Slaves
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
 
MySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB ClustersMySQL 8 High Availability with InnoDB Clusters
MySQL 8 High Availability with InnoDB Clusters
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010
 
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big Module
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big ModuleUpdating the Salesforce Suite to Drupal 8: Major Changes for a Big Module
Updating the Salesforce Suite to Drupal 8: Major Changes for a Big Module
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
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?
 
Group Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication CoreGroup Replication: A Journey to the Group Communication Core
Group Replication: A Journey to the Group Communication Core
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
 
Moving Your Oracle Databases To The Oracle Cloud
Moving Your Oracle Databases To The Oracle CloudMoving Your Oracle Databases To The Oracle Cloud
Moving Your Oracle Databases To The Oracle Cloud
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
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 InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 

Viewers also liked

MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterMySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterPar-Tec S.p.A.
 
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 ScalabilityShivji Kumar Jha
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningSeveralnines
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsAndrew Morgan
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityPythian
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterShivji Kumar Jha
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationShivji Kumar Jha
 
MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practicesMat Keep
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - AdapterManoj Kumar
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationNuno Carvalho
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index TuningManikanda kumar
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design PatternAdeel Riaz
 
Oracle my sql cluster cge
Oracle my sql cluster cgeOracle my sql cluster cge
Oracle my sql cluster cgeseungdon1
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 

Viewers also liked (20)

MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterMySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
 
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
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance Tuning
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDs
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL Cluster
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source Replication
 
MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practices
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - Adapter
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Oracle my sql cluster cge
Oracle my sql cluster cgeOracle my sql cluster cge
Oracle my sql cluster cge
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 

Similar to MySQL user camp march 11th 2016

MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News Ted Wennmark
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMario Beck
 
Replication featuresinmysql5.7andbeyond osi-final
Replication featuresinmysql5.7andbeyond osi-finalReplication featuresinmysql5.7andbeyond osi-final
Replication featuresinmysql5.7andbeyond osi-finalSujatha Sivakumar
 
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 MySQLMySQL Brasil
 
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 - jun15MySQL Brasil
 
Oracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterOracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterBenedita Paúl Vasconcelos
 
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 StartupsMySQL Brasil
 
MySQL Tech Tour 2015 - Intro
MySQL Tech Tour 2015 - IntroMySQL Tech Tour 2015 - Intro
MySQL Tech Tour 2015 - IntroMark Swarbrick
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4Frazer Clement
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsAndrew Morgan
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivanIvan Tu
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document StoreTed Wennmark
 
MySQL London Tech Tour March 2015 - Whats New
MySQL London Tech Tour March 2015 - Whats NewMySQL London Tech Tour March 2015 - Whats New
MySQL London Tech Tour March 2015 - Whats NewMark Swarbrick
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility SolutionsMark Swarbrick
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQLMySQL Brasil
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesGuatemala User Group
 
Netherlands Tech Tour 03 - MySQL Cluster
Netherlands Tech Tour 03 -   MySQL ClusterNetherlands Tech Tour 03 -   MySQL Cluster
Netherlands Tech Tour 03 - MySQL ClusterMark 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.0Olivier DASINI
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!Miguel Araújo
 

Similar to MySQL user camp march 11th 2016 (20)

MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
 
Replication featuresinmysql5.7andbeyond osi-final
Replication featuresinmysql5.7andbeyond osi-finalReplication featuresinmysql5.7andbeyond osi-final
Replication featuresinmysql5.7andbeyond osi-final
 
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 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
 
Oracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterOracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL Cluster
 
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 Tech Tour 2015 - Intro
MySQL Tech Tour 2015 - IntroMySQL Tech Tour 2015 - Intro
MySQL Tech Tour 2015 - Intro
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar charts
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
MySQL London Tech Tour March 2015 - Whats New
MySQL London Tech Tour March 2015 - Whats NewMySQL London Tech Tour March 2015 - Whats New
MySQL London Tech Tour March 2015 - Whats New
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQL
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
 
Netherlands Tech Tour 03 - MySQL Cluster
Netherlands Tech Tour 03 -   MySQL ClusterNetherlands Tech Tour 03 -   MySQL Cluster
Netherlands Tech Tour 03 - MySQL Cluster
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
 

Recently uploaded

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

MySQL user camp march 11th 2016

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco An Overview of the New Replication Features in MySQL 5.7 Presentation by Venkatesh Duggirala (venkatesh.duggiral@oracle.com) Senior Principal Member Technical Staff Slides prepared by Luís Soares (luis.soares@oracle.com) Principal Software Engineer, MySQL Replication Team Lead 1
  • 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. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Background Celebrating MySQL 5.7 Replication The New Replication Features in MySQL 5.7 Summary 1 2 3 4 Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Celebrating MySQL 5.7 Replication GA ready! 1 Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Interesting Stats Related to MySQL 5.7 • 40 replication worklogs pushed to MySQL 5.7 – 29 related to on MySQL replication Core – 11 related to MySQL Group Replication. • 8 contributions merged into MySQL 5.7. • 19 major enhancements to the replication core. • 14 refactoring and modularization related changes to the code. • 1 entirely new out-of-core replication plugin: MySQL Group Replication. – Still on labs, but exhibiting a rapid release rate. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thank You! • After two and half years baking the team is very happy to share the outcome with you! – We did it for you! • Thank you for being part of it! • Enjoy MySQL 5.7, in particular the replication features! ;) Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background2 Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background: Replication Components Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background: Replication Components • Binary Log – File based logical log that records the changes on the master. – Statement or Row based format (may be intermixed). – Each transaction is split into groups of events. – Control events: Rotate, Format Description, Gtid, ... Tuesday, October 27, 2015 Layout of a Binary Log File BEGIN ...E1 E2 COMMIT BEGIN ...E1 E2 COMMIT MySQL Central @ Oracle Open World 2015 - San Francisco 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | M S S S S M write clients read clients read clients write clients More reads? More slaves! Read scale-out Background: What is Replication Used For? Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | M M? write clients write clients More writes? More Masters? M? M? MySQL Fabric helps sharding your data with MySQL... What about write scale-out? Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | C B A C B ACrash C B A B is the new master Uh Oh! Whew! Redundancy: If master crashes, promote slave to master Background: What is Replication Used For? Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 13
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | M S write clients business intelligent client applications reporting client applications big queries client applications On-line Backup and Reporting Background: What is Replication Used For? Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CB BA AC Image from www.ginkgomaps.com Background: What is Replication Used For? Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 15
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.73 Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online 3 Tuesday, October 27, 2015 3.1 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Global Transaction Identifiers Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 18
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Global Transaction Identifiers • The procedure is online. – Both reads and writes are allowed while global transaction identifiers are being turned on or off in the entire replication cluster. • No need to synchronize servers, ever. • No need to restart servers. • No need to change replication topology. – Works in arbitrary topologies. • Should anything happen in the middle of the procedure, you can always roll back. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Global Transaction Identifiers • Over simplified procedure to turn on global transaction identifiers: • Details: http://dev.mysql.com/doc/refman/5.7/en/replication-mode- change-online-enable-gtids.html Tuesday, October 27, 2015 1) SET @@GLOBAL.GTID_MODE = OFF_PERMISSIVE; (on every server) 2) SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE; (on every server) 3) wait for a bit longer than your replication lag 4) SET @@GLOBAL.GTID_MODE = ON; (on every server) MySQL Central @ Oracle Open World 2015 - San Francisco 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Filters Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Filters • Change Slave's Replication Filters dynamically. – No need to stop and restart the slave server for setting new replication filtering rules. – All slave filters are supported. – Values can be input in various character sets. Tuesday, October 27, 2015 mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2) MySQL Central @ Oracle Open World 2015 - San Francisco 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Receiver/Applier Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Change master from A to B without stopping the applier threads. Online Reconfiguration of Replication Receiver/Applier Tuesday, October 27, 2015 C B A C B ACrash C B A B is the new master Uh Oh! Whew! MySQL Central @ Oracle Open World 2015 - San Francisco 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Change master from A to B without stopping the applier threads. Online Reconfiguration of Replication Receiver/Applier Tuesday, October 27, 2015 C B A C B ACrash C B A Uh Oh! Whew! DBA did not need C to stop applying its relay log to change C's master from A to B. MySQL Central @ Oracle Open World 2015 - San Francisco 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Receiver/Applier • Enables more online operations during fail-over: • Stopping, changing master and restarting the receiver thread are all done while the applier thread is running. • Change applier properties while the receiver thread is working: Tuesday, October 27, 2015 mysql> STOP SLAVE IO_THREAD; mysql> CHANGE MASTER TO MASTER_HOST='master2', …; mysql> START SLAVE IO_THREAD; mysql> STOP SLAVE SQL_THREAD; mysql> CHANGE MASTER TO MASTER_DELAY=3600, …; mysql> START SLAVE SQL_THREAD; MySQL Central @ Oracle Open World 2015 - San Francisco 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 27 DBA
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring • Monitoring through SQL. • Logically unrelated information into different places. • Extensible, can be adapted to new features. • More accurate and consistent identifier names. • Master-slave, Multi-source, Group Replication support. Performance Schema Replication Tables Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Tuesday, October 27, 2015 Connection Configuration Connection Status Applier Configuration Applier Status (Slave) Receiver and Applier Status Applier / Coordinator Status Workers Status MySQL Central @ Oracle Open World 2015 - San Francisco 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Tuesday, October 27, 2015 mysql> select * from performance_schema.replication_applier_status_by_workerG *************************** 1. row *************************** CHANNEL_NAME: WORKER_ID: 1 THREAD_ID: 35 SERVICE_STATE: ON LAST_SEEN_TRANSACTION: 4ba0eb86-63c3-11e4-92ba-28b2bd168d07:2368 LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 *************************** 2. row *************************** CHANNEL_NAME: WORKER_ID: 2 THREAD_ID: 36 SERVICE_STATE: ON LAST_SEEN_TRANSACTION: 4ba0eb86-63c3-11e4-92ba-28b2bd168d07:2367 LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 2 rows in set (0,00 sec) MySQL Central @ Oracle Open World 2015 - San Francisco 30
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance 3 Tuesday, October 27, 2015 3.1 3.2 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 32
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism Tuesday, October 27, 2015 Single Threaded Apply 8 Threads Applier 24 Threads Applier 48 Threads Applier 96 Threads Applier 0% 50% 100% 150% 200% 250% Fast and Scalable Multi-threaded Replication Applier (statement-based replication, durable settings, SSD storage) Slaveapplytime (SysbenchRWonthemasterwith96threads=100%) 10X MySQL Central @ Oracle Open World 2015 - San Francisco 33
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism • Leverage parallelization information from master execution: – Concurrent transactions, which have not blocked each other on the master, are marked as non-contending in the binary log. • Meanwhile, at the slave: – Non-contending transactions are scheduled in parallel; – Concurrent transactions commit independently, thus no waiting involved. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 34
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism • T2 is scheduled to execute together with T1. • T3 is scheduled to execute as soon as T1 finishes. Tuesday, October 27, 2015 T1 T2 T3 Time Commit Finishes Last Lock Acquired Concurrent Execution History on the Master Execution Commit T1 and T2 execute in parallel on the slave. T2 and T3 execute in parallel on the slave. MySQL Central @ Oracle Open World 2015 - San Francisco 35
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism • Supports statement-based or row-based formats. • Scheduling policy controlled through: – logical_clock - means schedule based on the locking interval timestamps. – database - the scheduling policy from 5.6 (concurrency control done per database). • Work to improve slave scalability continues, does not stop here. Tuesday, October 27, 2015 mysql> SET slave_parallel_type= [logical_clock|database] MySQL Central @ Oracle Open World 2015 - San Francisco 36
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved User Threads-Sender Threads Synchronization Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 37
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved User Threads-Sender Threads Synchronization • Concurrent reads by the sender thread with ongoing writes from user threads. – Sender thread does not block user sessions more than necessary. – Higher throughput for both sender threads and user sessions. Tuesday, October 27, 2015 Sender Thread Reads Binary Log User Thread Writes to Binary Log Sender Thread Reads Binary Log User Thread Writes to Binary Log pre 5.7.2 5.7.2+ MySQL Central @ Oracle Open World 2015 - San Francisco 38
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Sender Thread Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Sender Thread Tuesday, October 27, 2015 • Send buffer is not allocated and freed every time an event is sent. • When sender threads require larger send buffer - buffer grows as needed. • When buffer is larger than needed - buffer shrinks dynamically. • Together with the sender thread enhancements released on MySQL 5.7.2: – increases master scalability; – reduces resource consumption (CPU); – Master, with dump threads attached, copes better with peak loads. MySQL Central @ Oracle Open World 2015 - San Francisco 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Sender Thread • Ad hoc microbenchmark using mysqlslap • 1M queries, concurrency=200, commit=1 • N slaves attached (fake slaves using remote mysqlbinlogs) • 48 cores HT / 512 GB RAM / HDD Tuesday, October 27, 2015 0 2000 4000 6000 8000 10000 12000 14000 16000 0 1 5 10 20 30 40 50 100 QpS Number of Connected Sender Threads Master’s Throughput MySQL 5.6.16 MySQL 5.7.4 MySQL Central @ Oracle Open World 2015 - San Francisco 41
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Semi-sync Replication – ACK Receiver Thread Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client ACK Receiver thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network Sender thread MySQL Central @ Oracle Open World 2015 - San Francisco 42
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Semi-sync Replication – ACK Receiver Thread • Consecutive transactions do not block each other while waiting for ACKs – Transaction t1 and t2 are sent immediately to the slave by the sender thread – ACKs are received only by a special thread – Transaction t2 does not include t1 round trip in its semi-sync overall latency • Thread starts when semi-sync is activated • Thread stops when semi-sync is deactivated Tuesday, October 27, 2015 mysql> SET GLOBAL rpl_semi_sync_master_enabled= ON mysql> SET GLOBAL rpl_semi_sync_master_enabled= OFF MySQL Central @ Oracle Open World 2015 - San Francisco 43
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Semi-sync: Durability over the Network Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 44 Orange bar percentage shows the throughput gain (orange) when compared to the corresponding blue bar. Blue and stacked bars show throughput ratio computed against the best blue bar.
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability 3 Tuesday, October 27, 2015 3.1 3.2 3.3 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Loss-less Semi-sync Replication Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 46
  • 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Loss-less Semi-sync Replication Tuesday, October 27, 2015 Master Slave T1: INSERT INTO t1 VALUES (1000) ACK Time T2: SELECT * FROM t1; empty set execute prepare binlog relay log commitexecute MySQL Central @ Oracle Open World 2015 - San Francisco 47
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Loss-less Semi-sync Replication • Master waits for slave's ACK before committing (as opposed to: master waits for slave's ACK after committing). – Therefore, concurrent transactions do not see changes while this transaction waits for ack. • Should a master fail, then any transaction that it may have externalized is also persisted on a slave. • User can choose between the original semi-sync behavior and the new one. Tuesday, October 27, 2015 mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT] MySQL Central @ Oracle Open World 2015 - San Francisco 48
  • 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Semi-sync Replication – Wait for Multiple ACKs Tuesday, October 27, 2015 Insert... Insert... B binary log Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 49
  • 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Semi-sync Replication – Wait for Multiple ACKs • Master does not commit transaction until it receives N ACKs from N slaves. • Dynamically settable: Tuesday, October 27, 2015 mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N MySQL Central @ Oracle Open World 2015 - San Francisco 50
  • 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Semi-sync Replication – Wait for Multiple ACKs • Master does not commit transaction until it receives N ACKs from N slaves. • Dynamically settable: Tuesday, October 27, 2015 mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N Master Slave 2 T1: COMMIT ACK Slave 1 ACK T1: COMMIT succeeds mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= 2 Slave 3 Time relay log relay log relay log MySQL Central @ Oracle Open World 2015 - San Francisco 51 ACK
  • 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability Flexibility 3 Tuesday, October 27, 2015 3.1 3.2 3.3 3.4 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 53. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Storing Global Transaction Identifiers in a Table Tuesday, October 27, 2015 Insert... B Insert... relay log Insert... A binary log Client Sender thread Receiver thread Applier Threads Receiver Meta-data Update Applier Meta-data Update Network MySQL Central @ Oracle Open World 2015 - San Francisco 53
  • 54. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Storing Global Transaction Identifiers in a Table • Slaves can use GTIDs with binary logs disabled. – Slaves that are never candidates to become a master can still use GTIDs for auto positioning. Use Cases Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 54
  • 55. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Storing Global Transaction Identifiers in a Table • GTIDs are saved into a mysql system table (range-compressed). • GTIDs are inserted into the table as transactions commit. • A compression thread runs periodically and compresses the table into ranges. – New global variable controls the period: gtid_executed_compression_period. Mechanics Tuesday, October 27, 2015 CREATE TABLE gtid_executed( source_uuid CHAR(36) NOT NULL, interval_start BIGINT NOT NULL, interval_end BIGINT NOT NULL, PRIMARY KEY(source_uuid, interval_start) ); mysql> SET GLOBAL gtid_executed_compression_period= N;(N – number of transactions) MySQL Central @ Oracle Open World 2015 - San Francisco 55
  • 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Storing Global Transaction Identifiers in a Table • Binary Log Enabled – Store GTID in binary log (transactionally). – Copy GTID set to table on binary log rotation. • Binary Log Disabled – Store GTID in table (transactionally). – New transactions are do not get an automatic GTID assigned. • Always store GTIDs transactionally. Mechanics Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 56
  • 57. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Source Replication Tuesday, October 27, 2015 S M M Slave can have more than one master.M M The need for gathering data in a central server: • Integrated backup; • Complex queries for analytics purposes; • Data HUB for inter-cluster replication. MySQL Central @ Oracle Open World 2015 - San Francisco 57
  • 58. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Source Replication • A server (slave) can replicate from multiple sources (masters). • Multiple channels (channel: receiver thread, relay logs, applier threads) that can be stopped started individually. • Integrated with Multi-threaded Slave (each channel has its own multi- threaded applier set of threads). • Integrated with the new P_S tables. – replication_applier_status_by_coordinator shows multiple entries, one per channel/source coordinator. – replication_applier_status_by_worker shows multiple entries, multiple entries per channel – replication_connection_status shows multiple entries, one per connection to different sources. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 58
  • 59. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Source Replication • Integrated with GTIDs. • Integrated with crash-safe tables. – Progress state is stored in these tables for recoverability purposes. • Virtually no limit on the number of sources (capped to 256, but can be changed if server binary is rebuilt). • Able to manage each source separately. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 59
  • 60. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability Flexibility Misc 3 Tuesday, October 27, 2015 3.1 3.2 3.3 3.4 3.5 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | “Smaller”, yet interesting, enhancements! • Multi-threaded applier is able to retry failed transactions. • Option to make the Multi-threaded applier preserve commit order. • SSL options for mysqlbinlog tool. • Rewrite DB rules for the mysqlbinlog tool. • Function to wait for transactions to be applied, regardless of the replication stream they come from. • Options to track global transaction identifiers in the return packet of the mysql protocol. Useful for tracking GTID session state and enabler for session consistency. • Support for XA transactions when the binary log is enabled. • Change in the defaults. E.g., binlog_format=ROW and sync_binlog=1. • Options to fine tune the binary log group commit procedure. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 61
  • 62. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary4 Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco
  • 63. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary • Replication feature set in MySQL 5.7 shows many improvements: – Semi-sync is more flexible and faster. – Less contention on the binary log. – Slave is faster and provides an inter-transaction parallelization scheme. – More online reconfiguration: Global Transaction Identifiers, filters, configuration. – Improved monitoring. – Even more flexible replication with multi-source enabling new deployment scenarios. – Enhancements all over: transaction retries, sequential commits, XA support, new replication functions, security. Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 63
  • 64. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Where to go from here? • Packages – http://dev.mysql.com – http://labs.mysql.com • Reference Documentation – http://dev.mysql.com/doc/#manual • Blogs from the Engineers (news, quirks, technical information and much more) – http://mysqlhighavailability.com Tuesday, October 27, 2015 MySQL Central @ Oracle Open World 2015 - San Francisco 64