Learn about Galera DB replication and related MySQL slow queries
Galera clusters help with performance and scalability. When considering replica databases, it is important to understand that the way the data replication happens is different than on the primary. The primary database can perform bulk operations. When the replication happens for all the replica databases, they do actions one at a time. For example, if you have 67,000,000 items in a delete, on the replica databases each one happens one at a time. When reviewing the MySQL slow query logs, you find this action can take a long time. The fact that the replica databases are performing operations sequentially is a reason for things not to be in sync, and performance impacts can be detected.
To help the replica databases keep in sync with the primary, batch your large operations when possible. By doing things in batch, it allows the actions to be executed in a timely manner and performance impacts are kept down to a minimum.
Intended audience
- Architects
- Developers
- DevOps
Video content
- Galera replication to replica database
- Learn about flow control
- Finding thread numbers in mysql slow query logs
- Bulk executions only happen on the primary. Replications happen 1 at a time
- To help the replication keep up with the primary, batch your large commits.