Our website is growing and we get more and more customers all around the world. We use Nginx, PHP and MySQL Our servers are in UK, so it is fast in Europe, but the further we got away from servers - the slower the website becomes. (Call me captain obvious from now on).
So I am looking into ways of fixing that. We got a standart structure:
[web-servers for dynamic content] [CloudFlare CDN] | | [database-servers] [web-servers for static content]
So we are caching our static content and the question if how to deliver the rest of the website fast world-wide.
I was thinking about 2 main solutions:
having the same infrastructure in a number of different geographical locations and using some form of Geo-location DNS:
[Country-1] [Country-2] [Country-3] | | | [web-servers] [web-servers] [web-servers] \ | / \ | / [DATABASES]
Now the problem I see here how to keep MySQL replication up-to-date worldwide ? I believe that master master replication from Singapore to London would not be always be up-to date and the delay would of course cause problems for application.
Using reverse proxies with private lines
[Country-1] [Country-2] [Country-3] | | | [Reverse Proxy] [Reverse Proxy] [Reverse Proxy] \ | / \ | / [web-server] | [DATABASES]
Here I was thinking about having like private lines from each country, and using reverse proxies to create sort of network of Highways to our servers, altho this looks more like science fiction already :)
Anyway, I am looking for some resources, or advises of how other accomplish it.