Azure 計算選項的概觀Overview of Azure compute options

計算一詞是指您的應用程式執行所在運算資源的裝載模型。The term compute refers to the hosting model for the computing resources that your application runs on.

概觀Overview

頻譜的一端是基礎結構即服務 (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.

功能即服務 (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).
  • App Service 是用於裝載 Web 應用程式、行動裝置應用程式後端、RESTful API 或自動化商務程序的受控 PaaS 供應項目。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 Service管理裝載的 Kubernetes 服務來執行容器化應用程式。Azure Kubernetes Service manages a hosted Kubernetes service for running containerized applications.
  • Azure Container Instances 提供更簡單快速的方法,讓您無需佈建任何虛擬機器或採用更高層級的服務,就能在 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.