1

First of all, I am pretty new to AWS, so my question might seem very amateur.

I am a developing a web application which needs to available globally and currently am hosting it on amazon. Since the application is still under development, i have set it up in the Singapore region. However, when i test the application, i get good response times from locations on the the east side of the globe(~50ms). However, when i test the response times from the US, it's ~550ms. So we decided to have 2 instances one in Singapore and one in the US. But i'm not able to figure out a way to handle data replication and load balancing across regions. Elastic Beanstalk only allows me to do this in a particular region. Can somebody please explain how i can achieve global availability for my web app. The following are the services i currently use. 1. Amazon EC2 2. Amazon S3

I need both database replication and S3 file replication. Also it would be great if there was a way where i just need to deploy my application on one place and the changes are reflected across all the instances we would have on the globe.

1 Answers1

1

Before you spend a lot of time and money setting up redundant servers in different regions, you may want to make sure that you can't get the performance improvement you need simply by implementing AWS Cloudfront:

Amazon CloudFront employs a network of edge locations that cache copies of popular files close to your viewers. Amazon CloudFront ensures that end-user requests are served by the closest edge location. As a result, requests travel shorter distances to request objects, improving performance. For files not cached at the edge locations, Amazon CloudFront keeps persistent connections with your origin servers so that those files can be fetched from the origin servers as quickly as possible. Finally, Amazon CloudFront uses additional optimizations – e.g. wider TCP initial congestion window – to provide higher performance while delivering your content to viewers.

http://aws.amazon.com/cloudfront/faqs/

The nice thing is, you can set this up and test it out in very little time and for very little money. Obviously this won't solve all performance problems, especially if you app is performance bound at the database, but this is a good way of taking care of that 'low hanging fruit' when trying to speed up your website in diverse locations around the world.

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • Thanks for the reply. I'll try it out and let you know the results. I'm not able to up vote the answer as i don't have the required reputation points. – Arjun Kishore Aug 01 '14 at 15:46
  • You write that CloudFront won't tackle a db bottleneck issue, did I understand that correct? So what would you suggest, how can I solve this problem within AWS (using EC2 / RDS)? Would I need duplicate the EC2+RDS instances on the region I am trying to supply? – konrad_pe Dec 01 '15 at 10:16
  • 1
    You could consider setting up cross-region read replicas: https://aws.amazon.com/blogs/aws/cross-region-read-replicas-for-amazon-rds-for-mysql/ – E.J. Brennan Dec 01 '15 at 10:49
  • That is exactly what I was looking for. So basically I create read replicas of my RDS instances for whatever region I want, create one (or more) EC2 instances in the same region and connect those to the replica. Remaining question for me is how our app knows which region/instance to use - one orchestrator-like component to redirect the user accordingy? Thank you so far already, your comment was of huge help to me. – konrad_pe Dec 01 '15 at 11:43