Skip to content

Multi-Tenant support #350

@0xAda

Description

@0xAda

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions