mardi 21 avril 2020

Saas architecture question - create subdomains for my customers or not?

Working on my first Saas project and still thinking on architecture questions:

  1. Create subdomain for each customer like "customer1.mycompany.com", "customer2.mycompany.com", etc.
  2. Do not create subdomain and use path like "mycompany.com/customer1", "mycompany.com/customer2", etc.

Which of these ways is better if I consider:

  1. Use SSL
  2. Suggest that customer's customers can be a customers of another my customers. For example: external 3rd party "customer1" who is not mine can use service of both my customers "customer1.mycompany.com" and "customer2.mycompany.com" the same time and even cannot suggest that they use my Saas service (if they have their own domain name bound and set up brand pictures and colors).
  3. Opportunity to migrate my customers between servers.
  4. Avoid unnesserary server overloading.

What is about database, anyway I suppose to use one single DB for project (maybe shared tables in future to have scalability), I think multiple DBs for my customers is bad idea, because I will lost control on DB management, troubleshooting and project updates. Am I right with this? Please comment if not, I'm newbie in architecture.

Thanks in advance for your help!




Aucun commentaire:

Enregistrer un commentaire