您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure 计算选项概述Overview of Azure compute options

术语“计算”指的是计算资源(应用程序在这些资源上运行)的承载模型。The term compute refers to the hosting model for the computing resources that your application runs on.


一端是服务架构(Infrastructure-as-a-Service,IaaS)。At one end of the spectrum is Infrastructure-as-a-Service (IaaS). 使用 IaaS 可以预配所需的 VM 以及关联的网络和存储组件。With IaaS, you provision the VMs that you need, along with associated network and storage components. 然后将需要的任何软件和应用程序部署到这些 VM 上。Then you deploy whatever software and applications you want onto those VMs. 除非 Microsoft 管理基础结构,否则该模型最接近传统的本地环境。This model is the closest to a traditional on-premises environment, except that Microsoft manages the infrastructure. 仍由你管理单独的 VM。You still manage the individual VMs.

平台即服务 (PaaS) 提供托管的承载环境,可在其中部署应用程序而无需管理 VM 或网络资源。Platform as a service (PaaS) provides a managed hosting environment, where you can deploy your application without needing to manage VMs or networking resources. 例如,指定实例计数而不是创建单独的 VM,服务将预配、配置并管理必需的资源。For example, instead of creating individual VMs, you specify an instance count, and the service will provision, configure, and manage the necessary resources. Azure App Service 是 PaaS 服务的一个示例。Azure App Service is an example of a PaaS service.

从 IaaS 到纯 PaaS 存在一个范围。There is a spectrum from IaaS to pure PaaS. 例如, Azure Vm 可以使用虚拟机规模集自动缩放。For example, Azure VMs can autoscale by using virtual machine scale sets. 此自动缩放功能严格说来,并非 PaaS,但它是可能在 PaaS 服务中找到的管理功能类型。This automatic scaling capability isn't strictly PaaS, but it's the type of management feature that might be found in a PaaS service.

借助功能即服务(Functions-as-a-Service,简称 FaaS),更不需要担心承载环境。Functions-as-a-Service (FaaS) goes even further in removing the need to worry about the hosting environment. 只需部署代码,服务便会自动运行它,而无需创建计算实例并向其部署代码。Instead of creating compute instances and deploying code to those instances, you simply deploy your code, and the service automatically runs it. 无需管理计算资源。You don’t need to administer the compute resources. 这些服务使用无服务器体系结构, 并无缝地向上或向下扩展到处理流量所需的任何级别。These services use a serverless architecture, and seamlessly scale up or down to whatever level necessary to handle the traffic. Azure Functions 是 FaaS 服务。Azure Functions are a FaaS service.

IaaS 提供最大的控制力、灵活性和可移植性。IaaS gives the most control, flexibility, and portability. FaaS 具有简便性,提供弹性缩放能力,可能会节省成本,因为用户只为代码运行的时间支付费用。FaaS provides simplicity, elastic scale, and potential cost savings, because you pay only for the time your code is running. PaaS 则位于这两者之间。PaaS falls somewhere between the two. 通常情况下,服务提供的灵活性越高,用户配置和管理资源的责任越大。In general, the more flexibility a service provides, the more you are responsible for configuring and managing the resources. FaaS 服务自动管理运行应用程序的几乎所有方面,而 IaaS 解决方案需要用户预配、配置并管理自己创建的 VM 和网络组件。FaaS services automatically manage nearly all aspects of running an application, while IaaS solutions require you to provision, configure and manage the VMs and network components you create.

Azure 计算选项Azure compute options

以下是 Azure 中目前提供的主要计算选项:Here are the main compute options currently available in Azure:

  • 虚拟机是 IaaS 服务,允许在虚拟网络 (VNet) 内部署和管理 VM。Virtual Machines are an IaaS service, allowing you to deploy and manage VMs inside a virtual network (VNet).
  • 应用服务是托管型 PaaS 产品/服务,用于托管 Web 应用、移动应用后端、RESTful API 或自动化业务流程。App Service is a managed PaaS offering for hosting web apps, mobile app back ends, RESTful APIs, or automated business processes.
  • Service Fabric 是可在多个环境(包括 Azure 或本地环境)中运行的分布式系统平台。Service Fabric is a distributed systems platform that can run in many environments, including Azure or on premises. Service Fabric 是跨计算机群集的微服务业务流程协调程序。Service Fabric is an orchestrator of microservices across a cluster of machines.
  • Azure Kubernetes 服务为运行容器化应用程序管理托管的 Kubernetes 服务。Azure Kubernetes Service manages a hosted Kubernetes service for running containerized applications.
  • Azure 容器实例提供了在 Azure 中运行容器的最简捷方式,既无需预配任何虚拟机,也不必采用更高级的服务。Azure Container Instances offer the fastest and simplest way to run a container in Azure, without having to provision any virtual machines and without having to adopt a higher-level service.
  • Azure Functions 是托管的 FaaS 服务。Azure Functions is a managed FaaS service.
  • Azure Batch 是一个托管服务,适用于运行大规模并行和高性能计算 (HPC) 应用程序。Azure Batch is a managed service for running large-scale parallel and high-performance computing (HPC) applications.
  • 云服务是用于运行云应用程序的托管服务。Cloud Services is a managed service for running cloud applications. 它使用 PaaS 承载模型。It uses a PaaS hosting model.

选择计算选项时,应考虑以下因素:When selecting a compute option, here are some factors to consider:

  • 承载模型。Hosting model. 服务承载方式是什么?How is the service hosted? 此承载环境具有哪些要求和限制?What requirements and limitations are imposed by this hosting environment?
  • DevOps。DevOps. 是否存在用于应用程序升级的内置支持?Is there built-in support for application upgrades? 部署模型是什么?What is the deployment model?
  • 可伸缩性。Scalability. 服务如何处理实例的添加或删除?How does the service handle adding or removing instances? 能否根据负载和其他指标自动缩放?Can it autoscale based on load and other metrics?
  • 可用性。Availability. 什么是服务 SLA?What is the service SLA?
  • 成本。Cost. 除了服务本身的成本,还要考虑管理在该服务上构建的解决方案的操作成本。In addition to the cost of the service itself, consider the operations cost for managing a solution built on that service. 例如,IaaS 解决方案的操作成本可能更高。For example, IaaS solutions might have a higher operations cost.
  • 每项服务的总体限制有哪些?What are the overall limitations of each service?
  • 哪类应用程序体系结构适用于此服务?What kind of application architectures are appropriate for this service?

后续步骤Next steps

若要帮助选择应用程序的计算服务,请使用 Azure 计算服务的决策树To help select a compute service for your application, use the Decision tree for Azure compute services

有关 Azure 中计算选项的详细比较信息,请参阅选择 Azure 计算服务的条件For a more detailed comparison of compute options in Azure, see Criteria for choosing an Azure compute service.

有关 Azure 上的计算服务的指导介绍, 请尝试使用核心云服务-Azure 计算选项模块Microsoft LearnFor a guided introduction to compute services on Azure, try the Core Cloud Services - Azure compute options module on Microsoft Learn.