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

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

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


当前回答

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/

其他回答

Web角色提供了Web应用程序(以前的Web站点)之外的几个功能:

Ability to run elevated startup scripts to install apps, modify registry settings, install performance counters, fine-tune IIS, etc. Ability to split an app up into tiers (maybe Web Role for front end, Worker Role for backend processing) and scale independently Ability to RDP into your VM for debugging purposes Network isolation Dedicated virtual IP address, which allows web role instances in a cloud service to access IP-restricted Virtual Machines ACL-restricted endpoints (added in Azure SDK 2.3, April 2014) Support for any TCP/UDP ports (Web Sites are restricted to TCP 80/443)

Web应用程序比Web角色有优势:

Near-instant deployment with deployment history / rollbacks Visual Studio Online, github, local git, ftp, CodePlex, DropBox, BitBucket deployment support Ability to roll out one of numerous CMS's and frameworks, (like WordPress, Joomla, Django, MediaWiki, etc.) Use of SQL Database or MySQL Simple and fast to scale from free tier to shared tier to dedicated tier Web Jobs Backups of Web Site content Built-in web-based debugging tools (simple cmd/powershell debug console, process explorer, diagnostic tools like log streaming, etc.)

随着2014年4月和2014年9月的推出,现在有一些Web应用程序和Web角色(以及工作者角色)共同的特性,包括:

登台+生产槽 通配符DNS, SSL证书 Visual Studio集成 流量管理器支持 虚拟网络支持

以下是我从网站图库选择表单中截取的截图:

我认为Web应用程序是快速启动和运行的好方法,你可以从共享资源转移到预留资源。一旦你不再局限于此,你就可以升级到Web角色,并根据需要进行扩展。

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

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

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

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

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

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

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/

Azure网站、Web worker和虚拟机是Windows Azure上可用的三种不同的计算方法。他们在控制和责任的水平上有所不同:

Azure网站有最低级别的控制,但你不关心保持健康的虚拟机和IIS,因为Azure的东西为你做这些 Web角色给你更多的控制(流量管理器,远程桌面),但更多的管理是可能的,这意味着你可以通过远程桌面破坏一些东西 虚拟机让您完全控制VM,因此需要最大的管理工作。

没有最好的选择,因为这取决于你需要什么样的控制级别,你需要什么特性,以及你希望留给Azure哪些东西来维护。这是一个大话题。

请阅读这篇文章,了解更多信息,做出更明智的选择:

http://www.windowsazure.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/ http://davidpallmann.blogspot.com/2012/06/reintroducing-windows-azure-part-2.html

这可以归结为易用性和功能之间的权衡。

There is one more scenario that is up the air: After these 500 exceptions are eliminated, they haven't said anything about the ability of Azure Websites to handle wildcard CNAME's. Several of us are using Nate's Web Role Accelerator in Cloud Services, becuase a one-line hack provided wildcard subdomain capability in Nate's software. We can't move these wildcard subdomain apps until we know that Azure Websites will be able to handle them. If it won't ever be able to do that, then it goes down as a positive on the Web Role side of the equation. Also of note is that with pricing being exactly the same (after the preview discount expires), I'm not sure I want to give up my access to RDC and Event Viewer (just to mention two things).