Presented at Percona MySQL Tech Day on September 10, 2020: https://www.percona.com/tech-days#mysql
It is common knowledge that built-in asynchronous active-active replication is not safe. I remember times when the official MySQL User Reference Manual stated that such an installation is not recommended for production use. Some experts repeat this claim even now.
While this statement is generally true, I worked with thousands of shops that successfully avoided asynchronous replication limitations in active-active setups.
In this talk, I will show how they did it, demonstrate situations when asynchronous source-source replication is the best possible high availability option and beats such solutions as Galera or InnoDB Clusters. I will also cover common mistakes, leading to disasters.
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
How Safe is Asynchronous Master-Master Setup?
1. How Safe is Asynchronous Active-Active Setup
in MySQL
September 10, 2020 Sveta Smirnova
2. • MySQL Support engineer
• Author of
• MySQL Troubleshooting
• JSON UDF functions
• FILTER clause for MySQL
• Speaker
• Percona Live, OOW, Fosdem,
DevConf, HighLoad...
Sveta Smirnova
2
3. •What Happens with 2 Active Nodes?
•Why to Write to Multiple Nodes?
•Galera, PXC, InnoDB Cluster
•How to Setup Safe Active-Active
Table of Contents
3
19. Node1
DELETE WHERE id=42
Sends the update →
Receives update →
Node2
DELETE WHERE id=42
← Sends the update
← Receives the update
DELETE
8
20. Node1
DELETE WHERE id=42
Sends the update →
Receives update →
Key not found error!
Node2
DELETE WHERE id=42
← Sends the update
← Receives the update
Key not found error!
DELETE
8
50. • Agreement on which rows
• E.g. AUTO INCREMENT
• auto increment increment=NUMBER OF SERVERS
• auto increment offset = server id
• Custom index
• Create your own unique pattern for each node
Rows
23
51. • Hot Standby
• Easy to setup and maintain
• Separating writes by database/table
• Comparatively easy to setup and maintain
• Separating writes by row
• Should be used very carefully
Conclusion
24
52. MySQL User Reference Manual
Why MySQL Replication Fails, and How...
MySQL High Availability
More information
25