Hi there!
I’m planning to create an e-commerce platform where different businesses can set up their own stores online. Think of something like Shopify where each business gets their own space. I want to use PostgreSQL with separate schemas for each tenant to keep everything isolated.
Since I already know JavaScript pretty well and have worked with Express and Next.js before, I’m thinking about using Node.js for the server side. But I have some questions before I start:
-
Can Node.js handle this type of multi-tenant system effectively?
- Will there be performance issues when lots of users are connected?
- How does it stack up against other server technologies for this scenario?
-
Which database tool should I pick: Prisma, Sequelize, or maybe Knex?
- I heard Prisma might have problems with the schema-per-tenant approach
- Knex looks more flexible for changing schemas on the fly
- Maybe I should just stick with plain SQL using the
pglibrary?
-
Any suggestions for:
- Handling separate schemas for each tenant in PostgreSQL
- Running database migrations for individual tenants
- Setting up subdomain routing like
business1.myplatform.com
I’d really appreciate advice from anyone who has built similar platforms or worked with big multi-tenant applications using Node.js.
Thanks!