0

I'm a newbie about Amazon cloud and I need an help in order to reduce the geographically latency of a website.

I have an Amazon Ec2 with LAMP and RDS in EU Irland. I wish to have the same information (php files, css, images, database, ...) on new instances opened in different regions.

Is there a way to do it?

Thank you

Luca
  • 123
  • 1
  • 5

2 Answers2

0

I wish to have the same information (php files, css, images, database, ...) on new instances opened in different regions

for your flat files, you can simply set up a cron to rsync over data to new instances every however often.

for your database, it can get a bit complicated. is the php code simply doing reads on db (selects)? or will both locations be writing to their local master? if new location can be read-only for db, then just set up a mysql master in one region, and a slave in the second.

do both locations require local write (does it matter that you have split master scenario... each master has different data)?

if both locations write to the master, you could use mysql clustering, such as galera

http://codership.com/content/using-galera-cluster

or simply have the php app code write to remote master, but read from local slave.

http://aws.amazon.com/rds/faqs/#86

if multi-region replication is to be implemented, whatever the write strategy, you must run your own mysql, as RDS does not support multi-region replicaiton

nandoP
  • 2,021
  • 14
  • 15
  • Thank you really for your detailed reply. It's really useful to understand the right approch. What about having the database on google? I see that they do db replication https://developers.google.com/cloud-sql/faq#replication – Luca Nov 13 '13 at 19:46
0

It seems that now it's possibile to have a copy of Amazon RDS DB Snapshots across AWS Regions

Luca
  • 123
  • 1
  • 5
  • ...and mysql 5.6 support full text search on innodb table http://dev.mysql.com/doc/refman/5.6/en/innodb-table-and-index.html#innodb-fulltext-index – Luca Nov 14 '13 at 00:01