-4

I am creating one fullstack web application that will be used by different organisations (total 50+). I want to create separate database for each organisation.

Should I create separate EC2 and RDS for each organisation or what will be the best approach.

Note: Each org will have max 1000 users.

  • My plan is to use AWS elastic-beanstalk.
  • Frontend: Angular
  • Backend: Springboot

I am seeking best cost effective and best performance solution.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Most cost effective would be least resources - so a multi tennant application that shared RDS instance(s) and EC2 instance(s) between organizations. Whether that's less performant depends on application behavior. – erik258 Mar 04 '23 at 21:29
  • Please provide enough code so others can better understand or reproduce the problem. – Community Mar 05 '23 at 06:16

1 Answers1

1

A database 'server' can contain multiple logical 'databases'. Therefore, you would only need one database 'server'.

When the application connects to the database server, it would specify a 'database' via the connection string. It will then only see data in that logical database.

Here is a diagram from Creating, Destroying, and Viewing Databases :: Chapter 3. PostgreSQL SQL Syntax and Use :: Part I: General PostgreSQL Use :: Postgresql :: SQL :: eTutorials.org that demonstrates the concept (a 'cluster' is the database server):

Database server hierarchy

It is better to run your database on Amazon RDS (rather than on an Amazon EC2 instance), since it is fully-managed and is easy to make backups ('Snapshots') and to restore those backups. You can also scale the database independently to the EC2 instances.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470