Ask HN: Multi-tenancy in software vs. infrastructure for SaaS
What would be the best approach to be multi-tenant for $100k+ customers using your SaaS? (around 500 customers at scale)
Should you build your platform to be multi-tenant? or should you just run the whole stack separate for each customer in something like Kubernetes namespace and build an interface to easily create such environments?
14 comments
[ 2.8 ms ] story [ 82.9 ms ] threadIt can be easier to have custom subdomains running separate instances, since this will limit how outages/upgrades/security affect customers. You also can intentionally keep a customer on an old version, which can be a bug or a feature.
But it can also be easier to have tenants, since you can update all users at the same time and you will pay less overall for infrastructure.
Having done both, I personally prefer tenants since it's easier to write, support and scale. But if you're B2B, you should carefully investigate the other option.
However, like you said separate instances is easier to setup but I'm afraid of the extra management hassle of managing 500 different instances (including different micro-services, DBs, etc)
Multi tenancy has introduced a lot of config flags to enable/disable features for different customers - since they wont all agree to switch at the same time.
Both approaches have their pros/cons. I'd love to find a place to read about people's experience like you with both approaches.
Kubernetes is a great choice here.
https://news.ycombinator.com/item?id=23305111
One reason is overhead. Each instance of the system will have overhead, and as you scale to more and more customers, that overhead will eat up your profits. If it's a well-engineered multi-tenant system, you won't have this issue.
I'm a bit afraid that this may lead to a very brittle software/architecture in long term.