Nov 06, 2018
 Percona Live Open Source Database Conference Europe 2018
  Abhinav Sharma

Faster MySQL replication using row dependencies

Lag in asynchronous replication is proportional to the gap in throughput between the master and slave. While a great deal of work has been done to make masters faster on multi-core machines, slaves have been left behind. Today, the master-slave throughput gap is essentially a parallelism gap. Parallel application of a serial log of transactions is not trivial.

In this work, our aim was to match the slave's throughput with the master's instead of just making it 'X' times faster. We use information already present in row based binary logs to extract fine-grained dependencies between row mutations which enables the slave to schedule transactions to multiple threads just like the master would have. We also explore how we can relax the transaction execution model on the slave to make them more lightweight and boost single threaded performance.



About the Author

Abhinav Sharma

I'm a Software Engineer in the Database Engineering team at Facebook. My main focus is making cross-datacenter replication faster and more reliable.