Prithwiraj Nath
Prithwiraj Nath

Reputation: 1

Should I create Separate EC2 for each database

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.

I am seeking best cost effective and best performance solution.

Upvotes: -4

Views: 278

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269826

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.

Upvotes: 1

Related Questions