Before you invest in multi-tenancy
There is no clever trick in this one, just a handful of decisions worth making deliberately. Before you spend anything on multi-tenancy, it is worth confirming a few things are already true.
Architecture is the set of decisions that are expensive to reverse, which is the only reason they deserve the name. It is the sort of thing that looks like polish right up until it costs you an enquiry.
Prerequisites
- You can describe the outcome you want in one sentence
- Someone owns it after the work is done
- Decide early whether tenants share a database or not
- You have a way to tell whether it worked
Common failure modes
Isolation is a security requirement, not a preference. Small and consistent beats large and occasional here. It is the sort of thing that looks like polish right up until it costs you an enquiry.
Noisy neighbours become a support problem before an engineering one. This is the sort of thing that compounds, quietly, in both directions. The practical test is whether someone new to the project could tell, in a minute, that it had been handled.
How to tell if yours is fine
Most systems fail at the seams rather than inside any one component. Three things worth confirming about multi-tenancy before you move on:
- Someone can say what the current setup is without going to look
- Decide early whether tenants share a database or not — and you know whether that is true here
- There is a way to tell whether the last change to this helped
If you are not sure where your systems currently stand on this, it takes us about an hour to find out.