This article is also available in Chinese: 中文版. Browse all English articles.
Since MySQL 5.6, the MySQL replication team has been working to
reduce replication lag. The first step was schema-level parallel
application of the binlog, but schema-level parallelism only
helps when writes are spread across many databases; in the common
case, where most write traffic hits a single database, it
provides almost no parallelism. MySQL 5.7 then introduced the
Commit-Order parallel-replay strategy, which depends
on how many transactions run concurrently on the primary: the
replica can replay quickly only when the primary is highly
concurrent. When concurrency on the primary is low, the replica
still replays slowly and lag builds up. To fix that, MySQL 5.7
also …