Skip to main content

Choose an Azure Compute Service

Azure provides many ways to host your application code. The term compute refers to the hosting model for the resources that your application runs on. This guide helps you choose a compute service for your application.

Decision Tree

Use the following flowchart to select a candidate compute service:

Azure compute service decision tree

Migration vs. New Build

Migration Path:

  • Lift and shift: Migrate without redesigning the application or making code changes (also known as rehosting)
    • → Azure App Service (if cloud-optimized)
    • → Azure VMware Solution (if VMware workload)
    • → Virtual Machines (if cannot be lifted and shifted)
  • Cloud optimized: Refactor to take advantage of cloud-native features
    • → Azure App Service
    • → Azure Container Apps
    • → Azure Kubernetes Service (AKS)

Build New Path:

  • Need full control? → Virtual Machines
  • High-performance computing (HPC)? → Azure Batch
  • Event-driven workloads? → Azure Functions
  • Managed web hosting? → Azure App Service
  • Need orchestration?
    • → Azure Container Instances (simple)
    • → Azure Service Fabric (distributed systems)
    • → Azure Red Hat OpenShift (OpenShift)
    • → Azure Kubernetes Service (AKS) (Kubernetes)
    • → Azure Container Apps (serverless containers)

Understanding Hosting Models

Cloud services fall into three categories:

Infrastructure as a Service (IaaS)

  • Provision VMs along with networking and storage components
  • Deploy any software and applications on those VMs
  • Closest to traditional on-premises environment
  • Microsoft manages infrastructure, you manage VMs
  • Example: Azure Virtual Machines

Platform as a Service (PaaS)

  • Managed hosting environment
  • Deploy applications without managing VMs or networking resources
  • Examples: Azure App Service, Azure Container Apps

Functions as a Service (FaaS)

  • Deploy code to the service, which automatically runs it
  • Example: Azure Functions (serverless compute)

Trade-off: IaaS provides the most control and flexibility but requires more management. FaaS automatically manages nearly all aspects. PaaS provides partial management with some user configuration.

Service Comparison

Basic Features

ServiceApplication CompositionDensityMinimum NodesState ManagementWeb Hosting
Virtual MachinesAgnosticAgnostic1 2Stateless or statefulAgnostic
App ServiceApplications, containersMultiple apps per instance1StatelessBuilt-in
Azure FunctionsFunctions, containersServerless 1Serverless 1Stateless or stateful 6Not applicable
AKSContainersMultiple containers per node3 3Stateless or statefulAgnostic
Container AppsContainersServerlessServerlessStateless or statefulAgnostic
Container InstancesContainersNo dedicated instancesNo dedicated nodesStatelessAgnostic
Azure Red Hat OpenShiftContainersMultiple containers per node6 5Stateless or statefulAgnostic
Service FabricServices, guest executables, containersMultiple services per VM5 3Stateless or statefulAgnostic
BatchScheduled jobsMultiple apps per VM1 4StatelessNo
Azure VMware SolutionAgnosticAgnostic3 7Stateless or statefulAgnostic

Notes:

  1. Azure Functions Consumption plan is serverless. App Service plan runs on allocated VMs.
  2. Higher SLA with two or more instances.
  3. Recommended for production environments.
  4. Can scale down to zero after job completes.
  5. Three primary nodes and three worker nodes.
  6. When using durable functions.
  7. See Hosts documentation.

Networking

ServiceVirtual Network IntegrationHybrid Connectivity
Virtual MachinesSupportedSupported
App ServiceSupported 1Supported 2
Azure FunctionsSupported 1Supported 3
AKSSupportedSupported
Container AppsSupportedSupported
Container InstancesSupportedSupported
Azure Red Hat OpenShiftSupportedSupported
Service FabricSupportedSupported
BatchSupportedSupported
Azure VMware SolutionSupportedSupported

Notes:

  1. Requires App Service plan or Premium plan.
  2. Via VNet integration or App Service Environment.
  3. Via VNet integration (Premium plan).

Development and Deployment

ServiceLocal DevelopmentDeployment OptionsUpdate Strategy
Virtual MachinesAnyCustomManual or automated
App ServiceVisual Studio, VS Code, othersGit, CI/CD, Azure CLI, PortalRolling update
Azure FunctionsVisual Studio, VS Code, othersGit, CI/CD, Azure CLI, PortalRolling update
AKSMinikube, Docker, otherskubectl, Helm, CI/CDRolling update
Container AppsDocker Desktop, othersAzure CLI, CI/CDRolling update
Container InstancesDocker DesktopAzure CLI, PortalReplace container
Azure Red Hat OpenShiftMinikube, Docker, othersAgnosticRolling update
Service FabricLocal node clusterGuest executable, Service model, Actor model, containersRolling upgrade per service
BatchNot supportedCommand-line applicationNot applicable
Azure VMware SolutionAgnosticAgnosticNo built-in support

Scalability

ServiceAutoscalingLoad BalancerScale Limit 3
Virtual MachinesVirtual machine scale setsAzure Load BalancerPlatform: 1,000 nodes/scale set; Custom: 600 nodes/scale set
App ServiceBuilt-in serviceIntegrated30 instances (100 with ASE)
Azure FunctionsBuilt-in serviceIntegrated200 instances per function app
AKSPod autoscaling 1, cluster autoscaling 2Load Balancer or Application Gateway5,000 nodes (with uptime SLA)
Container AppsScaling rules 4Integrated15 environments/region (default), unlimited apps
Container InstancesNot supportedNo built-in support100 container groups/subscription (default)
Azure Red Hat OpenShiftPod autoscaling, cluster autoscalingLoad Balancer or Application Gateway250 nodes/cluster (default)
Service FabricVirtual machine scale setsLoad Balancer100 nodes/scale set
BatchNot applicableLoad Balancer900 dedicated + 100 low-priority cores (default)
Azure VMware SolutionBuilt-in service 5Integrated 63-16 VMware ESXi hosts per vCenter

Notes:

  1. See Autoscale pods.
  2. See Automatically scale a cluster.
  3. See Azure subscription and service limits.
  4. See Set scaling rules in Container Apps.
  5. See Scale Azure VMware Solution.
  6. See VMware NSX.

Availability

ServiceMultiregion Failover Option
Virtual MachinesAzure Traffic Manager, Azure Front Door, cross-region Load Balancer
App ServiceTraffic Manager, Azure Front Door
Azure FunctionsTraffic Manager, Azure Front Door
AKSTraffic Manager, Azure Front Door, Multiregion Cluster
Container AppsTraffic Manager, Azure Front Door
Container InstancesTraffic Manager, Azure Front Door
Azure Red Hat OpenShiftTraffic Manager, Azure Front Door
Service FabricTraffic Manager, Azure Front Door, cross-region Load Balancer
BatchNot applicable
Azure VMware SolutionNot applicable

Other Criteria

ServiceTLSCostSuitable Architecture Styles
Virtual MachinesConfigured in VMWindows, LinuxN-tier, Big compute (HPC)
App ServiceSupportedApp Service pricingWeb-queue-worker
Azure FunctionsSupportedAzure Functions pricingMicroservices, Event-driven
AKSIngress controllerAKS pricingMicroservices, Event-driven
Container AppsIngress controllerContainer Apps pricingMicroservices, Event-driven
Container InstancesSidecar containerContainer Instances pricingMicroservices, task automation, batch jobs
Azure Red Hat OpenShiftSupportedAzure Red Hat OpenShift pricingMicroservices, Event-driven
Service FabricSupportedService Fabric pricingMicroservices, Event-driven
BatchSupportedBatch pricingBig compute (HPC)
Azure VMware SolutionConfigured in VMAzure VMware Solution pricingVM workload based on VMware format

Service Overviews

Azure App Service

Managed service for hosting web apps, mobile app back ends, RESTful APIs, or automated business processes.

Azure Batch

Managed service for running large-scale parallel and high-performance computing (HPC) applications.

Azure Container Apps

Managed service built on Kubernetes that simplifies deployment of containerized applications in a serverless environment.

Azure Container Instances

Service for running a single container or group of containers in Azure. Doesn't provide full container orchestration but allows containers without provisioning VMs.

Azure Functions

Service that provides managed functions running based on various trigger types for event-driven applications.

Azure Kubernetes Service (AKS)

Managed Kubernetes service for running containerized applications.

Azure Red Hat OpenShift

Fully managed OpenShift cluster for running containers in production with Kubernetes.

Azure Service Fabric

Distributed systems platform that can run in many environments, including Azure or on-premises.

Azure VMware Solution

Managed service for running VMware workloads natively on Azure.

Azure Virtual Machines

Service where you deploy and manage VMs inside an Azure virtual network.

Evaluation Criteria

When evaluating a candidate service, consider:

  1. Cost - Review pricing models and calculate total cost of ownership
  2. Regional availability - Ensure service is available in your required regions
  3. Service limits - Check quotas and constraints for your workload
  4. SLAs - Understand service-level agreements and guarantees

Multi-Workload Applications

If your application consists of multiple workloads, evaluate each workload separately. A complete solution can incorporate two or more compute services.

References