Skip to content
Lesson 5 of 13 · Microsoft Azure Fundamentals (AZ-900)

Compute and application hosting

Choose between virtual machines, containers, App Service, Functions and Azure Virtual Desktop, and explain scale sets, availability sets and zones.

16 min

Virtual machines (VMs) are IaaS. You pick an image, a size and a region. A VM needs three kinds of resources: compute (CPU and memory), storage (disks) and networking (a virtual network interface and optionally a public IP).

Keeping VMs available:

  • Availability sets spread VMs across fault domains (separate racks with their own power and network) and update domains (groups rebooted separately during maintenance). They protect against rack failures and maintenance, inside one datacenter.
  • Availability zones place VMs in separate datacenters. They protect against datacenter failure.
  • Virtual Machine Scale Sets (VMSS) create and manage a group of identical load-balanced VMs and autoscale them with demand.
  • Azure Virtual Desktop (AVD) delivers desktops and apps from the cloud to users on any device, with multi-session Windows.

Other ways to host an app

  • Azure App Service (PaaS): host web apps, REST APIs and mobile back ends without managing servers. Supports .NET, Java, Node.js, Python and more, with autoscale and deployment slots.
  • Containers: package an app with its dependencies. Azure Container Instances (ACI) run a container quickly with no orchestration. Azure Kubernetes Service (AKS) orchestrates many containers. Azure Container Apps runs containerized apps serverlessly.
  • Azure Functions (serverless): small pieces of code triggered by events, such as an HTTP call or a message. You pay when it runs.
  • Azure Logic Apps (workflows without much code), mentioned as a related serverless option.

Compare the compute choices.

Virtual Machine

You manage
OS, patching, software
Typical use
Lift and shift, full control, legacy apps

Best for Maximum control

App Service

You manage
Your app code
Typical use
Websites and APIs without servers to patch

Best for Quick web hosting

Containers (ACI, AKS)

You manage
Container images
Typical use
Portable, microservice apps

Best for Portable packages

Azure Functions

You manage
A function
Typical use
Short event-driven tasks, pay per execution

Best for Serverless

Reference

Availability options for VMs

Availability set

Protects against
Rack failure and planned maintenance
Scope
One datacenter

Availability zones

Protects against
Datacenter failure
Scope
One region

VM Scale Set

Protects against
Load changes (autoscale) and failure through many identical VMs
Scope
Can span zones

Region pair or multi-region

Protects against
Region-wide failure
Scope
Two regions
Decide

Pick the hosting option.

A developer wants to publish a website with no server patching and with automatic scaling.

Common misconception

“An availability set protects against a datacenter failure.”

It sounds like the highest level of availability.

What is actually true

Availability sets protect VMs inside one datacenter from rack and maintenance events. To survive the loss of an entire datacenter, use availability zones.

  • VMs are IaaS and need compute, storage and networking.
  • Availability set: fault and update domains in one datacenter. Zones: separate datacenters.
  • App Service is PaaS web hosting. Functions are serverless. ACI runs single containers. AKS orchestrates.
  • VM Scale Sets autoscale identical VMs. AVD delivers virtual desktops.
Check yourself

Compute check.

1Multiple choice

Which service is PaaS for hosting web apps and APIs?

  • AAzure Virtual Desktop
  • BAzure App Service
  • CAzure Virtual Machines
  • DAzure Container Instances
2Multiple choice

Which service runs small pieces of code in response to events and bills per execution?

  • AAzure Kubernetes Service
  • BAvailability set
  • CAzure Functions
  • DVM Scale Set
3Multiple choice

Which feature automatically adds identical VMs when load rises?

  • AAzure Policy
  • BVirtual Machine Scale Sets
  • CAvailability sets
  • DResource locks
4Multiple choice

Which service orchestrates many containers across a cluster?

  • AAzure Functions
  • BAzure Container Instances
  • CAzure App Service
  • DAzure Kubernetes Service
5Select all that apply

Which TWO resources does a virtual machine need?

  • AA management group per VM
  • BNetworking
  • CA Purview catalog
  • DA resource lock
  • ECompute (CPU and memory)

Practise this lesson, not just read it

In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of Microsoft Azure Fundamentals (AZ-900) is planned around your week. Free.