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

Multi-Tenant support #350

Open
0xAda opened this issue Aug 1, 2024 · 4 comments
Open

Multi-Tenant support #350

0xAda opened this issue Aug 1, 2024 · 4 comments

Comments

@0xAda
Copy link
Contributor

0xAda commented Aug 1, 2024

Core is currently a single tenant app, this has historically been inconvenient. Running multiple instances on one box requires us to juggle resource allocations, a multi tenant approach would allow us to run these all on one instance which has all the resources. We'd also gain a lot of freedom in terms of test isolation, each test can run in its own tenant and we don't have to worry about clashing config changes and can test much more thoroughly (e.g. things that rely on specific database states).

In terms of implementation, I believe the best way would be to determine the tenant based on the host header. This would allow us to make the change entirely transparent to the frontend and any other API clients. The database changes would mostly be a matter of creating an event table and tagging top level objects (users, teams, categories, etc) with the event id. I'm not sure how we'd implement this on the views level, possibly some middleware magic could handle it, I'd be interested in thoughts from people more experienced with Django.

I have no thoughts yet on how we'd migrate our existing set of instances to one multi tenant instance, I'm fairly sure we have different versions running, that would be the first thing we need to rectify.

@jchristgit
Copy link
Collaborator

jchristgit commented Aug 1, 2024 via email

@jchristgit
Copy link
Collaborator

jchristgit commented Aug 1, 2024 via email

@jchristgit
Copy link
Collaborator

jchristgit commented Aug 1, 2024 via email

@0xAda
Copy link
Contributor Author

0xAda commented Aug 1, 2024 via email

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

No branches or pull requests

2 participants