SlideShare a Scribd company logo
Yahoo Case Study: MySQL GTIDs and Parallel or
Multithreaded Replication
PRESENTED BY Stacy Yuan, Yashada Jadhav October 2015
About Yahoo
▪  Yahoo is focused on making the world’s daily habits inspiring and
entertaining.
▪  By creating highly personalized experiences for our users, we keep people
connected to what matters most to them, across devices and around the
world.
▪  In turn, we create value for advertisers by connecting them with the
audiences that build their businesses
▪  More than 1B monthly active users across Yahoo and Tumblr
▪  More than 575M mobile monthly active users across Yahoo and Tumblr
Ad Products Team
Mission Statement: Delivering scalable and cost efficient data services
through innovation and automation powering Yahoo Products
▪  Thousands of Production Servers
▪  OLTP systems & Data marts
▪  Database Design and Architecture
▪  Capacity Planning and Performance Reviews
▪  24x7 Monitoring and Operational Support
MySQL at Yahoo
▪  MySQL powers many mission-critical products within Advertising
and User space across Desktop and Mobile
▪  Multiple production configurations based on product requirement
▪  Yahoo Sports, Daily Fantasy: Mobile friendly
▪  Flickr: Sharded across thousands of servers
▪  DBaaS setup for multiple products
▪  Hot:Hot, Hot:Warm Configurations
▪  Versions range from Percona Server 5.5 to 5.6 including Percona
XtraDB Cluster
▪  Operating systems running customized RHEL 6.x
About Stacy
▪  14 years of experience on various flavors of relational databases.
▪  Focus on performance tuning, code reviews, database deployment
and infrastructure management for MySQL
▪  In her spare time, she enjoys reading books and doing some
volunteer work.
About Yashada
▪  MySQL DevOps Engineer with a background in database design
and performance tuning.
▪  4+ years of experience on various flavors of relational databases.
▪  Special Skills - Fluency in Sarcasm
What are the next 45 minutes about?
•  GTID Replication
● Advantages and Disadvantages
● Performance when compared to regular replication
▪  Multi threaded slaves
●  Why do we want MTS?
●  MTS vs single threaded replication - Performance tests
▪  Rolling out GTID and MTS to a live system with no downtime
▪  GTID and MTS in Production
●  Operational issues
●  Monitoring and HA
●  Backups using xtrabackup
Why go for GTID and MTS
▪  Slave promotion becomes easier with a global transaction ID
▪  Multitenant database systems suffer from problems like resource
contention due to bad queries, batch jobs etc. that affect replication.
▪  MTS without GTID - replication co-ordinates might no longer be
accurate due to multiple parallel worker threads.
▪  MTS with GTID
GTID Replication
File-based Replication
Enables data from one MySQL database server (the master) to be
replicated to one or more MySQL database servers (the slaves) through
MySQL log file and its position
▪  Have replication user, binlog is enabled
▪  Have a copy of master database
▪  Connect to master through master_host, port, replication user,
master log file and its position.
▪  Each slave pulls the data from the master, and execute the events
to the slave.
GTID Replication
A global transaction identifier (GTID) is a unique identifier created and
associated with each transaction committed on the server of origin
(master).
GTID is unique not only to the server on which it originated, but is
unique across all servers in a given replication setup.
GTID = source_id:transaction_id
▪  The source_id identifies the originating server.
▪  The transaction_id is a sequence number determined by the order in
which the transaction was committed on this server.
Example:
▪  5c7401d3-3623-11e5-ae8c-78e7d15fd641:1-13476
GTID Replication Advantage
▪  Replication topology is easy to change - binlog file name and
position are not required any more instead we use
master_auto_position=1
▪  Failover is simplified
▪  Increase performance in relay slave - set sync_binlog=0
▪  Managing multi-tiered replication is easier
Master_log_file=‘mysql-bin.***’
Master_log_pos=****
master_auto_position=1
Replication Failover Comparison
Regular Rep Failover
If S1 is bad, S4
S5 need
to be rebuilt.
M M
GTID Rep Failover
Redirect
S4 to M
S2
S3
S1
S4
S5
S2 S1
S3 S4
S5
GTID Replication Limitations
▪  GTID does not provide replication monitoring
▪  SQL_SKIP_SLAVE_COUNTER does not work
▪  Can not force the database to start replication from specific position
GTIDs Replication Caveats
▪  Updates involving non-transactional storage engines.
▪  CREATE TABLE ... SELECT statements is not supported.
▪  Temporary table is not supported inside a transaction
To prevent GTID-based replication to fail: enforce-gtid-consistency
Replication Performance GTID vs Regular Rep
In terms of performance, GTID is almost same as regular replication. It
is slightly slower.
The reasons could be -
▪  GTIDs write more lines into binary log - information about GTID
▪  GTID performs additional checks for transactions
GTID vs Regular Rep
GTID vs Regular Rep
GTID vs Regular Rep
Multi threaded Replication
Single threaded replication
▪ Applications multi-threaded parallel write into master
▪ Replication from master to slave is single-threaded, it becomes
bottleneck in a busy system.
Master Slave
Multi-Threaded Slaves (MTS)
▪  Coordinator thread on slave dispatches work across several worker
threads
▪  Each worker thread commit transaction individually.
▪  Multiple active schemas/databases can take advantage of parallel
replication
Master Slave
MTS Prerequisites
▪  MySQL 5.6 above
▪  Transactions are independently based on different databases.
▪  Multitenant databases is the best to enable MTS
▪  N databases, use N parallel workers
slave_parallel_workers = N
▪  Example: 3 databases in MySQL, better to set
slave_parallel_workers =3
Master
db1, db2, db3
Slave
db1, db2, db3
Configure MTS
▪  STOP SLAVE;
▪  SET GLOBAL slave_parallel_workers=3;
▪  START SLAVE;
MTS Execution Gaps and Checkpoint
▪  Events are no longer guaranteed to be consecutive
▪  Execution gaps are tracked
▪  Checkpoints are performed from time to time
Check settings
slave_checkpoint_period default 300 ms
slave_checkpoint_group default 512 trx
▪  Exec_Master_Log_Pos shows the latest checkpoint and not latest
transaction
▪  How to fix execution gaps -
STOP SLAVE; START SLAVE UNTIL SQL_AFTER_MTS_GAPS
Convert MTS to Single-threaded
▪  Run MTS until no more gaps are found in the relay log
▪  Stop Replication
▪  Configure single threaded slave
▪  Start single threaded slave
START SLAVE UNTIL SQL_AFTER_MTS_GAPS;
SET @@GLOBAL.slave_parallel_workers = 0;
START SLAVE;
MTS Advantages and Limitations
Advantages:
▪  Take advantage of multi-core servers
▪  Changes to each schema applied and committed independently by
worker threads
▪  Smaller risk of data loss
Limitations:
▪  START SLAVE UNTIL no longer support
▪  Foreign Keys cross-referencing DBs will disable MTS
▪  No implicit transaction retry after transient failure
MTS Caveats
▪  Enforcing foreign key relationships between tables in different
databases causes MTS to use sequential mode which can have
negative impact on performance
▪  Single database replication, it slows down the replication
performance
MTS without GTID
▪  Exec_Master_Log_Pos in SHOW SLAVE STATUS is misleading.
▪  Skipping replication errors with SQL_SLAVE_SKIP_COUNTER=1 is
dangerous
▪  Backup from slave, either mysqldump and xtrabackup might not get
right position
GTID comes to the rescue
Performance Testing - GTID with MTS Setup
Test scenario:
▪  one master,
▪  two slaves (one is single-threaded replication, another slave is multi-
threaded replication both using GTID
Master
Slave1 Slave2
GTID Rep MTS GTID Rep
Replication Performance Comparison
Replication Performance Comparison
QPS is increased about 3 or 4 times
Load, CPU, and Writes per second are increased as well
Replication Performance Comparison
GTID with MTS enabled: Things to watch out for
▪  Exec_Master_Log_Pos is no longer reliable
▪  Executed_Gtid_Set is the reliable
▪  SQL_SLAVE_SKIP_COUNTER no longer works
▪  START SLAVE UNTIL is not supported
▪  Slave_transaction_retries is treated as 0, and can not be changed.
MySQL57 GA
▪  Parallel replication improvement
Slave can apply transaction in parallel with single database/schema with --slave-parallel-
type=LOGICAL_CLOCK.
▪  GTID improvements:
●  Automatically tracks the replication position in replication stream.
●  Enable/disable GTID can be online without MySQL restart
MySQL57 SLAVE_PARALLEL_TYPE STUDY
Master	
  :	
  slave-­‐parallel-­‐type	
   DATABASE	
   LOGICAL_CLOCK	
  
Master	
  generated	
  binary	
  logs(MB)	
   3924	
   3690	
  
read/write	
  requests	
   18704820	
   17587168	
  
read/write	
  requests/per	
  sec	
   20783.1	
   19541.25	
  
response	
  Sme	
  AVG	
  ms	
   1.54	
   1.64	
  
95	
  percenSle	
   2.21	
   2.36	
  
15	
  mins	
  work	
   81	
   38	
  
Slave	
  QPS	
   4614.648	
   9466.198	
  
Rolling out GTID and MTS to production
Online Rollout GTID with MTS in Percona Server
▪  MySQL56 requires downtime to enable GTID, it is not acceptable
▪  With Percona server 5.6, with almost no downtime
The variable GTID_DEPLOYMENT_STEP plays an important role
Database Servers Setup
Dual masters setup
▪ Masters setup cross different colos.
▪ Each master carries one slave DNS
Prod master BCP master
Prod slave BCP slave
Enable GTID without downtime
Enable GTID in BCP side
1. Make sure BCP master and
BCP slave are sync
2. Stop mysqld in BCP master and BCP slave,
add gtid_deployment_step=on,
gtid_mode=ON,
enforce-gtid-consistency into my.cnf
Restart mysqld in both servers.
3. Replication from prod master to
BCP master is good.
DNS
Prod master
BCP master
GTID_deployme
nt_step=on
Prod slave
BCP slave
GTID_deployme
nt_step=on
Enable GTID without downtime
Promote BCP master to Prod master
4. Prod master: set global read_only=on
5. BCP master:
set global gtid_deployment_step = off;
set global read_only=off;
6. The replication from BCP master to
Prod master is broken.
DNS
Prod master
BCP master
GTID_deployme
nt_step=off
Prod slave
BCP slave
GTID_deployme
nt_step=on
Enable GTID without downtime
Enable GTID in Prod master
7. Enable GTID on old prod master and prod slave
8. Fix replication from BCP master to prod master
CHANGE MASTER TO
MASTER_AUTO_POSITION = 1;
START SLAVE;
9. Enable GTID replication from
Prod master to BCP master
10. Enable MTS in all servers
stop slave;
set global slave_parallel_workers=16;
start slave;
DNS
Prod master
GTID enabled
BCP master
GTID_deployme
nt_step=off
Prod slave
GTID enabled
BCP slave
GTID_deployme
nt_step=on
Enable GTID without downtime
Switch back
10. Perform switchover in Prod master
Disable gtid_deployment_step across all servers.
DNS
Prod master
GTID enabled
BCP master
GTID_deployme
nt_step=off
Prod slave
GTID enabled
BCP slave
GTID_deployme
nt_step=off
Switchover Steps
	
  	
  
•  Enable global read_only=on in prod master
•  Sanity check to make sure BCP master catch up its master
(WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS)
•  Disable read_only in BCP master. BCP master becomes prod
master
Failover:
•  If prod master is unreachable, it will be failover without step 1 and 2.
	
  
GTID and MTS in Production : MySQL Ops
GTID and MTS in production : What did we learn?
▪  Errant Transactions
▪  Replication Monitoring
▪  Building slaves using xtrabackup
Errant Transaction
The errant transactions are:
They are only executed in slaves.
▪  Could result from a mistake
▪  Could be intentionally by design, such as report tables
▪  Why they cause problem
When the slave becomes the master during failover, it exchanges its own
set of executed GTIDs, then send any missing transactions to the slaves.
Errant Transaction Detection and Fix
Detect: GTID_SUBSET(slave-Executed_Gtid_Set, master-Executed_Gtid_Set)
If it returns true(1), no errant trx.
If it returns false(0), it does have errant trx.
Identify:GTID_SUBTRACT(slave-Executed_Gtid_Set, master-Executed_Gtid_Set)
It returns the errant GTID.
Fix: Inject empty transaction on all other servers or its master.
If the transaction must be executed in slave only, use
set sql_log_bin=0;
Inject Empty Transaction
Sql_skip_slave_counter=n no longer works
Execute a fake trx with the GTID that you want to skip
For example: GTID=68fb0071-299b-11e5-9cd6-78e7d15dbe38:501
STOP SLAVE;
SET GTID_NEXT="68fb0071-299b-11e5-9cd6-78e7d15dbe38:501";
BEGIN; COMMIT;
SET GTID_NEXT="AUTOMATIC";
START SLAVE;
SHOW SLAVE STATUSG # Verification
MySQL Replication Monitoring
	
  	
  
•  Seconds_Behind_Master
A good approximation of how late the slave is only when the slave
actively processes updates.
If the network is slow or not much updates in the master, this is NOT
a good measurement.
	
  
	
  
MySQL Replication Monitoring at Yahoo
▪  MySQL Health Heartbeat
1. Master generates heartbeat by updating timestamp (last_update)
2. Slave checks the difference between current time and last_update
GTID MTS Monitoring Challenge
▪  SHOW SLAVE STATUS
▪  Seconds_Behind_Master is still a good indication of the
replication lag
▪  Retrieved_Gtid_Set: List of GTIDs received by the I/O thread,
cleared after a server restart
▪  Executed_Gtid_Set: List of GTIDs executed by the SQL thread
▪  Auto_position: 1 if GTID-based replication is enabled
▪  5.7 is using performance_schema
Build Slaves Using Xtrabackup
▪  Start Xtrabackup from either master or slave
If the backup is taken from the master,
Please check the file xtrabackup_binlog_info in the backup folder
If the backup is from slave,
Please check the file xtrabackup_slave_info
$ cat xtrabackup_slave_info
SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533';
CHANGE MASTER TO MASTER_AUTO_POSITION=1
Build Slave Using Xtrabackup
Enable Replication in Slave
Issue
mysql> SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533';
ERROR 1840 (HY000): @@GLOBAL.GTID_PURGED can only be set when
@@GLOBAL.GTID_EXECUTED is empty.
How to fix
▪  RESET MASTER;
▪  SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533’;
▪  CHANGE MASTER TO MASTER_HOST="mastername", master_user='rep_user',
master_password='rep_password', MASTER_AUTO_POSITION = 1;
▪  START SLAVE;
Build Slave Using Xtrabackup
Still issue?
mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
RESET SLAVE;
START SLAVE;
Summary
▪  GTID
▪  MTS
▪  GTID with MTS performance comparison
▪  GTID with MTS online rollout
▪  Things to watch out
▪  Rebuild slave
We would love to talk more ..
mysqlatyahoo.tumblr.com
Yashada Jadhav
yashada@yahoo-inc.com
Stacy Yuan
syuan@yahoo-inc.com
Ad

More Related Content

What's hot (20)

InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick FiguresInnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
Karwin Software Solutions LLC
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
Kenny Gryp
 
How to upgrade like a boss to MySQL 8.0 - PLE19
How to upgrade like a boss to MySQL 8.0 -  PLE19How to upgrade like a boss to MySQL 8.0 -  PLE19
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
 
Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performance
oysteing
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
NeoClova
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
NeoClova
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Jaime Crespo
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
NexThoughts Technologies
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
Mydbops
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
David Buck
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
Sveta Smirnova
 
Facebook Messages & HBase
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase
强 王
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
NHN FORWARD
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
Olivier DASINI
 
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStoreMariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB plc
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning
PgDay.Seoul
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
Kenny Gryp
 
How to upgrade like a boss to MySQL 8.0 - PLE19
How to upgrade like a boss to MySQL 8.0 -  PLE19How to upgrade like a boss to MySQL 8.0 -  PLE19
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
 
Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performance
oysteing
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
NeoClova
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
NeoClova
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Jaime Crespo
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
Mydbops
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
David Buck
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
Sveta Smirnova
 
Facebook Messages & HBase
Facebook Messages & HBaseFacebook Messages & HBase
Facebook Messages & HBase
强 王
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
NHN FORWARD
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
Olivier DASINI
 
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStoreMariaDB AX: Analytics with MariaDB ColumnStore
MariaDB AX: Analytics with MariaDB ColumnStore
MariaDB plc
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning
PgDay.Seoul
 

Viewers also liked (12)

Proxysql use case scenarios plam 2016
Proxysql use case scenarios    plam 2016Proxysql use case scenarios    plam 2016
Proxysql use case scenarios plam 2016
Alkin Tezuysal
 
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
Yahoo Developer Network
 
MySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshellMySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshell
Miguel Angel Nieto
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
Wagner Bianchi
 
Running gtid replication in production
Running gtid replication in productionRunning gtid replication in production
Running gtid replication in production
Balazs Pocze
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
Giuseppe Maxia
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
Marco Tusa
 
ProxySQL Tutorial - PLAM 2016
ProxySQL Tutorial - PLAM 2016ProxySQL Tutorial - PLAM 2016
ProxySQL Tutorial - PLAM 2016
Derek Downey
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
RapidValue
 
How Apache Drives Music Recommendations At Spotify
How Apache Drives Music Recommendations At SpotifyHow Apache Drives Music Recommendations At Spotify
How Apache Drives Music Recommendations At Spotify
Josh Baer
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
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
Pythian
 
Proxysql use case scenarios plam 2016
Proxysql use case scenarios    plam 2016Proxysql use case scenarios    plam 2016
Proxysql use case scenarios plam 2016
Alkin Tezuysal
 
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
August 2016 HUG: Better together: Fast Data with Apache Spark™ and Apache Ign...
Yahoo Developer Network
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
Wagner Bianchi
 
Running gtid replication in production
Running gtid replication in productionRunning gtid replication in production
Running gtid replication in production
Balazs Pocze
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
Giuseppe Maxia
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
Marco Tusa
 
ProxySQL Tutorial - PLAM 2016
ProxySQL Tutorial - PLAM 2016ProxySQL Tutorial - PLAM 2016
ProxySQL Tutorial - PLAM 2016
Derek Downey
 
MySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue SolutionsMySQL Database Replication - A Guide by RapidValue Solutions
MySQL Database Replication - A Guide by RapidValue Solutions
RapidValue
 
How Apache Drives Music Recommendations At Spotify
How Apache Drives Music Recommendations At SpotifyHow Apache Drives Music Recommendations At Spotify
How Apache Drives Music Recommendations At Spotify
Josh Baer
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
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
Pythian
 
Ad

Similar to Yahoo: Experiences with MySQL GTID and Multi Threaded Replication (20)

MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
Mydbops
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
MySQL DBA
MySQL DBAMySQL DBA
MySQL DBA
lalit choudhary
 
MySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitationsMySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitations
Jean-François Gagné
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
Jean-François Gagné
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Replication skeptic
Replication skepticReplication skeptic
Replication skeptic
Giuseppe Maxia
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
Jean-François Gagné
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
FromDual GmbH
 
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitationsMySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
RKLeSolutions
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
Dave Stokes
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
FromDual GmbH
 
Pseudo GTID and Easy MySQL Replication Topology Management
Pseudo GTID and Easy MySQL Replication Topology ManagementPseudo GTID and Easy MySQL Replication Topology Management
Pseudo GTID and Easy MySQL Replication Topology Management
Shlomi Noach
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
InMobi Technology
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
Dave Stokes
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
Mydbops
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
MySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitationsMySQL Parallel Replication: inventory, use-cases and limitations
MySQL Parallel Replication: inventory, use-cases and limitations
Jean-François Gagné
 
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
Jean-François Gagné
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
MySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated EnvironmentMySQL Scalability and Reliability for Replicated Environment
MySQL Scalability and Reliability for Replicated Environment
Jean-François Gagné
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
FromDual GmbH
 
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitationsMySQL/MariaDB Parallel Replication: inventory, use-case and limitations
MySQL/MariaDB Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
RKLeSolutions
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
Dave Stokes
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
FromDual GmbH
 
Pseudo GTID and Easy MySQL Replication Topology Management
Pseudo GTID and Easy MySQL Replication Topology ManagementPseudo GTID and Easy MySQL Replication Topology Management
Pseudo GTID and Easy MySQL Replication Topology Management
Shlomi Noach
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
InMobi Technology
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
Dave Stokes
 
Ad

Recently uploaded (20)

Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient CareAn Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
Cyntexa
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient CareAn Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
Cyntexa
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 

Yahoo: Experiences with MySQL GTID and Multi Threaded Replication

  • 1. Yahoo Case Study: MySQL GTIDs and Parallel or Multithreaded Replication PRESENTED BY Stacy Yuan, Yashada Jadhav October 2015
  • 2. About Yahoo ▪  Yahoo is focused on making the world’s daily habits inspiring and entertaining. ▪  By creating highly personalized experiences for our users, we keep people connected to what matters most to them, across devices and around the world. ▪  In turn, we create value for advertisers by connecting them with the audiences that build their businesses ▪  More than 1B monthly active users across Yahoo and Tumblr ▪  More than 575M mobile monthly active users across Yahoo and Tumblr
  • 3. Ad Products Team Mission Statement: Delivering scalable and cost efficient data services through innovation and automation powering Yahoo Products ▪  Thousands of Production Servers ▪  OLTP systems & Data marts ▪  Database Design and Architecture ▪  Capacity Planning and Performance Reviews ▪  24x7 Monitoring and Operational Support
  • 4. MySQL at Yahoo ▪  MySQL powers many mission-critical products within Advertising and User space across Desktop and Mobile ▪  Multiple production configurations based on product requirement ▪  Yahoo Sports, Daily Fantasy: Mobile friendly ▪  Flickr: Sharded across thousands of servers ▪  DBaaS setup for multiple products ▪  Hot:Hot, Hot:Warm Configurations ▪  Versions range from Percona Server 5.5 to 5.6 including Percona XtraDB Cluster ▪  Operating systems running customized RHEL 6.x
  • 5. About Stacy ▪  14 years of experience on various flavors of relational databases. ▪  Focus on performance tuning, code reviews, database deployment and infrastructure management for MySQL ▪  In her spare time, she enjoys reading books and doing some volunteer work.
  • 6. About Yashada ▪  MySQL DevOps Engineer with a background in database design and performance tuning. ▪  4+ years of experience on various flavors of relational databases. ▪  Special Skills - Fluency in Sarcasm
  • 7. What are the next 45 minutes about? •  GTID Replication ● Advantages and Disadvantages ● Performance when compared to regular replication ▪  Multi threaded slaves ●  Why do we want MTS? ●  MTS vs single threaded replication - Performance tests ▪  Rolling out GTID and MTS to a live system with no downtime ▪  GTID and MTS in Production ●  Operational issues ●  Monitoring and HA ●  Backups using xtrabackup
  • 8. Why go for GTID and MTS ▪  Slave promotion becomes easier with a global transaction ID ▪  Multitenant database systems suffer from problems like resource contention due to bad queries, batch jobs etc. that affect replication. ▪  MTS without GTID - replication co-ordinates might no longer be accurate due to multiple parallel worker threads. ▪  MTS with GTID
  • 10. File-based Replication Enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves) through MySQL log file and its position ▪  Have replication user, binlog is enabled ▪  Have a copy of master database ▪  Connect to master through master_host, port, replication user, master log file and its position. ▪  Each slave pulls the data from the master, and execute the events to the slave.
  • 11. GTID Replication A global transaction identifier (GTID) is a unique identifier created and associated with each transaction committed on the server of origin (master). GTID is unique not only to the server on which it originated, but is unique across all servers in a given replication setup. GTID = source_id:transaction_id ▪  The source_id identifies the originating server. ▪  The transaction_id is a sequence number determined by the order in which the transaction was committed on this server. Example: ▪  5c7401d3-3623-11e5-ae8c-78e7d15fd641:1-13476
  • 12. GTID Replication Advantage ▪  Replication topology is easy to change - binlog file name and position are not required any more instead we use master_auto_position=1 ▪  Failover is simplified ▪  Increase performance in relay slave - set sync_binlog=0 ▪  Managing multi-tiered replication is easier Master_log_file=‘mysql-bin.***’ Master_log_pos=**** master_auto_position=1
  • 13. Replication Failover Comparison Regular Rep Failover If S1 is bad, S4 S5 need to be rebuilt. M M GTID Rep Failover Redirect S4 to M S2 S3 S1 S4 S5 S2 S1 S3 S4 S5
  • 14. GTID Replication Limitations ▪  GTID does not provide replication monitoring ▪  SQL_SKIP_SLAVE_COUNTER does not work ▪  Can not force the database to start replication from specific position
  • 15. GTIDs Replication Caveats ▪  Updates involving non-transactional storage engines. ▪  CREATE TABLE ... SELECT statements is not supported. ▪  Temporary table is not supported inside a transaction To prevent GTID-based replication to fail: enforce-gtid-consistency
  • 16. Replication Performance GTID vs Regular Rep In terms of performance, GTID is almost same as regular replication. It is slightly slower. The reasons could be - ▪  GTIDs write more lines into binary log - information about GTID ▪  GTID performs additional checks for transactions
  • 21. Single threaded replication ▪ Applications multi-threaded parallel write into master ▪ Replication from master to slave is single-threaded, it becomes bottleneck in a busy system. Master Slave
  • 22. Multi-Threaded Slaves (MTS) ▪  Coordinator thread on slave dispatches work across several worker threads ▪  Each worker thread commit transaction individually. ▪  Multiple active schemas/databases can take advantage of parallel replication Master Slave
  • 23. MTS Prerequisites ▪  MySQL 5.6 above ▪  Transactions are independently based on different databases. ▪  Multitenant databases is the best to enable MTS ▪  N databases, use N parallel workers slave_parallel_workers = N ▪  Example: 3 databases in MySQL, better to set slave_parallel_workers =3 Master db1, db2, db3 Slave db1, db2, db3
  • 24. Configure MTS ▪  STOP SLAVE; ▪  SET GLOBAL slave_parallel_workers=3; ▪  START SLAVE;
  • 25. MTS Execution Gaps and Checkpoint ▪  Events are no longer guaranteed to be consecutive ▪  Execution gaps are tracked ▪  Checkpoints are performed from time to time Check settings slave_checkpoint_period default 300 ms slave_checkpoint_group default 512 trx ▪  Exec_Master_Log_Pos shows the latest checkpoint and not latest transaction ▪  How to fix execution gaps - STOP SLAVE; START SLAVE UNTIL SQL_AFTER_MTS_GAPS
  • 26. Convert MTS to Single-threaded ▪  Run MTS until no more gaps are found in the relay log ▪  Stop Replication ▪  Configure single threaded slave ▪  Start single threaded slave START SLAVE UNTIL SQL_AFTER_MTS_GAPS; SET @@GLOBAL.slave_parallel_workers = 0; START SLAVE;
  • 27. MTS Advantages and Limitations Advantages: ▪  Take advantage of multi-core servers ▪  Changes to each schema applied and committed independently by worker threads ▪  Smaller risk of data loss Limitations: ▪  START SLAVE UNTIL no longer support ▪  Foreign Keys cross-referencing DBs will disable MTS ▪  No implicit transaction retry after transient failure
  • 28. MTS Caveats ▪  Enforcing foreign key relationships between tables in different databases causes MTS to use sequential mode which can have negative impact on performance ▪  Single database replication, it slows down the replication performance
  • 29. MTS without GTID ▪  Exec_Master_Log_Pos in SHOW SLAVE STATUS is misleading. ▪  Skipping replication errors with SQL_SLAVE_SKIP_COUNTER=1 is dangerous ▪  Backup from slave, either mysqldump and xtrabackup might not get right position GTID comes to the rescue
  • 30. Performance Testing - GTID with MTS Setup Test scenario: ▪  one master, ▪  two slaves (one is single-threaded replication, another slave is multi- threaded replication both using GTID Master Slave1 Slave2 GTID Rep MTS GTID Rep
  • 32. Replication Performance Comparison QPS is increased about 3 or 4 times Load, CPU, and Writes per second are increased as well
  • 34. GTID with MTS enabled: Things to watch out for ▪  Exec_Master_Log_Pos is no longer reliable ▪  Executed_Gtid_Set is the reliable ▪  SQL_SLAVE_SKIP_COUNTER no longer works ▪  START SLAVE UNTIL is not supported ▪  Slave_transaction_retries is treated as 0, and can not be changed.
  • 35. MySQL57 GA ▪  Parallel replication improvement Slave can apply transaction in parallel with single database/schema with --slave-parallel- type=LOGICAL_CLOCK. ▪  GTID improvements: ●  Automatically tracks the replication position in replication stream. ●  Enable/disable GTID can be online without MySQL restart
  • 36. MySQL57 SLAVE_PARALLEL_TYPE STUDY Master  :  slave-­‐parallel-­‐type   DATABASE   LOGICAL_CLOCK   Master  generated  binary  logs(MB)   3924   3690   read/write  requests   18704820   17587168   read/write  requests/per  sec   20783.1   19541.25   response  Sme  AVG  ms   1.54   1.64   95  percenSle   2.21   2.36   15  mins  work   81   38   Slave  QPS   4614.648   9466.198  
  • 37. Rolling out GTID and MTS to production
  • 38. Online Rollout GTID with MTS in Percona Server ▪  MySQL56 requires downtime to enable GTID, it is not acceptable ▪  With Percona server 5.6, with almost no downtime The variable GTID_DEPLOYMENT_STEP plays an important role
  • 39. Database Servers Setup Dual masters setup ▪ Masters setup cross different colos. ▪ Each master carries one slave DNS Prod master BCP master Prod slave BCP slave
  • 40. Enable GTID without downtime Enable GTID in BCP side 1. Make sure BCP master and BCP slave are sync 2. Stop mysqld in BCP master and BCP slave, add gtid_deployment_step=on, gtid_mode=ON, enforce-gtid-consistency into my.cnf Restart mysqld in both servers. 3. Replication from prod master to BCP master is good. DNS Prod master BCP master GTID_deployme nt_step=on Prod slave BCP slave GTID_deployme nt_step=on
  • 41. Enable GTID without downtime Promote BCP master to Prod master 4. Prod master: set global read_only=on 5. BCP master: set global gtid_deployment_step = off; set global read_only=off; 6. The replication from BCP master to Prod master is broken. DNS Prod master BCP master GTID_deployme nt_step=off Prod slave BCP slave GTID_deployme nt_step=on
  • 42. Enable GTID without downtime Enable GTID in Prod master 7. Enable GTID on old prod master and prod slave 8. Fix replication from BCP master to prod master CHANGE MASTER TO MASTER_AUTO_POSITION = 1; START SLAVE; 9. Enable GTID replication from Prod master to BCP master 10. Enable MTS in all servers stop slave; set global slave_parallel_workers=16; start slave; DNS Prod master GTID enabled BCP master GTID_deployme nt_step=off Prod slave GTID enabled BCP slave GTID_deployme nt_step=on
  • 43. Enable GTID without downtime Switch back 10. Perform switchover in Prod master Disable gtid_deployment_step across all servers. DNS Prod master GTID enabled BCP master GTID_deployme nt_step=off Prod slave GTID enabled BCP slave GTID_deployme nt_step=off
  • 44. Switchover Steps     •  Enable global read_only=on in prod master •  Sanity check to make sure BCP master catch up its master (WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS) •  Disable read_only in BCP master. BCP master becomes prod master Failover: •  If prod master is unreachable, it will be failover without step 1 and 2.  
  • 45. GTID and MTS in Production : MySQL Ops
  • 46. GTID and MTS in production : What did we learn? ▪  Errant Transactions ▪  Replication Monitoring ▪  Building slaves using xtrabackup
  • 47. Errant Transaction The errant transactions are: They are only executed in slaves. ▪  Could result from a mistake ▪  Could be intentionally by design, such as report tables ▪  Why they cause problem When the slave becomes the master during failover, it exchanges its own set of executed GTIDs, then send any missing transactions to the slaves.
  • 48. Errant Transaction Detection and Fix Detect: GTID_SUBSET(slave-Executed_Gtid_Set, master-Executed_Gtid_Set) If it returns true(1), no errant trx. If it returns false(0), it does have errant trx. Identify:GTID_SUBTRACT(slave-Executed_Gtid_Set, master-Executed_Gtid_Set) It returns the errant GTID. Fix: Inject empty transaction on all other servers or its master. If the transaction must be executed in slave only, use set sql_log_bin=0;
  • 49. Inject Empty Transaction Sql_skip_slave_counter=n no longer works Execute a fake trx with the GTID that you want to skip For example: GTID=68fb0071-299b-11e5-9cd6-78e7d15dbe38:501 STOP SLAVE; SET GTID_NEXT="68fb0071-299b-11e5-9cd6-78e7d15dbe38:501"; BEGIN; COMMIT; SET GTID_NEXT="AUTOMATIC"; START SLAVE; SHOW SLAVE STATUSG # Verification
  • 50. MySQL Replication Monitoring     •  Seconds_Behind_Master A good approximation of how late the slave is only when the slave actively processes updates. If the network is slow or not much updates in the master, this is NOT a good measurement.    
  • 51. MySQL Replication Monitoring at Yahoo ▪  MySQL Health Heartbeat 1. Master generates heartbeat by updating timestamp (last_update) 2. Slave checks the difference between current time and last_update
  • 52. GTID MTS Monitoring Challenge ▪  SHOW SLAVE STATUS ▪  Seconds_Behind_Master is still a good indication of the replication lag ▪  Retrieved_Gtid_Set: List of GTIDs received by the I/O thread, cleared after a server restart ▪  Executed_Gtid_Set: List of GTIDs executed by the SQL thread ▪  Auto_position: 1 if GTID-based replication is enabled ▪  5.7 is using performance_schema
  • 53. Build Slaves Using Xtrabackup ▪  Start Xtrabackup from either master or slave If the backup is taken from the master, Please check the file xtrabackup_binlog_info in the backup folder If the backup is from slave, Please check the file xtrabackup_slave_info $ cat xtrabackup_slave_info SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533'; CHANGE MASTER TO MASTER_AUTO_POSITION=1
  • 54. Build Slave Using Xtrabackup Enable Replication in Slave Issue mysql> SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533'; ERROR 1840 (HY000): @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. How to fix ▪  RESET MASTER; ▪  SET GLOBAL gtid_purged='ffee1ff8-363f-11e5-af47-9cb654954cac:1-29123533’; ▪  CHANGE MASTER TO MASTER_HOST="mastername", master_user='rep_user', master_password='rep_password', MASTER_AUTO_POSITION = 1; ▪  START SLAVE;
  • 55. Build Slave Using Xtrabackup Still issue? mysql> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository RESET SLAVE; START SLAVE;
  • 56. Summary ▪  GTID ▪  MTS ▪  GTID with MTS performance comparison ▪  GTID with MTS online rollout ▪  Things to watch out ▪  Rebuild slave
  • 57. We would love to talk more .. mysqlatyahoo.tumblr.com Yashada Jadhav yashada@yahoo-inc.com Stacy Yuan syuan@yahoo-inc.com
  翻译: