AWS:启动启动服务器(Node.js + Postgres)

AWS: Start-up launch servers (Node.js + Postgres)

我们正准备启动我们的 iOS 应用程序,我们的后端在 Node.jsPostgres 数据库上。

我们计划使用Aurora Postgresql进行存储(只有文字,没有图片)。

目前,我们有一个 EC2 开发服务器 t2.small 是我为 36 months (All upfront) 预留的,它运行良好。此服务器在 Ubuntu.

上兼作 Node.js + Postgres

我们只想在北美(U.S。和加拿大)投入生产。我们现在有 0 个用户。如果我们能在接下来的 30-90 天内获得 10 个用户,我们就很幸运了。每个用户每周可以使用该应用几次,每次 5-10 分钟。

问题:我不确定应该使用多大的服务器。我愿意省钱快乐支付All Upfront;但是,我不确定:

  1. 预订时我应该为 Node.js 使用多大的服务器和多少台服务器?
  2. 我应该为 Aurora Postgres 预留多大的服务器以及多少台服务器。我们应该去无服务器吗?
  3. 我应该多久备份一次我的数据库,什么是省钱的好习惯。
  4. 我应该选择哪些区域?
  1. 您可以从 t2.small 开始,然后 scale up 实例(如果它陷入困境)
  2. 由于您目前没有用户,并且只希望未来的 10 位用户每周使用几分钟,我建议您使用无服务器(您必须 select Postgres 10.7) , 在不活动而不是暂停时将其设置为 pause after (at least) 5 minutes of inactivity, if your use case can tolerate a 30-second(ish) cold-start delay when the user first attempts to access the database. You can pre-warm the database by sending it an empty query ";" as soon as the user logs in to the app, which could make the cold-start invisible from the user's point of view. If your use-case can't tolerate a cold start, you can have it scale down 到 1 个 ACU。
  3. Aurora serverless 会自动执行每日备份,持续时间在 1 到 35 天之间,适合您的风险承受能力。
  4. 如果您的用户遍布美国和加拿大,请考虑将 us-east-2 作为(大部分)中心位置。