Windows Azure-将.NET Web应用程序传输到Azure

问题描述:

我希望有人可以在Windows Azure上回答一些简短的问题.我知道这有点偷懒,但是涵盖Azure的Microsoft网站似乎是针对半技术项目负责人和完整的业务指标的,它们似乎从未真正提供过关于方法"的简短概述.

I was hoping someone could answer some brief questions on windows Azure. I know this is a bit lazy, but the Microsoft websites covering Azure seem to be directed at semi technical project leads and full of business metrics - they never really seem to give a good short overview of the 'how'.

我有一个ASP.NET Web应用程序,需要做一些工作来辅助扩展(那里有一些蜘蛛型进程和一个相当大的数据库.它还对外部Web服务进行了许多调用).

I have an ASP.NET web application that requires some work to assist with scale (there's some spider type processes in there and a pretty large database. It also makes many calls to outside web services).

我的问题是:

  1. 从开发角度看-从标准iis/sql服务器类型设置为Azure移植应用程序有多容易.是否涉及很多编码.我已经开始播放一个培训视频,您可以对面料"等进行编程.将应用程序转换为Azure真的可行吗?

  1. From a development point of view - how easy is it to port an application from standard iis / sql server type set up to Azure. Is there much coding involved. I've gone as far as starting a training video that has you programming the 'fabric' etc. Is it really practical to convert an application to Azure?

我听说您可以在Azure中运行Windows Server 2008 R2实例-这是否意味着您不必使用Azure特定的SDK进行编程,而只需将iis/sql服务器设置为天蓝色并立即利用可扩展性的好处?

I've heard that you can run Windows Server 2008 R2 instances in Azure - does this mean you don't necessarily have to program with Azure specific SDK, and can just move your iis / sql server set up to azure and utilise benefits of scalablility immediately?

您遇到了很多问题:培训,移植,扩展和虚拟机管理.

You hit on several points: training, porting, scaling, and virtual machine management.

培训

您可能应该在 MSDev href ="http://www.msdev.com/Directory/SearchResults.aspx?keyword=azure"上观看一些介绍性视频>.最新版本是"Windows Azure Fall 2010"系列.请注意,要在Azure中运行应用程序,您需要了解Azure Fabric和相关服务,例如诊断和角色管理.

You should probably look at some of the intro videos at MSDev. The "Windows Azure Fall 2010" series are the latest ones. Note that, to run an app in Azure, you need to understand the Azure Fabric and related services such as diagnostics and role management.

移植

您需要查看在asp.net核心之外的工作,例如缓存,会话状态管理,安全性,第三方DLL,COM,注册表访问以及任何其他管理员级别的功能.如今,使用SDK 1.2,您将无法操作注册表或运行MSI.我有一个相关的*帖子关于一些内容您可能会遇到挑战的领域.关于SQL Azure:未实现某些功能(例如CLR支持),并且您将无法访问某些系统级功能.可以在 SQL Azure网站上的白皮书中找到有关差异的详细信息.

You'll need to look at what you're doing beyond core asp.net, such as caching, session state management, security, 3rd-party DLLs, COM, registry access, and any other admin-level functions. Today, with SDK 1.2, you won't have the ability to manipulate the registry or run an MSI. I have a related * post about some of the areas where you might run into challenges. Regarding SQL Azure: Some features, such as CLR support, are not implemented, and you won't have access to some system-level features. Details about differences can be found in a whitepaper on the SQL Azure site.

借助PDC 2010引入的新功能,您应该能够克服几乎所有这些问题:

With the new features introduced at PDC 2010, you should be able to overcome nearly all of these issues:

  • 会话状态可以托管在 AppFabric缓存.这将只是 您的配置更改 配置.此缓存将可用 在您所有部署的网站上 实例,使您可以扩展.
  • 通过管理员模式可以进行管理员级别的访问.您将能够 当您的角色实例启动时,运行MSI并修改诸如注册表之类的内容.
  • Session state may be hosted in AppFabric Cache. This will simply be a configuration change to your config. This cache will be available across all of your deployed web instances, allowing you to scale.
  • Admin-level access is available with Admin mode. You'll be able to run MSI's and modify things like the registry when your role instances boot up.

缩放

您需要仔细查看您的应用如何处理缩放.例如:如果所有服务器实例尝试同时使用同一资源并导致锁定,则可能会遇到瓶颈.一种常见的Azure模式是将工作项放置在持久的Azure队列中,并让后台工作人员角色实例异步使用这些工作项.

You'll need to look closely at how your app handles scaling. For example: you might have a bottleneck if all server instances attempt to work simultaneously with the same resource, causing locks. A common Azure pattern is to place work items in a durable Azure Queue and have background worker role instances consume these work items asynchronously.

如今,Azure没有提供现成的会话状态管理功能(例如,在SQL Server中存储状态).但是,在网站上有一个可下载示例.与SQL Azure配合使用的SQL Azure博客.如上所述,新的AppFabric缓存功能将提供会话状态管理,因此您将很快拥有一个现成的解决方案.

Today, Azure doesn't provide an out-of-the-box session state management ability (e.g. storing state in SQL Server). However, there's a downloadable sample on the SQL Azure Blog that works great with SQL Azure. As mentioned above, the new AppFabric Cache feature will provide session state management, so you will soon have an out-of-the-box solution.

虚拟机管理

VM Role在PDC上宣布.本质上,这将使您能够获取本地生成的Windows Server 2008 R2映像,并将其移至Azure.您需要安装Azure扩展,以允许该图像由Azure结构管理.

VM Role was announced at PDC. In essence, this will provide you the ability to take a Windows Server 2008 R2 image, built locally, and move it to Azure. You'll need to install Azure extensions that allow the image to be managed by the Azure fabric.

但是有一个折衷方案:您的VM不会从操作系统升级和补丁中受益:您将负责管理这些更新(通过差异磁盘). Azure架构仍将监视您的VM的运行状况,并在必要时重新启动或移动它.我建议您先尝试使用管理模式,这样您仍然可以利用Azure的100%服务.

There is a tradeoff though: Your VM won't benefit from OS upgrades and patches: You'll be responsible for managing these (via differencing disk). The Azure fabric will still monitor your VM's health, and reboot it or move it if necessary. I would recommend first attempting to utilize Admin Mode, so you can still take advantage of 100% of Azure's services.