将 Azure 网站迁移到 Azure 云服务 [英] Migrate Azure Web Site to Azure Cloud Service

查看:26
本文介绍了将 Azure 网站迁移到 Azure 云服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我计划将 Web 应用程序作为 Azure 网站启动,然后如果需要作为扩展策略,将其迁移到 Azure 云服务(也称为托管服务).

I have a project and I'm planning to start the web app as an Azure Web Site and then migrate it to an Azure Cloud Service (also called Hosted Service) if it is needed as a scale strategy.

这个决定是因为我读到 Azure 网站开发起来更加简单和快速,几乎不需要 Azure 特定的配置或代码.因此,快速而简单地开始是项目的一个很好的起点.

The decision is because I read that Azure Web Sites are more simple and fast to develop with almost no Azure-specific configurations or code. So starting fast and simple is a good starting point for the project.

但是,这对您来说是一个好的起点吗?将 Azure 网站迁移到 Azure 云服务与将普通 ASP.NET 网站迁移到 Azure 云服务一样吗?您会从一开始就使用 Azure 云服务吗?如果是,为什么?

But, is that a good starting point for you? Is migrating an Azure Web Site to an Azure Cloud Service the same as you were migrating a normal ASP.NET Website to an Azure Cloud Service? Would you start with an Azure Cloud Service right from the beginning? If yes, why?

感谢您的宝贵时间.

推荐答案

这两种部署模型都有好处,最终取决于您要实现的目标以及应用程序的最终成功.

There are benefits to both deployment models, it will eventually come down to what you are trying to achieve and ultimately the success of your application.

我在下面概述了每种模型的优缺点,以确保您为自己的应用目标做出正确的选择.

Below I've outlined the Pros and Cons of each of the models to ensure that you're making the right choice for your applications goals.

您已经正确地确定 Windows Azure 网站是应用程序的一个很好的起点,但是您也可以认为网站确实为许多解决方案提供了足够的可扩展性.

You have properly identified that Windows Azure Web Sites is a great starting point for an application, however you could also consider that Web Sites does offer enough scalability for many solutions.

  • 10 个免费网站预览期间 [免费 12 个月]
  • 轻松部署(使用 Git、TFS、Web 部署或 FTP)
  • 快速可扩展性(您可以迁移到自己的专用集群 [aka 保留标准])
  • 简单开发(支持经典 ASP、ASP.NETNode.js, Python & PHP)
  • 持久化环境(大多数人都习惯了)
  • 10 Free sites during preview [Free for 12 months]
  • Easy Deployment (use Git, TFS, Web Deploy or FTP)
  • Quick Scalability (You can move to your own dedicated cluster [aka reserved standard])
  • Simple Development (Supports Classic ASP, ASP.NET, Node.js, Python & PHP)
  • Persistent Environment (most people are used to this)
  • 自定义域不支持 SSL
  • 预览中(目前没有 SLA)

云服务(以前称为托管服务)绝对是 Web 应用程序未来的愿景.它在构建时考虑了弹性,通过扩展以满足需求,并在流量变慢时回拨容量,从而使应用程序的成本保持在可承受范围内.

Cloud Services (formerly known as Hosted Services) is definitely the vision for the future of Web Applications. It is built with resiliency in mind to keep the cost of applications affordable by scaling to meet demand, and dial back capacity when your traffic slows.

  • 加强对应用成本的控制(如果架构正确)
  • 灵活性(您可以完全控制环境)
    • SSL 支持
    • 语言无关
    • Web 服务器不可知(尽管 IIS 默认可用)
    • 应仔细考虑架构
    • 部署时间较慢(开发周期变慢)

    以上项目可能已经为您提供了足够的计划应用程序的近期未来,并且您很可能希望在未来考虑云服务(从长远来看,它更适合许多应用程序场景).

    The items above might have given you enough to plan the immediate future of the application and it is very likely that you might want to consider Cloud Services in the future (it fits a number of application scenarios better in the long run).

    以下是有助于在网站之间移植到云服务的事项列表:

    Here is a list of things to help portability between Web Sites to Cloud Services:

    1. 开始思考无状态

    Windows Azure 网站很好,因为它是一个持久环境,这意味着您可以将会话状态和资产等内容存储到磁盘.

    Windows Azure Web Sites is nice as it is a persistent environment, which means you are able to store things like session state and assets to the disk.

    虽然这是一个很好的功能,但如果您的最终目标是云服务,那么最好开始规划无状态应用程序.以下是您可以做的一些事情来开始思考无状态:

    Although this is a good feature, it's best to start planning towards a stateless application, if your end goal is to be in Cloud Services. Here are a few things you can do to start thinking stateless:

    • 不要依赖会话状态
      • 如果您需要,想出一个策略来扩大规模(缓存服务、SQL 或存储)
      • 静态 HTML、css、javascript 和图像等资产最好放在 Storage 中
        • 避免在您的网站上增加额外的带宽(可能会保持更长时间的共享以降低成本)
        • 可以启用 CDN,为国际市场提供更好的体验
        • 将应用程序迁移到云服务时更容易更新网络资产
        • 如果您的应用程序已经存储到存储服务中,那么在将来迁移到云服务时,代码修改将减少.

        轻松发现数据中的模式

        云服务的好处是它使您能够通过仅扩展需要扩展的内容来降低成本.开始识别规模单位的过程,即如何对数据库或存储中的表进行分区.

        The benefit of Cloud Services is it enables you to reduce cost by only scaling what needs scaled. Starting the process of identifying your scale units i.e. How you partition your database or Tables in Storage.

        这篇关于将 Azure 网站迁移到 Azure 云服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆