Skip to content

Chapter 2 of 11

Compute: Virtual Machines and App Service

Choose configurable virtual machines or managed web hosting based on control and operations.

42 minutes 10 quick checksBy Subha Prasad
Lesson 2 of 11Course navigation

Lesson content

Read, practise, then check your understanding

Compute: Virtual Machines and App Service

Azure Virtual Machines provide Windows or Linux servers with control over images, sizes, disks, extensions, and networking. Azure App Service hosts web applications and APIs on a managed platform with deployment slots, autoscaling, certificates, and runtime integration.

Core ideas

  • A VM size defines vCPU, memory, network, and optional accelerator characteristics.
  • Virtual machine scale sets manage similar VM instances and support autoscaling and rolling updates.
  • An App Service plan defines region, operating system, pricing tier, and compute shared by apps.
  • Managed identities give VMs or apps Microsoft Entra credentials without storing passwords.

Design and operating model

Use VMs for legacy software, custom operating systems, specialized agents, or deep host control. Use App Service when an HTTP application fits its supported runtime and platform model. Automate patching or image replacement for VMs; for App Service, use deployment slots, health checks, scaling rules, and private connectivity where required.

Example

az webapp up \
  --name replace-with-unique-training-app \
  --resource-group learning-rg \
  --location centralindia \
  --runtime 'NODE:22-lts'

az webapp identity assign \
  --name replace-with-unique-training-app \
  --resource-group learning-rg

Run examples in a disposable training subscription. Replace names, Regions, identifiers, scopes, sizes, and policies with reviewed values, and confirm current Azure CLI and service requirements before production use.

Production guidance

  • Keep persistent application data outside VM temporary disks and App Service local ephemeral storage.
  • Use managed identity and Key Vault references instead of application credentials.
  • Measure utilization and startup behavior before selecting VM size, App Service tier, or scaling thresholds.

The chapter quiz follows the lesson and checks both service vocabulary and architecture decisions.

Knowledge check

Answer every question correctly to complete this chapter.

Which statement correctly describes Azure Virtual Machines?
Which term matches this explanation: On-demand Windows or Linux virtual servers with configurable compute, disks, and networking.
Which statement correctly describes virtual machine scale set?
Which term matches this explanation: A group of load-balanced VMs that can scale automatically.
Which statement correctly describes Azure App Service?
Which term matches this explanation: A managed platform for hosting web applications and APIs.
Which statement correctly describes App Service plan?
Which term matches this explanation: The region, operating system, pricing tier, and compute capacity used by App Service apps.
Which statement correctly describes managed identity?
Which term matches this explanation: An automatically managed Microsoft Entra identity used by Azure workloads.

0 of 10 checks passed

Your progress is saved on this device.

Compute: Virtual Machines and App Service | Azure Lesson | Subha Prasad