Looted
Looted

Reputation: 343

SaaS application on Elastic Beanstalk

I'm designing a SAAS application, which will be hosted on AWS. Previously I have used Elastic Beanstalk to manage applications. I could design the app so that all clients share single DB (that should be easy using 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). I could also put EB aside and use different AWS services altogether.

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)?

Upvotes: 0

Views: 926

Answers (1)

Matt Houser
Matt Houser

Reputation: 36043

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:

  1. You'll have to pay for resources per customer. That includes EC2 instances, RDS instances, etc.
  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.

Upvotes: 1

Related Questions