AZ-900 Learning Portal
Objective 2.2 35 minhigh priorityvirtual-machinescontainerskubernetesazure-functionsvnetexpressroutevpn-gatewayprivate-endpoints

2.2 — Describe Azure compute and networking services

Azure offers compute choices spanning IaaS VMs through PaaS App Service to serverless Functions, and networking options from VNets and VNet peering to VPN Gateway and ExpressRoute for on-premises connectivity.

Concept — What & Why

Azure Compute Services

Azure offers several compute models. Choosing the right one depends on how much control you need over the underlying infrastructure.

ServiceControl levelBest for
Virtual Machines (IaaS)Full OS controlLift-and-shift, custom software
VM Scale SetsFull OS control, auto-scaleLarge-scale, elastic workloads
Azure Virtual DesktopDesktop OS controlRemote desktops, VDI
App Service (PaaS)Code + config onlyWeb apps, APIs, mobile backends
Azure Container InstancesContainer runtimeSimple, isolated containers
Azure Kubernetes Service (AKS)Orchestrated containersComplex microservices
Azure Functions (serverless)Code onlyEvent-driven, short-duration tasks

Virtual Machines (VMs)IaaS compute that gives full control over the OS, software, and configuration. The customer is responsible for OS updates, patches, and security. Best for lift-and-shift migrations and workloads needing custom OS-level configuration. are the most flexible compute option — you control the OS, software, and configuration, at the cost of managing patching and security yourself. For elastic workloads, VM Scale SetsAzure service that automatically creates and manages a group of identical, load-balanced VMs. They scale out (add VMs) or scale in (remove VMs) based on demand or a schedule. VMs can be distributed across availability zones for built-in high availability. automatically create and remove identical VMs based on demand or a schedule.

Availability Sets are an older HA mechanism for VMs within a single datacenter. They use:

  • Fault domains — groups of VMs sharing a common power source and network switch (up to 3).
  • Update domains — groups of VMs that can be rebooted together during maintenance (Azure ensures not all update domains reboot simultaneously).

Azure Virtual Desktop (AVD)A cloud-hosted desktop and app virtualization service. Key benefits: multi-session Windows 10/11, use your own licenses (Windows Enterprise), and desktops are accessible from anywhere. enables remote work scenarios where desktops and apps are streamed from Azure rather than run locally.


Containers vs. VMs

Containers package an app and its dependencies but share the host OS kernel — they do not virtualize hardware. They start in seconds and are much smaller than VMs. For simple isolated tasks, Azure Container Instances (ACI)The simplest way to run a container in Azure without managing VMs or orchestrators. Best for simple, isolated tasks and dev/test scenarios. is the fastest path. For complex microservices at scale, Azure Kubernetes Service (AKS)Managed Kubernetes for orchestrating many containers at scale with automatic bin-packing, self-healing, and rolling updates. provides managed orchestration with self-healing and rolling updates. For event-driven workloads with no infrastructure to manage, Azure FunctionsA serverless compute model that runs event-triggered code without provisioning or managing servers. Billed only for execution time. Triggers include HTTP requests, timers, queue messages, and blob storage events. Functions are stateless by default; Durable Functions add stateful workflows. runs code in response to triggers and bills only for actual execution time.


Azure Networking Services

An Azure Virtual Network (VNet)The fundamental building block for private networking in Azure. A VNet enables Azure resources to communicate securely with each other, the internet, and on-premises networks. VNets are scoped to a single region and can be divided into subnets. is the foundational private network construct in Azure — scoped to a single region and divided into subnets. To connect two VNets so their resources communicate as if on the same network, you use VNet PeeringConnects two VNets so their resources can communicate as if on the same network. Can be within a region (VNet peering) or across regions (global VNet peering). Peering is non-transitive — A-B and B-C peering does NOT give A access to C., which is non-transitive by default. For DNS hosting, Azure DNSA hosting service for DNS domains using Azure infrastructure. Supports public DNS zones (internet-facing) and private DNS zones (within VNets). Azure DNS is NOT a domain registrar — you register domains elsewhere then delegate to Azure DNS. supports both public and private DNS zones but is not a domain registrar.

Subnets are IP address subdivisions within a VNet. Azure reserves 5 IP addresses per subnet (first 4 and last 1). Network Security Groups (NSGs) are typically applied at the subnet level to filter traffic.


Connecting to On-Premises Networks

For encrypted connectivity over the public internet, Azure VPN GatewaySends encrypted traffic between a VNet and an on-premises network over the public internet using IPsec/IKE tunnels. Types: Site-to-Site (S2S for offices), Point-to-Site (P2S for remote workers), and VNet-to-VNet (connecting Azure VNets). supports Site-to-Site, Point-to-Site, and VNet-to-VNet connections. For a private, dedicated circuit that never touches the public internet, Azure ExpressRouteProvides a private, dedicated connection from on-premises to Azure through a connectivity provider — traffic does NOT travel over the public internet. Offers higher reliability, faster speeds, consistent latency, and higher security than VPN Gateway. delivers higher reliability, faster speeds, and consistent latency through a connectivity provider.

FeatureVPN GatewayExpressRoute
TransportPublic internet (encrypted)Private dedicated circuit
Max speedUp to ~10 GbpsUp to 100 Gbps
LatencyVariablePredictable, consistent
CostLowerHigher
Setup timeHoursWeeks (provider provisioning)

Public and Private Endpoints

For maximum security, use Private endpointsUse a private IP address from your VNet to connect to a specific Azure service instance. Traffic stays within the Microsoft network — never traversing the public internet. Powered by Azure Private Link. The service's public endpoint can be disabled entirely. to connect to PaaS services via a private IP from your VNet — the service's public endpoint can be disabled entirely. Service endpoints extend your VNet identity to Azure services over the Microsoft backbone, but the service still has a public endpoint (access is restricted to your VNet). Private endpoints are more secure because they remove the service from public internet exposure entirely.


Deep Dive — How It Works

Compute Options — Detailed Comparison

DimensionVMsVM Scale SetsApp ServiceACIAKSAzure Functions
Control levelFull OSFull OSCode + configContainer onlyWorkload-levelCode only
Auto-scaleManual or VMSSYes (automatic)YesNoYes (pods)Yes (consumption plan)
Billing modelPer VM/hourPer VM/hourPer planPer secondPer nodePer execution
Best forLift-and-shiftStateless web tiersWeb apps / APIsSimple containersMicroservicesEvent-driven functions
Service typeIaaSIaaSPaaSPaaSPaaSPaaS/Serverless

VPN Gateway vs. ExpressRoute — Decision Framework

ScenarioChoose VPN GatewayChoose ExpressRoute
Budget-consciousYesNo (higher cost)
Needs private circuitNoYes
Setup within hoursYesNo (weeks)
Bandwidth > 10 GbpsNoYes (up to 100 Gbps)
Consistent latency requiredNoYes
Remote workers (P2S)YesNo

Private Endpoint vs. Service Endpoint

AttributePrivate EndpointService Endpoint
IP typePrivate IP from VNetUses VNet identity
Public endpointCan be disabledStill exists
Traffic pathStays on Microsoft backboneMicrosoft backbone
Resource scopeSpecific resource instanceService-wide
Security levelHigherGood
Powered byAzure Private LinkVNet service endpoints

VNet Peering — Transitivity Rule

VNet peering is non-transitive by default:

A ↔ B  (peered)
B ↔ C  (peered)
A ✗ C  (NOT automatically connected)

To enable A-to-C connectivity: either peer A directly with C, or route through a hub VNet appliance (hub-and-spoke topology).


Hands-On Lab

Explore Compute and Networking in the Azure Portal

Step 1 — View VM Scale Set configuration

  1. Sign in to portal.azure.com.
  2. Search for Virtual Machine Scale Sets and open the service.
  3. Select + Create — observe the Scaling tab where you configure auto-scale rules.
  4. Note the Availability zone options — VMs can be distributed across zones for HA.
  5. Cancel without creating.

Step 2 — Create a Virtual Network (or browse one)

  1. Navigate to Virtual networks.
  2. Select an existing VNet (or create one) and open it.
  3. Click Subnets — observe subnet address ranges and any NSG associations.
  4. Click Peerings — see where VNet peering connections would be listed.

Step 3 — Explore VPN Gateway vs. ExpressRoute

  1. Search for VPN gateways — note the GatewaySubnet requirement visible during creation.
  2. Search for ExpressRoute circuits — observe the provider and peering location dropdowns.
  3. Compare the Availability options — ExpressRoute shows provider-based setup; VPN Gateway shows policy vs. route-based options.

Step 4 — View Private Endpoints

  1. Search for Private endpoints in the portal.
  2. Select + Create and browse the resource types available (Storage, SQL, Key Vault, etc.).
  3. Observe that a private endpoint creates a network interface with a private IP inside your VNet.
  4. Cancel without creating.

Exam Angle — What AZ-900 Tests

AZ-900 Exam Focus

Exam Trap

"VNet peering is transitive" — False. VNet peering is non-transitive by default. A peering B, and B peering C, does NOT give A access to C without additional configuration. This is a high-frequency AZ-900 trap.

Exam Trap

"ExpressRoute traffic goes over the internet" — False. ExpressRoute uses a private, dedicated connection through a connectivity provider — never the public internet. This is the primary differentiator from VPN Gateway.

Exam Trap

"Availability Sets protect against datacenter failure" — False. Availability Sets protect against rack-level failures within a single datacenter. For datacenter-level failure protection, use Availability Zones.

Exam Trap

"A VNet can span multiple Azure regions" — False. A VNet is scoped to a single region. Use VNet peering (including global VNet peering) to connect VNets across regions.

Exam Trap

"Azure DNS can register domain names" — False. Azure DNS hosts DNS zones but is not a domain registrar. You register domains with a third-party registrar and then delegate to Azure DNS.

Exam Tip

ExpressRoute = private, no internet. Whenever an exam question mentions "private connection," "dedicated circuit," "not over the public internet," or "high bandwidth," the answer is ExpressRoute — not VPN Gateway.

Must Memorize

VPN Gateway: public internet · encrypted · Site-to-Site / Point-to-Site / VNet-to-VNet
ExpressRoute: private circuit · connectivity provider · up to 100 Gbps · no public internet


Question — click to flip

Q: What is the key difference between VPN Gateway and ExpressRoute?

Question — click to flip

Q: Is VNet peering transitive? What does that mean?

Question — click to flip

Q: What is the difference between a private endpoint and a service endpoint?

Question — click to flip

Q: What are Availability Sets and what do they protect against?

Question — click to flip

Q: What type of Azure compute is best for a short event-triggered task billed only per execution?

Question — click to flip

Q: What does Azure DNS host, and what is it NOT able to do?


Sources & Further Reading