Search code examples
mysqlapachelatencyfileserver

Speed up global access to server (Apache, MySQL and Fileserver)


Today i have a NAS server acting webserver, MySQL and fileserver in Europe, but now i also need it to be accessable from US. My problem is that it is very slow do to the latency. What can i do to make this better - can i somehow sync two NAS stations, or do you suggest i go for the cloud (if this is the case, then what setup are you suggesting)

The NAS server is a Synology and is using Apache and MySQL

I have already tried to setup a VPN connection, but this is not making things faster.


Solution

  • For readonly web pages, have web servers and Slaves in all general locations (eg, 1+ in US, 1+ in Europe). Such pages will render promptly.

    If a web page needs to write, that is messier, since at least one "hop across the pond" is required for at least some of the users. One hop is at least 150ms, in my experience.

    If you use Master-Slave, then those who are far from the Master will need to connect and do at least one write. (2 hops).

    If you use a WAN deployment of Galera (PXC, MariaDB 10), there will, in theory, be only 1 hop per transaction.