Windows Azure Can I run multiple WebSites on the same Extra small instance or Small instance [closed]

吃可爱长大的小学妹 提交于 2019-11-29 06:56:19

问题


I'm evaluating MS cloud Windows Azure for hosting 3 completely separated websites.

Every website has its own database and they are not connected, so 3 websites and 3 databases.

My aim is to optimize costs for a start-up project with the possibility to scale up on demand.

I would like to know:

  • If is possible to host 3 websites on the same instance (Extra small instance or Small instance).
  • if is possible to host 3 databases on the same Sql Azure database (so I would use the total amount of SQL storage for my 3 databases) or for each website database I have to pay an instance of SQL Azure.

Thanks for your time on this.


回答1:


You can absolutely run multiple web sites on the same instance, starting with SDK 1.3, as full IIS is now running in Web Roles. As Jonathan pointed out with the MSDN article link, you can set up the Sites element to define each website. You should also check out the Windows Azure Platform Training Kit, which has a lab specifically around building a multi-site web role.

You can also take advantage of something like Cloud Ninja or Windows Azure Accelerator for Web Roles, which provides a multi-tenant solution that you can load into your Web Role (check out the Cloud Cover Show video here for more info).

When hosting multiple websites, remember that they're all sharing the same resources on an instance. So you might find that an Extra Small instance won't meet your performance needs (it's limited to 768MB RAM and approx. 5Mbps bandwidth). I think you'll be fine with Small instances and scaling out as you need to handle more traffic.




回答2:


For the past several months, I've been running three websites on a pair of extra small instances, including albahari.com, linqpad.net and the LINQPad licensing server (which uses LINQ to SQL). The trick is to serve large static content directly from blob storage so that it's not subject to the 5MBit/second I/O bandwidth restriction. And I've never got anywhere close to running out of memory.

A pair of extra small Azure instances is a great alternative to shared hosting when you need better reliability, security and performance.

Edit: close to a year now, still no problems with multiple websites on Azure. I will never go back to shared hosting.




回答3:


You can definitely run 3 websites in the same instance. Check out this MSDN article that shows you how to form your configuration file such that you can host multiple websites within a single role. One thing to note though since you mentioned "scaling on demand" - when you scale an instance with multiple websites, you are scaling the instance, which means all of the sites will scale together. You can't scale just one of the sites on the shared instance.

For the databases, in theory this can be done, but it would be "manual" in that you would have to all of your tables across the three databsaes in the same database and you would probably want to prefix them with some sort of indicator so that you know which table belongs to which application. This is certainly not a recommended practice, but if it works for your solution, then there is nothing technical preventing you from doing it. If at all possible, I would recommend multiple databases.



来源:https://stackoverflow.com/questions/7203744/windows-azure-can-i-run-multiple-websites-on-the-same-extra-small-instance-or-sm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!