Creating Databases for Each Client in a Multi-Tenant System
Asked by
TechExplorer92
Hey everyone! I'm diving into multi-tenant systems and I'm curious about how to handle database creation when a new client signs up. If I want to have one database for each tenant, what's the best practice for creating these databases? Is it common to run some commands (maybe using a lambda function) to create a new database and migrate it right after user signup? Any tips or common patterns would be super helpful!
Answers
It really depends on how many clients you have. If it's just a few high-value clients, creating dedicated AWS accounts for each might be a good move for better isolation. If youโre looking at around 500 clients, most of whom won't exceed 1GB of data a year, it might be worth considering multiple databases, but that can get a bit complex. Just keeping that in mind!
Reply to this answer
Add your answer
Answers are reviewed before publication.
CloudNinja23: I'm thinking about that too! I haven't even started my MVP yet, but establishing multiple databases upfront seems like a solid strategy.