I am running 2 cpanel servers with MySQL Replication set on them, one in france the other in US. Running a database hungary site. Replication was setup to load balance as well as for failover reason with mysql master being in US.
The issue is slave sometimes lag behind and leaves some rows which creates difference in dbs.
I want to know what could be the possible reason behind this.
Latency between servers is 250ms which some times rises to 400ms or more but sometimes. Nodes are 32 GB Octa core, tables with around 4 lakh rows and total databse size below 5GB and table count around 700. And connectivity at around 100 Mbps. I know there is always room for optimizations though databases have been optimised. Our Application receives 10 -15 hits per second in peak time and every hit creates 2/3 database queries.
What could be a possible solution to this problem? What are standard practices followed in the industry for similar situations.