I have a website that uses PHP and queries a MySQL database to serve pages. The resulting pages are 90% images.

My site is currently hosted in Europe, so users visiting from the US experience high latency. I’m looking to reduce latency and am trying to come up with some solutions. I was hoping someone could give me some insights/tips.

I thought about;

  1. Renting webhosting in Europe (server A)
  2. Renting webhosting in USA (server B)
  3. Using AWS Route 53 to send you to server A or server B, based on location or latency

Server A would be the master. Server B would be an exact copy of server A. I thought about copying server A to server B during the night using rsync? I’m not sure on how to replicate MySQL databases yet. The site is approximately 1TB in size and the MySQL database is ~5MB, so it’s not terribly large I guess.

My questions;

  • Does all this sound feasible? Any pointers for setting it up?
  • Are there better alternatives?
  • Recommendations for hosting?

Thank you for your time!


EDIT; I figured a CDN will only help so much because the initial page build still has to go through PHP/MySQL?

submitted by /u/Xepolite
[link] [comments]

Go to Source of this post
Author Of this post: /u/Xepolite
Title Of post: Reducing global latency
Author Link: {authorlink}

By admin