1

We run a busy web app, with most traffic being USA based. Our IT department is currently in the process of migrating our web server to the Amazon AWS EC2 environment and I'd like to make sure we set it up correctly geographically ...

Currently, the test environment AMI instance they set up is in the USA West region (North California). However, our traffic originates much more from Eastern than Western/Mountain regions (though the latter are hardly negligible). Our original hosting server is in Texas.

1) I think we will need to move the test AMI instance to USA East (Virginia) region where most of our traffic is. Is it easy to "move" or "mirror" an AMI to another region? Ideally, our primary instance would be in Virginia and we'd have another instance "mirrored" in California, which would sync any changes that we make to the primary instance.

2) Perhaps we should create a CloudFront CDN distribution instead of multiple AMIs in different regions? Or utilize both CloudFront CDN + two AMI instances set up, one for each coast?

3) [side question] Seems like we would need two separate AMI instances set up anyway to enable the load balancing feature in EC2?

dubesor
  • 327
  • 1
  • 7
  • 13

1 Answers1

2

First of all, think about having some kind of configuration management system available. With this you basically define a set of "roles" or "recipes" and assign your servers or instances to these roles. They will then automatically install, which makes tasks like changing the AWS region very easy. Have a look at this Wiki page for an overview.

While the latency inside the US is not that big compared to sending packages of the ocean, I would suggest to move your instance to your main traffic region, that is US east. However I do not think it is necessary in the first step to have another machine up and running in another region. I would suggest to use a service like Pingdom to measure your latency from different geographical regions. If you have the need to have another server up and running, you can still add it afterwards.

However what I would strongly suggest is using Cloudfront or another CDN. As most webpages have a lot of static files like images, css or javascript files, make sure they get delivered fast to the user. With Cloudfront you can always make sure that they will be served from the nearest endpoint. You will have a significant speedup through this.

j0nes
  • 8,041
  • 3
  • 37
  • 40
  • that config management stuff is a little over my head. it's not possible to set up synced AMIs from within AWS console? or do we absolutely need one of these 3rd-party tools? – dubesor Oct 26 '12 at 07:46
  • is it not possible to store our DB and web server files on a virtual 'drive' within AWS and then hook up two AMIs to feed realtime from it? so we don't have to take and copy snapshots all the time. i think i saw something related in my AWS reading so far but can't remember where ... – dubesor Oct 26 '12 at 07:47
  • Of course you can set up a NFS network share between your instances, but then you will still have the delay between us-east and us-west. The same goes for a database. You do not necessarily need configuration management tools, they only allow easier setup. Keeping different instances in different regions in sync is not that easy. Moving AMIs: http://stackoverflow.com/questions/5402013/move-amazon-ec2-amis-between-regions-via-web-interface – j0nes Oct 26 '12 at 07:50
  • thx for the link. if it's not easy to keep multiple AMIs in sync, how do others handle that for load balancing? since it seems load balancing requires at least two AMIs to be added ... – dubesor Oct 26 '12 at 07:52
  • See: http://serverfault.com/questions/249149/amazon-ec2-possible-to-use-elastic-load-balancing-across-web-servers-in-multipl?lq=1 – j0nes Oct 26 '12 at 07:57
  • re the linked serverfault post, it doesn't clarify things much. one answer there is that regional load balancing is impossible using AWS features only (true?). another is a suggestion to use cloudfront (though not meant for dynamic data?) – dubesor Oct 26 '12 at 10:02
  • so the bottom line seems to be to just use one instance? since it's a pain to replicate multiples and keep them synced or accessing the same data? yet one instance only rules out the load balancing feature in AWS console which would be a bonus ... – dubesor Oct 26 '12 at 10:05
  • You seem to be confusing Amis which ec2 instances. Ami is a disk image that you can use to launch ec2 instances. Typically, for a single,region setup, which seems appropriate for you at this point. You would place multiple ec2s based on the same ami, spread across two or more availability zones within the region, behind an elastic load balancer. – Mike Brant Oct 27 '12 at 06:26