Solution for PHP / MySQL website loading fast in multiple regions [closed]

There are many ways to skin a cat, but basically you do need to replicate your site in multiple geographic locations one way or another.

Here's several options which might be suitable assuming your application is read heavy (which most websites are). I'm not familiar with Expression Engine so I'm not sure how difficult these architectures would be to implement in your case.

Option 1: Cross-region read replicas

  • Have an EC2 application server in each region
  • Have a read replica database in each region
  • Only write to your master region database
  • If you have to deal with file uploads it's best to store these in S3 and have CloudFront cache them in various regions

Option 2: Caching proxies

If your content is almost completely static you can have a caching proxy in each region. If you don't need advanced caching rules CloudFront is a very easy solution, otherwise you can have EC2 instances with say varnish.

Option 3: Database caching

Databases are the most difficult element to distribute in your scenario, so you could leave this in a single region (and have other regions connect to the database in your master region), then use data caching in your application to minimise the latency. If your application supports memcache then ElastiCache might be an option.