TransWikia.com

What is the maximum latency / distance mysql replication can tolerate without having errors or wrong data?

Database Administrators Asked by Malazzar on October 28, 2021

I have two machines in a master – slave replication. I want to know if they are in two seperate places e.g. London, England and Tokyo, Japan are there going to be any latency issues.

What exactly is the maximum latency (if possible measured using distance) that mysql replication can tolerate before an error happens or before the two databases are different enough that the second one can give wrong data or any other error?

2 Answers

The limit is high enough to give no problem on the earth. (Jupiter might be a problem, or earth to moon.) I have used 200ms latency in master-replica setups. Tokyo to London is faster than that.

(Please switch from the term "Slave" to "Replica".)

Answered by Rick James on October 28, 2021

You should consider what distance does to any DB connection.

I have some posts from myself and others on this subject

Another member of this StackExchange, Aaron Brown, wrote a nice blog about measuring latency even with semisynchronous replication. Although his blog is 8 years old and technology has improved since, you should write the same test Aaron did to test the latency yourself. After all, London to Tokyo is intercontinental where US West to US East is within the same country. Latency should be expected, but only your testing will reveal how tolerable it will be.

Please review them and see if you can setup semisynchronous replication.

CAVEAT : if you are using Amazon RDS or Google GCP, you are at their mercy when it comes to latency.

Answered by RolandoMySQLDBA on October 28, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP