在Amazon Web Services上设置全球可用的Web应用程序

问题描述:

首先,我是AWS的新手,所以我的问题似乎很业余.

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

我正在开发一个Web应用程序,该应用程序需要在全球范围内可用,目前正在将其托管在亚马逊上.由于该应用程序仍在开发中,因此我已经在新加坡地区进行了设置.但是,当我测试该应用程序时,我从地球仪东侧的位置获得了良好的响应时间(〜50ms).但是,当我测试来自美国的响应时间时,大约是550ms.因此,我们决定在新加坡有2个实例,在美国有1个实例.但是我无法找出一种方法来处理跨区域的数据复制和负载平衡. Elastic Beanstalk仅允许我在特定区域中执行此操作.有人可以解释一下我如何实现Web应用程序的全球可用性.以下是我当前使用的服务. 1. Amazon EC2 2. Amazon S3

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

我需要数据库复制和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.

在花费大量时间和金钱在不同地区设置冗余服务器之前,您可能需要确保无法获得性能上的提高只需通过实施AWS Cloudfront即可:

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使用边缘位置网络进行缓存 观看者附近的热门文件副本.亚马逊CloudFront 确保最终用户的请求由最接近的边缘处理 地点.结果,请求旅行的距离更短 对象,提高性能.对于未在边缘缓存的文件 位置,Amazon CloudFront保持与您的持久连接 原始服务器,以便可以从原始服务器获取这些文件 服务器尽快.最后,Amazon CloudFront使用 其他优化-例如更宽的TCP初始拥塞窗口– 在提供您的内容的同时提供更高的性能 观众.

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.