0

AWS 似乎有点令人生畏,有太多重叠的服务,所以我正在寻找一些建议和方向。

我们有一个移动应用程序,我们为其开发了一个同步服务器(即用户将注册,同步保存在 AWS 上的数据)。目前我们已经设置了一个带有 Web 服务器、Django 端点和 postgres 服务器的 EC2 实例。但是,我们需要以下内容:

  1. 确保服务可从世界不同地区获得,以便更快地访问
  2. 如果这需要将 postgres 服务器放在 EC2 之外,我们需要什么服务以及复制如何工作?
  3. 我们将在 S3 上单独存储较大的文件附件,但需要安全地执行此操作并加密文件
  4. 最终,我们将托管一个连接到同一数据库的网络应用程序(即 Angular 2 应用程序)。

我们还需要以最经济的方式完成所有这些工作,然后随着负载的增加而扩大规模。

请任何指导将不胜感激。我目前正在与术语作斗争。我们还设置了一个 Amazon SSL 证书,但这需要一个弹性负载均衡器,但我们只有一个 EC2 实例。我们该怎么做才能让这一切安全地工作?

4

2 回答 2

1

根据提供的信息,我建议您从 AWS Elastic Beanstalk 开始,它将管理自动缩放和负载平衡,同时为您提供用于外部域映射的 DNS URL。

  1. 为确保该服务可从不同区域获得以便更快地访问,您可以使用 Cloudfront 缓存静态 Angular 应用程序。然后您将能够将 SSL 证书添加到 Cloudfront 而不是 ELB。如果您计划为不同区域创建多个环境,则可以使用 Route53 进行基于地理的路由。
  2. 要将 Postgres 服务器置于 EC2 之外,您可以使用 AWS RDS,它支持多可用区部署的同步复制和故障转移,如果您计划在不同区域设置多个部署环境,RDS 中的 Postgres 还支持跨区域复制。您还可以创建读取副本以提高异步复制的读取速度。
  3. 您可以使用来自 KMS 或来自您的客户端的密钥使用 AES256 加密 S3 中的文件,我建议在为这些文件提供服务的 S3 之前使用 Cloudfront 的签名 URL ,以便客户端可以安全直接地访问它们,从而提高性能分布式缓存。
  4. 您可以使用 Cloudfront 在 AWS S3 和缓存中托管 Angular 应用程序,以加快访问速度。另一种选择是在 Cloudfront 中缓存静态资产路径,以便从 Cloudfront 为后续的静态资产请求提供服务。

来自亚马逊的常见问题

Who should use AWS Elastic Beanstalk? Those who want to deploy and manage their applications within minutes in the AWS Cloud. You don’t need experience with cloud computing to get started. AWS Elastic Beanstalk supports Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker web applications.

于 2017-04-21T12:15:13.510 回答
0

Your current environment isn't scalable (either load-responsive or to another region). If you need scalability then it should be re-arranged. It is difficult to provide you with details because the required environment depends on the applications architecture, however there are some suggestions:

  • DB: For better stability multi-AZ RDS setup for the DB is recommended. Benefit is RDS is fully managed service so you don't need to worry about replication, maintenance etc.
  • Web/app servers: you can deploy a copy in any region you want and connect to the same DB.
  • S3: you can enable crosss-region replication as well as encryption, but make sure it is used wisely (e.g. files are served to the client from bucket in closest region)
  • You can set up your own SSL on the server and it does not require ELB. However, you can use ELB with one webnode only.
  • I do NOT suggest to use Beanstalk because despite it really makes the first steps more easier you may have trouble trying to configure something non-standard in the future (unless you're very well familiar with EBT, of course).
  • To add efficiency you may want to add CDN (either AWS ot another vendor).

Make sure your environment configuration is really secure. You may need for your team someone who is familiar with AWS because every topic can be converted to a separate article.

于 2017-04-21T14:33:31.900 回答