tenant application for multiple users

Asked

Viewed 219 times

1

Well my doubt and while the approach of creating a database in the following scenarios

  1. Multiple Database, a user-created database
  2. Multiple Schemas, well would have only a single database, but each user would have their schema
  3. A single table separated by user_id

Remembering that it would be an application that would have registration of products and each user could have between 4 thousand and 90 thousand products. It would also have a lot of registered customers, a lot of sales, anyway. It’s kind of big per user.

So I come here and I ask you, in my scenario with a lot of records in the database what do they indicate? With technologies

Spring-Boot/Java/JPA/Hibernate/REST/Postgresql

I read topics but nothing enlightening for my scenario. Some of them.

Multitenancy application and structure

Multi-client Web API Structure

How to work with multi tenancy architecture?

Web application for multiple people

1 answer

0

Simplest possible answer:

1 - single schema: if you have many tenants (clients), thousands etc, this option is best for administration reasons as it would not be very feasible to manage thousands of separate schemas.

But in this option, if these tenants have a lot of data, performance may decline.

2 - separate schemas: this option is the best in case of many users accessing the system and making requests; possibility to customize the application per tenant.

This option is not very good for many tenants, imagine having to create thousands of schemas for each tenant and manage the same.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.