新的Azure Web站点和传统的Azure Web角色之间有什么实质性的区别?NET MVC应用程序?我选择“网站”而不是“网络角色”的原因是什么?反之亦然?

让我们假设在两种情况下我都需要相同的容量(例如2个小实例)。除了网站在预览期有33%的临时折扣外,价格似乎是相当的。

我在“网站”上可以做的事情,在网络角色上是困难的或不可能的吗?例如,使用“网站”将多个网站放在一组虚拟机中变得容易吗?我在“网站”和“网络角色”之间失去了什么吗?能够微调IIS?是否能够在本地使用缓存服务?


当前回答

我发现的另外两件事是为自定义域站点获取SSL的成本和多租户配置。

对于网站,你需要在标准实例的基础上每月支付(小实例是最便宜的选择)。这意味着为了获得自定义域https将花费你~70/月的小实例加上~41/月的SSL支持所有浏览器。

对于WebRole,您可以免费获得XS实例并添加自己的SSL,这意味着每月约15美元 你有一个自定义的SSL域。

对于多租户网站检查 多租户Azure动态通配符CName

其他回答

我发现的另外两件事是为自定义域站点获取SSL的成本和多租户配置。

对于网站,你需要在标准实例的基础上每月支付(小实例是最便宜的选择)。这意味着为了获得自定义域https将花费你~70/月的小实例加上~41/月的SSL支持所有浏览器。

对于WebRole,您可以免费获得XS实例并添加自己的SSL,这意味着每月约15美元 你有一个自定义的SSL域。

对于多租户网站检查 多租户Azure动态通配符CName

Azure Web角色就像一个虚拟的私有主机。你有一个虚拟机作为你的web服务器,你拥有这个虚拟机实例。

Azure Web站点就像一个弹性共享托管服务。你把你的应用程序部署到一个不受你控制的web服务器上,它也为其他用户的网站提供服务。您可以根据资源需求的变化,上下扩展站点(需要额外付费),使其更具弹性。

我刚刚在http://robdmoore.id.au/blog/2012/06/09/windows-azure-web-sites-vs-web-roles/上发表了一篇关于这个主题的全面博客文章。

我的结论摘录如下:如果你需要巨大的规模,SSL,亚洲或美国西部的数据中心,一个非标准配置(IIS,端口,诊断,安全证书或启动脚本),RDP或具有成本效益的工作者角色(结合你的Web角色),那么你现在将不得不坚持使用Web角色。

否则,网站是一个很好的选择!

Azure Web Sites enables you to build highly scalable web sites quickly on Azure. You can use the Azure Portal or the command-line tools to set up a web site with popular languages such as .NET, PHP, Node.js, and Python. Supported frameworks are already deployed and do not require more installation steps. The Azure Web Sites gallery contains many third-party applications, such as Drupal and WordPress as well as development frameworks such as Django and CakePHP. After creating a site, you can either migrate an existing web site or build a completely new web site. Web Sites eliminates the need to manage the physical hardware, and it also provides several scaling options. You can move from a shared multi-tenant model to a standard mode where dedicated machines service incoming traffic. Web Sites also enable you to integrate with other Azure services, such as SQL Database, Service Bus, and Storage. Using the Azure WebJobs SDK preview, you can add background processing. In summary, Azure Web Sites make it easier to focus on application development by supporting a wide range of languages, open source applications, and deployment methodologies (FTP, Git, Web Deploy, or TFS). If you don’t have specialized requirements that require Cloud Services or Virtual Machines, an Azure Web Site is most likely the best choice.

Cloud Services enable you to create highly-available, scalable web applications in a rich Platform as a Service (PaaS) environment. Unlike Web Sites, a cloud service is created first in a development environment, such as Visual Studio, before being deployed to Azure. Frameworks, such as PHP, require custom deployment steps or tasks that install the framework on role startup. The main advantage of Cloud Services is the ability to support more complex multitier architectures. A single cloud service could consist of a frontend web role and one or more worker roles. Each tier can be scaled independently. There is also an increased level of control over your web application infrastructure. For example, you can remote desktop onto the machines that are running the role instances. You can also script more advanced IIS and machine configuration changes that run at role startup, including tasks that require administrator control.

Virtual Machines enable you to run web applications on virtual machines in Azure. This capability is also known as Infrastructure as a Service (IaaS). Create new Windows Server or Linux machines through the portal, or upload an existing virtual machine image. Virtual Machines give you the most control over the operating system, configuration, and installed software and services. This is a good option for quickly migrating complex on-premises web applications to the cloud, because the machines can be moved as a whole. With Virtual Networks, you can also connect these virtual machines to on-premises corporate networks. As with Cloud Services, you have remote access to these machines and the ability to perform configuration changes at the administrative level. However, unlike Web Sites and Cloud Services, you must manage your virtual machine images and application architecture completely at the infrastructure level. One basic example is that you have to apply your own patches to the operating system.

从这个链接可以看到更新的和全面的比较:http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/

EDIT 2014:不管怎样,这个答案中的很多信息都不再正确了——请看评论。

在@David的回复中添加更多内容:

使用Windows Azure网站,您无法控制IIS或web服务器,因为您在同一台机器上使用一个资源片以及数百个其他网站,您像其他网站一样共享资源,因此无法控制IIS。

共享网站和Azure web角色之间的最大区别是,网站被认为是进程绑定,而角色被认为是虚拟机绑定。

网站存储在内容共享中,可以从场中的所有“web服务器”访问,因此不需要复制或类似的东西。

Windows Azure网站不能有自己的主机名,而是必须使用websitename.azurewebsites.net,你当然可以在你的DNS提供商中使用CNAME设置来路由你的请求,与之前的Windows Azure角色完全相同,只有当它们在保留模式下运行时。共享网站不支持CNAME设置。