I am developing a multi tenant app. I want each tenant to have a subdomain
Currently, the app is hosted on a digitalocean ubuntu server with nginx as a proxy using a wildcard *.mydomain.com
I was thinking about using only one instance of the app and one collection for all tenants/subdomains, determining the content to serve based on the subdomain name.
As I am quite new to Meteor and to web development in general, I would appreciate your insight about this architecture. Here are some concerns that I have:
- Use one instance for all tenants/subdomains or one instance per tenant (app doesn’t do much server side, so don’t need much ressources)
- Use only one database and collection for all tenants or one collection per tenant (database content will be quite small for each tenant)
- How does the chosen architecture scale? What if I have 100 subdomains? 10000?
- Any problem you can see with the subdomain approach?