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

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

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


当前回答

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

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

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

其他回答

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).

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

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

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

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

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

这是一个常见的问题,我想从msdn中摘录一段。

访问服务,如缓存,服务总线,存储,SQL Azure数据库-网站:是WebRole:是

支持ASP。NET,经典ASP, Node.js, PHP-网站:是WebRole:是

共享的内容和配置-网站:是WebRole:否

使用GIT、FTP部署代码-网站:是WebRole:否

近即时部署-网站:是web brole:否

集成mysql即服务支持-网站:是WebRole:是

多部署环境(生产和登台)-网站:没有WebRole:有

网络隔离-网站:无web brole:有

远程桌面访问服务器-网站:没有WebRole:是

能够以更高的权限运行程序-网站:没有web brole:是

能够定义/执行启动任务-网站:没有web brole:有

能够使用不受支持的框架或库-网站:没有WebRole:有

支持Windows Azure Connect/ Windows Azure Network-WebSite:No WebRole:Yes

要获得更多详细信息,请访问这个链接:http://blogs.msdn.com/b/silverlining/archive/2012/06/27/windows-azure-websites-web-roles-and-vms-when-to-use-which.aspx

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角色,并根据需要进行扩展。