Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for Mutli-Tenancy #91

Open
5 tasks
ShankarSinghC opened this issue May 7, 2024 · 0 comments
Open
5 tasks

[FEATURE] Add support for Mutli-Tenancy #91

ShankarSinghC opened this issue May 7, 2024 · 0 comments

Comments

@ShankarSinghC
Copy link
Contributor

ShankarSinghC commented May 7, 2024

Feature Description

Internal Implementation Details

Following are the points that the locker application needs to facilitate:

  1. Multi-Tenancy
  2. Logical Tenant Isolation

Multi-Tenancy

Multi-tenancy can be achieved by constructing different app state based on the request context. This will prevent major changes in the application logic while enabling multi-tenancy. This can be achieved by adding a middleware that will construct the app state based on the request context and forward it to the request handler.

Logical Tenant Isolation

Logical tenant isolation can be achieved by implementing schema based multi-tenancy. This will allow the application to have a single database but different schemas for different tenants. This will prevent data leakage between tenants and will also allow the application to scale horizontally. This can also enable use (in future) to split the database based on the tenant schema.

This can also be done in the same middleware, where we can fetch the appropriate connection pool based on the tenant schema and forward it to the request handler.

Approach:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant