SlideShare ist ein Scribd-Unternehmen logo
1 von 75
Downloaden Sie, um offline zu lesen
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Friday, November 20, 2015 OSI - Bangalore
An Overview of the New Replication
Features in MySQL 5.7 and Beyond
Sujatha Sivakumar (sujatha.sivakumar@oracle.com)
Software Engineer, MySQL Server Sustaining Team
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.
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Friday, November 20, 2015 OSI - Bangalore
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
Development Sneak Peek
Roadmap
Summary
1
2
3
4
5
Friday, November 20, 2015 OSI - Bangalore
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Celebrating MySQL 5.7 Replication
GA ready!
1
Friday, November 20, 2015 OSI - Bangalore
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! ;)
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background2
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Background: Replication Components
Friday, November 20, 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
OSI - Bangalore
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, ...
Friday, November 20, 2015
Layout of a
Binary Log File
BEGIN ...E1 E2 COMMIT BEGIN ...E1 E2 COMMIT
OSI - Bangalore
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?
Friday, November 20, 2015 OSI - Bangalore
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?
Friday, November 20, 2015 OSI - Bangalore
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?
Friday, November 20, 2015 OSI - Bangalore
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?
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CB
BA
AC
Image from
www.ginkgomaps.com
Background: What is Replication Used For?
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.73
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
3
Friday, November 20, 2015
3.1
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Global Transaction Identifiers
Friday, November 20, 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
OSI - Bangalore
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.
Friday, November 20, 2015 OSI - Bangalore
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
Friday, November 20, 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)
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Filters
Friday, November 20, 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
OSI - Bangalore
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.
Friday, November 20, 2015
mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2)
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Online Reconfiguration of Replication Receiver/Applier
Friday, November 20, 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
OSI - Bangalore
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
Friday, November 20, 2015
C
B
A
C
B
ACrash
C
B
A
B is the
new master
Uh Oh! Whew!
OSI - Bangalore
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
Friday, November 20, 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.
OSI - Bangalore
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:
Friday, November 20, 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;
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Friday, November 20, 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
OSI - Bangalore
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
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Friday, November 20, 2015
Connection
Configuration
Connection
Status
Applier
Configuration
Applier
Status
(Slave) Receiver and Applier Status
Applier / Coordinator
Status
Workers
Status
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Replication Monitoring
Friday, November 20, 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)
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
3
Friday, November 20, 2015
3.1
3.2
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
Friday, November 20, 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
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved Applier Throughput – Locking-based Parallelism
Friday, November 20, 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
OSI - Bangalore
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.
Friday, November 20, 2015 OSI - Bangalore
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.
Friday, November 20, 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.
OSI - Bangalore
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.
Friday, November 20, 2015
mysql> SET slave_parallel_type= [logical_clock|database]
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved User Threads-Sender Threads Synchronization
Friday, November 20, 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
OSI - Bangalore
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.
Friday, November 20, 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+
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Sender Thread
Friday, November 20, 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
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Sender Thread
Friday, November 20, 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.
OSI - Bangalore
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
Friday, November 20, 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
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Semi-sync Replication – ACK Receiver Thread
Friday, November 20, 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
OSI - Bangalore
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
Friday, November 20, 2015
mysql> SET GLOBAL rpl_semi_sync_master_enabled= ON
mysql> SET GLOBAL rpl_semi_sync_master_enabled= OFF
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Faster Semi-sync: Durability over the Network
Friday, November 20, 2015 OSI - Bangalore
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
Friday, November 20, 2015
3.1
3.2
3.3
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Loss-less Semi-sync Replication
Friday, November 20, 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
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Loss-less Semi-sync Replication
Friday, November 20, 2015
Master
Slave
T1: INSERT INTO t1 VALUES (1000)
ACK
Time
T2: SELECT * FROM t1; empty set
execute prepare binlog
relay log
commitexecute
OSI - Bangalore
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.
Friday, November 20, 2015
mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT]
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Semi-sync Replication – Wait for Multiple ACKs
Friday, November 20, 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
OSI - Bangalore
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:
Friday, November 20, 2015
mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N
OSI - Bangalore
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:
Friday, November 20, 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
OSI - Bangalore
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
Friday, November 20, 2015
3.1
3.2
3.3
3.4
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Storing Global Transaction Identifiers in a Table
Friday, November 20, 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
OSI - Bangalore
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
Friday, November 20, 2015 OSI - Bangalore
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
Friday, November 20, 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)
OSI - Bangalore
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
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multi-Source Replication
Friday, November 20, 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.
OSI - Bangalore
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.
Friday, November 20, 2015 OSI - Bangalore
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.
Friday, November 20, 2015 OSI - Bangalore
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
Friday, November 20, 2015
3.1
3.2
3.3
3.4
3.5
OSI - Bangalore
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.
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
The New Replication Features in MySQL 5.7
Usability / Online
Performance
Dependability
Flexibility
Misc
Other Components Working with Replication
3
Friday, November 20, 2015
3.1
3.2
3.3
3.4
3.5
OSI - Bangalore
3.6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
• Motivation
– The need for transparent integration with Fabric.
• No need to upgrade existing connectors.
• Use Fabric with connectors that do not support it
(e.g., PHP, Ruby, Perl, C).
– The need for read-write and read-only automatic
routing.
• Do not need to know which server is the master.
• Transparent fail-over support for a new master.
• End Result
– Generic and versatile framework: MySQL Router.
Friday, November 20, 2015 OSI - Bangalore
NEW
M
Router
App
M M
MySQL
Fabric
GA
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Router
• Highlights
– High Performance
– Plugin Driven Architecture
– Simple to setup, configure and deploy.
• Features
– Connection routing and simple load balancing.
– Seamless fail-over based on Fabric HA Groups.
– Fail-over without Fabric (needs 3rd party tool to
handle fail-over itself).
Friday, November 20, 2015 OSI - Bangalore
M
Router
App
M M
MySQL
Fabric
NEW
GA
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Development Sneak Peek4
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication Plugin
Friday, November 20, 2015
M M M M M
Replication Group
• Multi-master update everywhere
• Automatic group membership
management and failure detection.
• No need for server fail-over.
• Automatic reconfiguration.
• No single point of failure.
• Shared-nothing state machine
replication.
• InnoDB compliant. Off-the-shelf
hardware friendly.
OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication Plugin
• Great technology for deployments where elasticity is a requirement, such
as cloud based infrastructures.
– Integrated with the server core through a well defined API.
– It is integrated with GTIDs, row based replication.
– It is integrated with performance schema tables.
– It is elastic and self-healing: adding or removing servers does not need human
intervention.
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Strong development cycles and continuous community engagement
through regular and frequent releases on labs.mysql.com.
MySQL Group Replication Plugin
Friday, November 20, 2015 OSI - Bangalore
2014-Sep-29
Labs release: 0.2.0
2015-Apr-06
Labs release: 0.3.0
2014-Aug-06
Labs release: 0.4.0
2015-Sep-14
Labs release: 0.5.0
Introduces standalone plugin,
with its own release cycle!
2015-Oct-26
Labs release: 0.6.0
Multi-platform, No need for
Corosync.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication Plugin
• With MySQL Group Replication for 5.7.9 we introduce a new group
communication engine.
– Corosync is not needed anymore.
– All pieces are integrated and is now easier to build, install and use.
– Plugin now builds on multiple platforms: Linux, Solaris, FreeBSD, OSX and Windows.
– Cloud friendly transport – TCP transport.
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Roadmap5
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is Next?
• MySQL Group Replication
– Rapid releases.
– Improve performance, stability and usability.
• MySQL Replication Usability
– Instrument even more replication and extend replication P_S tables
– Simpler administrative commands, more online operations
• MySQL Replication Performance
– Continue to improve replication stream multi-threaded (slave) applier
– Continue to improve replication stream pipeline performance and efficiency
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary6
Friday, November 20, 2015 OSI - Bangalore
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.
• Lab releases provide a sneak peek at what is coming - a new replication plugin and
exciting new infrastructure: MySQL Group Replication and MySQL Router.
Friday, November 20, 2015 OSI - Bangalore
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
Friday, November 20, 2015 OSI - Bangalore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Other Interesting Presentations From Us …
• Topic: Optimizer Enhancements and JSON Support in MySQL 5.7
 Time: 12:30 to 1.15 PM
 Speaker: Sree Harsha
• Topic: State of the Dolphin
 Time: 2.15 to 3.00 PM
 Speaker: Sanjay Manwani
• Topic: Security and Performance – out of the box in MySQL 5.7
 Time: 3:15 to 4:00 PM
 Speaker: Nitin Mehta and Mayank Prasad
Friday, November 20, 2015 OSI - Bangalore
Replication featuresinmysql5.7andbeyond osi-final

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL ClusterAbel Flórez
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMark Leith
 
MySQL 8.0 - Security Features
MySQL 8.0 - Security FeaturesMySQL 8.0 - Security Features
MySQL 8.0 - Security FeaturesHarin Vadodaria
 
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...vasuballa
 
Oracle my sql cluster cge
Oracle my sql cluster cgeOracle my sql cluster cge
Oracle my sql cluster cgeseungdon1
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...Trivadis
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONMario Beck
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0Ståle Deraas
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreAbel Flórez
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19cMaria Colgan
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorMark Leith
 
Ground Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseGround Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseMaria Colgan
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cMaria Colgan
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...Sandesh Rao
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance TestingMaris Elsins
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015Mario Beck
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise MonitorMario Beck
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at OracleSandesh Rao
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)pasalapudi123
 

Was ist angesagt? (20)

Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
 
MySQL 8.0 - Security Features
MySQL 8.0 - Security FeaturesMySQL 8.0 - Security Features
MySQL 8.0 - Security Features
 
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...
OOW16 - Oracle Enterprise Manager 13c Cloud Control for Managing Oracle E-Bus...
 
Oracle my sql cluster cge
Oracle my sql cluster cgeOracle my sql cluster cge
Oracle my sql cluster cge
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise Monitor
 
Ground Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseGround Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous Database
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12c
 
MySQL Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
 
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at Oracle
 
Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)Getting optimal performance from oracle e business suite(aioug aug2015)
Getting optimal performance from oracle e business suite(aioug aug2015)
 

Andere mochten auch

How does a pocket watch work
How does a pocket watch workHow does a pocket watch work
How does a pocket watch workorientwatch01
 
у віночок кобзареві
у віночок кобзаревіу віночок кобзареві
у віночок кобзаревіPolinaMokrushina
 
My presentation at N.P.T.I
My presentation at N.P.T.IMy presentation at N.P.T.I
My presentation at N.P.T.ISantosh Singh
 
Tracfone LG 840g
Tracfone LG 840g Tracfone LG 840g
Tracfone LG 840g bestprep11
 
Jeeberella's Craft Castle - what does it do?
Jeeberella's Craft Castle - what does it do?Jeeberella's Craft Castle - what does it do?
Jeeberella's Craft Castle - what does it do?Natasha Tideswell
 
Jeeberella's Craft Castle - Product presentation
Jeeberella's Craft Castle - Product presentationJeeberella's Craft Castle - Product presentation
Jeeberella's Craft Castle - Product presentationNatasha Tideswell
 
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca Davies
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca DaviesImplementing analytics - Rob Wyn Jones, Shri Footring and Rebecca Davies
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca DaviesJisc
 

Andere mochten auch (14)

How does a pocket watch work
How does a pocket watch workHow does a pocket watch work
How does a pocket watch work
 
WOCA
WOCAWOCA
WOCA
 
у віночок кобзареві
у віночок кобзаревіу віночок кобзареві
у віночок кобзареві
 
My presentation at N.P.T.I
My presentation at N.P.T.IMy presentation at N.P.T.I
My presentation at N.P.T.I
 
Other Achievements
Other AchievementsOther Achievements
Other Achievements
 
Cepheus Group 2012 French
Cepheus Group 2012 FrenchCepheus Group 2012 French
Cepheus Group 2012 French
 
Tracfone LG 840g
Tracfone LG 840g Tracfone LG 840g
Tracfone LG 840g
 
україна єдина
україна єдинаукраїна єдина
україна єдина
 
Medical Insurance Concept's
Medical Insurance Concept'sMedical Insurance Concept's
Medical Insurance Concept's
 
presentation lin enc
presentation lin encpresentation lin enc
presentation lin enc
 
Jeeberella's Craft Castle - what does it do?
Jeeberella's Craft Castle - what does it do?Jeeberella's Craft Castle - what does it do?
Jeeberella's Craft Castle - what does it do?
 
Jeeberella's Craft Castle - Product presentation
Jeeberella's Craft Castle - Product presentationJeeberella's Craft Castle - Product presentation
Jeeberella's Craft Castle - Product presentation
 
Zya00577
Zya00577Zya00577
Zya00577
 
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca Davies
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca DaviesImplementing analytics - Rob Wyn Jones, Shri Footring and Rebecca Davies
Implementing analytics - Rob Wyn Jones, Shri Footring and Rebecca Davies
 

Ähnlich wie Replication featuresinmysql5.7andbeyond osi-final

MySQL Tech Tour 2015 - 5.7 Replication
MySQL Tech Tour 2015 - 5.7 ReplicationMySQL Tech Tour 2015 - 5.7 Replication
MySQL Tech Tour 2015 - 5.7 ReplicationMark Swarbrick
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News Ted Wennmark
 
MySQL Manchester TT - Replication Features
MySQL Manchester TT  - Replication FeaturesMySQL Manchester TT  - Replication Features
MySQL Manchester TT - Replication FeaturesMark Swarbrick
 
2 ivan ma-mysql複製的演進和應用-twn- v1
2 ivan ma-mysql複製的演進和應用-twn- v12 ivan ma-mysql複製的演進和應用-twn- v1
2 ivan ma-mysql複製的演進和應用-twn- v1Ivan Tu
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamLuís Soares
 
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
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...GeneXus
 
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
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivanIvan Tu
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)Miguel Araújo
 
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
 
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
 
Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxSufyaan Kazi
 
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 Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMark Swarbrick
 
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...Extra Technology
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Ivan Ma
 

Ähnlich wie Replication featuresinmysql5.7andbeyond osi-final (20)

MySQL Tech Tour 2015 - 5.7 Replication
MySQL Tech Tour 2015 - 5.7 ReplicationMySQL Tech Tour 2015 - 5.7 Replication
MySQL Tech Tour 2015 - 5.7 Replication
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
MySQL user camp march 11th 2016
MySQL user camp march 11th 2016MySQL user camp march 11th 2016
MySQL user camp march 11th 2016
 
MySQL Manchester TT - Replication Features
MySQL Manchester TT  - Replication FeaturesMySQL Manchester TT  - Replication Features
MySQL Manchester TT - Replication Features
 
2 ivan ma-mysql複製的演進和應用-twn- v1
2 ivan ma-mysql複製的演進和應用-twn- v12 ivan ma-mysql複製的演進和應用-twn- v1
2 ivan ma-mysql複製的演進和應用-twn- v1
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change Stream
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDs
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
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
 
1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan1 my sql20151219-kaji_ivan
1 my sql20151219-kaji_ivan
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
 
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
 
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
 
Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptx
 
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 Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt Intro
 
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...
Running Database Jobs with CA 7 and the CA Workload Automation Agent for Data...
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 

Kürzlich hochgeladen

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Kürzlich hochgeladen (20)

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

Replication featuresinmysql5.7andbeyond osi-final

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Friday, November 20, 2015 OSI - Bangalore An Overview of the New Replication Features in MySQL 5.7 and Beyond Sujatha Sivakumar (sujatha.sivakumar@oracle.com) Software Engineer, MySQL Server Sustaining Team
  • 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. Friday, November 20, 2015 OSI - Bangalore
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Friday, November 20, 2015 OSI - Bangalore
  • 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 Development Sneak Peek Roadmap Summary 1 2 3 4 5 Friday, November 20, 2015 OSI - Bangalore 6
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Celebrating MySQL 5.7 Replication GA ready! 1 Friday, November 20, 2015 OSI - Bangalore
  • 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! ;) Friday, November 20, 2015 OSI - Bangalore
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background2 Friday, November 20, 2015 OSI - Bangalore
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Background: Replication Components Friday, November 20, 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 OSI - Bangalore
  • 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, ... Friday, November 20, 2015 Layout of a Binary Log File BEGIN ...E1 E2 COMMIT BEGIN ...E1 E2 COMMIT OSI - Bangalore
  • 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? Friday, November 20, 2015 OSI - Bangalore
  • 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? Friday, November 20, 2015 OSI - Bangalore
  • 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? Friday, November 20, 2015 OSI - Bangalore
  • 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? Friday, November 20, 2015 OSI - Bangalore
  • 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? Friday, November 20, 2015 OSI - Bangalore
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.73 Friday, November 20, 2015 OSI - Bangalore
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online 3 Friday, November 20, 2015 3.1 OSI - Bangalore
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Global Transaction Identifiers Friday, November 20, 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 OSI - Bangalore
  • 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. Friday, November 20, 2015 OSI - Bangalore
  • 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 Friday, November 20, 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) OSI - Bangalore
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Filters Friday, November 20, 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 OSI - Bangalore
  • 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. Friday, November 20, 2015 mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB= (db1, db2) OSI - Bangalore
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Online Reconfiguration of Replication Receiver/Applier Friday, November 20, 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 OSI - Bangalore
  • 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 Friday, November 20, 2015 C B A C B ACrash C B A B is the new master Uh Oh! Whew! OSI - Bangalore
  • 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 Friday, November 20, 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. OSI - Bangalore
  • 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: Friday, November 20, 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; OSI - Bangalore
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Friday, November 20, 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 OSI - Bangalore DBA
  • 27. 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 Friday, November 20, 2015 OSI - Bangalore
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Friday, November 20, 2015 Connection Configuration Connection Status Applier Configuration Applier Status (Slave) Receiver and Applier Status Applier / Coordinator Status Workers Status OSI - Bangalore
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Replication Monitoring Friday, November 20, 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) OSI - Bangalore
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance 3 Friday, November 20, 2015 3.1 3.2 OSI - Bangalore
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism Friday, November 20, 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 OSI - Bangalore
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved Applier Throughput – Locking-based Parallelism Friday, November 20, 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 OSI - Bangalore
  • 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. Friday, November 20, 2015 OSI - Bangalore
  • 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. Friday, November 20, 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. OSI - Bangalore
  • 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. Friday, November 20, 2015 mysql> SET slave_parallel_type= [logical_clock|database] OSI - Bangalore
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved User Threads-Sender Threads Synchronization Friday, November 20, 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 OSI - Bangalore
  • 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. Friday, November 20, 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+ OSI - Bangalore
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Sender Thread Friday, November 20, 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 OSI - Bangalore
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Sender Thread Friday, November 20, 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. OSI - Bangalore
  • 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 Friday, November 20, 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 OSI - Bangalore
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Semi-sync Replication – ACK Receiver Thread Friday, November 20, 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 OSI - Bangalore
  • 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 Friday, November 20, 2015 mysql> SET GLOBAL rpl_semi_sync_master_enabled= ON mysql> SET GLOBAL rpl_semi_sync_master_enabled= OFF OSI - Bangalore
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Faster Semi-sync: Durability over the Network Friday, November 20, 2015 OSI - Bangalore 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.
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability 3 Friday, November 20, 2015 3.1 3.2 3.3 OSI - Bangalore
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Loss-less Semi-sync Replication Friday, November 20, 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 OSI - Bangalore
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Loss-less Semi-sync Replication Friday, November 20, 2015 Master Slave T1: INSERT INTO t1 VALUES (1000) ACK Time T2: SELECT * FROM t1; empty set execute prepare binlog relay log commitexecute OSI - Bangalore
  • 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. Friday, November 20, 2015 mysql> SET rpl_semi_sync_master_wait_point= [AFTER_SYNC|AFTER_COMMIT] OSI - Bangalore
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Semi-sync Replication – Wait for Multiple ACKs Friday, November 20, 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 OSI - Bangalore
  • 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: Friday, November 20, 2015 mysql> SET GLOBAL rpl_semi_sync_master_wait_for_slave_count= N OSI - Bangalore
  • 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: Friday, November 20, 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 OSI - Bangalore ACK
  • 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability Flexibility 3 Friday, November 20, 2015 3.1 3.2 3.3 3.4 OSI - Bangalore
  • 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Storing Global Transaction Identifiers in a Table Friday, November 20, 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 OSI - Bangalore
  • 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 Friday, November 20, 2015 OSI - Bangalore
  • 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 Friday, November 20, 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) OSI - Bangalore
  • 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 Friday, November 20, 2015 OSI - Bangalore
  • 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multi-Source Replication Friday, November 20, 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. OSI - Bangalore
  • 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. Friday, November 20, 2015 OSI - Bangalore
  • 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. Friday, November 20, 2015 OSI - Bangalore
  • 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 Friday, November 20, 2015 3.1 3.2 3.3 3.4 3.5 OSI - Bangalore
  • 60. 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. Friday, November 20, 2015 OSI - Bangalore
  • 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | The New Replication Features in MySQL 5.7 Usability / Online Performance Dependability Flexibility Misc Other Components Working with Replication 3 Friday, November 20, 2015 3.1 3.2 3.3 3.4 3.5 OSI - Bangalore 3.6
  • 62. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Router • Motivation – The need for transparent integration with Fabric. • No need to upgrade existing connectors. • Use Fabric with connectors that do not support it (e.g., PHP, Ruby, Perl, C). – The need for read-write and read-only automatic routing. • Do not need to know which server is the master. • Transparent fail-over support for a new master. • End Result – Generic and versatile framework: MySQL Router. Friday, November 20, 2015 OSI - Bangalore NEW M Router App M M MySQL Fabric GA
  • 63. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Router • Highlights – High Performance – Plugin Driven Architecture – Simple to setup, configure and deploy. • Features – Connection routing and simple load balancing. – Seamless fail-over based on Fabric HA Groups. – Fail-over without Fabric (needs 3rd party tool to handle fail-over itself). Friday, November 20, 2015 OSI - Bangalore M Router App M M MySQL Fabric NEW GA
  • 64. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Development Sneak Peek4 Friday, November 20, 2015 OSI - Bangalore
  • 65. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Plugin Friday, November 20, 2015 M M M M M Replication Group • Multi-master update everywhere • Automatic group membership management and failure detection. • No need for server fail-over. • Automatic reconfiguration. • No single point of failure. • Shared-nothing state machine replication. • InnoDB compliant. Off-the-shelf hardware friendly. OSI - Bangalore
  • 66. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Plugin • Great technology for deployments where elasticity is a requirement, such as cloud based infrastructures. – Integrated with the server core through a well defined API. – It is integrated with GTIDs, row based replication. – It is integrated with performance schema tables. – It is elastic and self-healing: adding or removing servers does not need human intervention. Friday, November 20, 2015 OSI - Bangalore
  • 67. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Strong development cycles and continuous community engagement through regular and frequent releases on labs.mysql.com. MySQL Group Replication Plugin Friday, November 20, 2015 OSI - Bangalore 2014-Sep-29 Labs release: 0.2.0 2015-Apr-06 Labs release: 0.3.0 2014-Aug-06 Labs release: 0.4.0 2015-Sep-14 Labs release: 0.5.0 Introduces standalone plugin, with its own release cycle! 2015-Oct-26 Labs release: 0.6.0 Multi-platform, No need for Corosync.
  • 68. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Plugin • With MySQL Group Replication for 5.7.9 we introduce a new group communication engine. – Corosync is not needed anymore. – All pieces are integrated and is now easier to build, install and use. – Plugin now builds on multiple platforms: Linux, Solaris, FreeBSD, OSX and Windows. – Cloud friendly transport – TCP transport. Friday, November 20, 2015 OSI - Bangalore
  • 69. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Roadmap5 Friday, November 20, 2015 OSI - Bangalore
  • 70. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is Next? • MySQL Group Replication – Rapid releases. – Improve performance, stability and usability. • MySQL Replication Usability – Instrument even more replication and extend replication P_S tables – Simpler administrative commands, more online operations • MySQL Replication Performance – Continue to improve replication stream multi-threaded (slave) applier – Continue to improve replication stream pipeline performance and efficiency Friday, November 20, 2015 OSI - Bangalore
  • 71. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary6 Friday, November 20, 2015 OSI - Bangalore
  • 72. 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. • Lab releases provide a sneak peek at what is coming - a new replication plugin and exciting new infrastructure: MySQL Group Replication and MySQL Router. Friday, November 20, 2015 OSI - Bangalore
  • 73. 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 Friday, November 20, 2015 OSI - Bangalore
  • 74. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Other Interesting Presentations From Us … • Topic: Optimizer Enhancements and JSON Support in MySQL 5.7  Time: 12:30 to 1.15 PM  Speaker: Sree Harsha • Topic: State of the Dolphin  Time: 2.15 to 3.00 PM  Speaker: Sanjay Manwani • Topic: Security and Performance – out of the box in MySQL 5.7  Time: 3:15 to 4:00 PM  Speaker: Nitin Mehta and Mayank Prasad Friday, November 20, 2015 OSI - Bangalore