简体   繁体   中英

Multi-tenant (SaaS) web app on Azure, Deployment options

I am in the planning phase for a multi-tenant web application primarily for US customers which would most likely be hosted on Azure.

I am looking at the various pricing/deployment plans and was curious about the following:

As per their website:

Run up to 10 web sites per sub-region for free in a multi-tenant environment. Seamlessly upgrade to a paid shared multi-tenant or reserved instance model as your traffic grows.

Does the above mean different instances of the same site or up to 10 different sites?

Also does any one know if a single website could subscribe to multiple SQL Server instances? For example the maximum limit for database, size is 150 GB.

My intended site, considering its growth potential might have a users base between 100-200 users in the first six months. My basic plan would give each customer at least 1GB of data storage. So assuming I exceed the 150GB limit, then I could add additional databases for the same site?

I'm pretty new to the whole Cloud thing, so please bear with me and share your thoughts.

I have a multi-tenant app on Azure not to dissimilar to what you describe. For a largish multi-tenant app I would forget about Web Sites and use Web Roles. I also would avoid having a separate site for each client, they should ideally be running through the same role which can be load balanced over several instances. You can still set up host headers (ie site1.mysite.com ) for each individual user, all running off the same web role.

I have all my clients running in the same database, this is not to hard to implement and will scale better (you think Google has a database per client?). There is no reason you can't go to more databases later or you can use SQL Azure Federations and have a federation for each client, but going the other direction is much harder. If you have a separate database for each client you will then have to manage each database (schema updates, backups) individually which could be a lot more work (and expense). Cost will influence design here. A 1gb database will cost $10 a month, so if your clients are only paying $20 a month it is not really viable. But if they pay $1000 month then it is not a problem.

Design your app to not use sessions, it is not that hard and will scale better.

Finally, SQL Azure databases are not run on super high end database server. You need to optimise your data access and take load of the database server as much as possible. For example use Azure Caching to cache reference data and Table Storage to store audit log or similar historical data.

My $0.02

  1. I think it means your can create up to 10 web sites for free mode. And you can create more if you upgraded it to shared or reserved mode.

  2. You can connect to the SQL servers as many as you want. I don't think there's any restriction on SQL server connections in windows azure web site. But yes, the max database size is 150GB currently.

  3. If you plan to provide 1GB per customer by default, I strongly recommend you create a separated database per customer. This provides better security boundary, cleaner architecture and code structure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM