简体   繁体   English

SaaS在Elastic Beanstalk上的应用

[英]SaaS application on Elastic Beanstalk

I'm designing a SAAS application , which will be hosted on AWS . 我正在设计一个SAAS application ,该SAAS application将托管在AWS Previously I have used Elastic Beanstalk to manage applications. 以前,我曾使用Elastic Beanstalk来管理应用程序。 I could design the app so that all clients share single DB (that should be easy using EB ). 我可以设计该应用程序,以便所有客户端共享一个DB (使用EB应该很容易)。 Is there a way to have a separate database for each client? 有没有办法为每个客户端建立单独的数据库? I could use environments for that (which doesn't seem to be a good idea since environments aren't meant for that), or create a separate beanstalk app for each client (I'm not sure if that wouldn't make updates more of a hassle). 我可以为此使用环境(这不是一个好主意,因为环境并非旨在解决此问题),也可以为每个客户端创建一个单独的beantalk应用程序(我不确定这是否会带来更多更新)麻烦)。 I could also put EB aside and use different AWS services altogether. 我也可以将EB放在一边,并完全使用其他AWS服务。

My question is - can EB be used to create a multi-tenant SAAS app with isolated databases, or am I locked with a shared solution (single app, single db)? 我的问题是EB可以用于创建具有隔离数据库的多租户SAAS应用程序,还是我被共享解决方案锁定(单个应用程序,单个数据库)?

If your customers are "come to my site, sign-up, start using", then build it as a single-app, using a single db. 如果您的客户“来到我的网站,注册,开始使用”,然后使用单个数据库将其构建为单个应用程序。 Design your database and app to be multi-tenant properly segregating data with built-in authorization checks. 将您的数据库和应用程序设计为多租户,并使用内置授权检查功能正确隔离数据。

If your SaaS architecture uses EB environments or databases based on customer, then: 如果您的SaaS架构使用基于客户的EB环境或数据库,则:

  1. You'll have to pay for resources per customer . 您必须为每个客户支付资源。 That includes EC2 instances, RDS instances, etc. 其中包括EC2实例,RDS实例等。
  2. When a customer signs-up, they'll need to wait for these resources to initialize. 客户注册后,他们将需要等待这些资源初始化。 This delay may cause them to go elsewhere and not come back. 这种延迟可能会导致他们去别处而不回来。
  3. As your customer-base grows, so will your resources. 随着客户群的增加,您的资源也将增加。 Updates will take longer to apply. 更新将需要更长的时间才能应用。

I wouldn't consider a multi-tenant database architecture as being "locked in". 我不会认为多租户数据库架构是“锁定”的。 I consider it "the right thing" as long as it's designed properly. 只要设计合理,我就认为它是“正确的事情”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM