Chapter 09 — Azure Compute Services

What is Compute?

Compute refers to the processing power needed to run applications — CPUs, memory (RAM), and the environments that run your code.

Azure offers several compute options, each suited for different workload types:

Azure Compute Services:
  ├── Virtual Machines (VMs)
  ├── Azure App Service
  ├── Azure Functions (Serverless)
  ├── Azure Container Instances (ACI)
  ├── Azure Kubernetes Service (AKS)
  └── Azure Virtual Desktop

1. Azure Virtual Machines (VMs)

What Are VMs?

An Azure Virtual Machine is a software-based computer that runs on Microsoft's physical servers. It behaves exactly like a physical computer — you get a CPU, RAM, storage, and network — but it's hosted in the cloud.

VMs are the foundation of IaaS (Infrastructure as a Service).

Key Characteristics

Feature

Detail

OS support

Windows Server, various Linux distros (Ubuntu, RHEL, CentOS, etc.)

Full control

You install software, configure OS, manage patches

Size options

From 1 vCPU / 1 GB RAM to 96+ vCPUs / 384+ GB RAM

Pricing

Pay per hour/minute the VM is running

Storage

Uses Azure Managed Disks (SSD or HDD)

Connectivity

Part of a Virtual Network

VM Series (Types)

Series

Best For

B-series

Burstable, low-cost dev/test workloads

D-series

General purpose — web servers, databases

E-series

Memory-intensive — in-memory analytics

F-series

Compute-intensive — gaming, batch processing

N-series

GPU — machine learning, graphics rendering

M-series

Massive memory — SAP HANA, large databases

When to Use VMs

  • Migrating on-premises workloads to cloud ("lift and shift")

  • Running legacy software that needs full OS control

  • Custom OS configurations and specialized software

  • Testing environments needing specific OS setups

VM Scale Sets

Virtual Machine Scale Sets automatically increase or decrease the number of VMs based on demand.

Normal traffic:   3 VMs running
Peak traffic:     Auto-scale to 20 VMs
Traffic drops:    Auto-scale back to 3 VMs

2. Azure App Service

What Is It?

Azure App Service is a fully managed PaaS platform for hosting web applications, REST APIs, and mobile backends. You deploy your code — Azure handles the infrastructure, OS, and runtime.

Key Characteristics

Feature

Detail

Languages supported

.NET, Node.js, Python, Java, PHP, Ruby

OS

Windows or Linux

Deployment

GitHub Actions, Azure DevOps, FTP, ZIP deploy

Auto-scaling

Built-in

SSL/HTTPS

Free SSL certificates included

Custom domains

Point your domain to App Service easily

OS patching

Handled by Azure automatically

App Service Plans

An App Service Plan defines the underlying compute resources (CPU, RAM) for your app:

Plan Tier

Best For

Free / Shared

Experimentation, development

Basic

Low-traffic apps with limited scale

Standard

Production apps with auto-scaling

Premium

High-performance, VNet integration

Isolated

Maximum isolation, dedicated environment

When to Use App Service

  • Hosting web applications and APIs

  • When you want to focus on code, not servers

  • Apps that need auto-scaling and SSL out of the box

  • Rapid deployment from GitHub or DevOps pipelines


3. Azure Functions (Serverless Compute)

What Is It?

Azure Functions is a serverless compute service where you write small pieces of code (functions) that run in response to events — without managing any servers.

You only pay when your code runs — not for idle time.

How It Works

Trigger (Event Occurs)  →  Azure Functions runs your code  →  Done
Examples of triggers:
  - HTTP request received
  - File uploaded to blob storage
  - Message added to a queue
  - Timer fires at scheduled time
  - Database record changes

Key Characteristics

Feature

Detail

Serverless

No servers to manage

Languages

C#, JavaScript, Python, Java, PowerShell

Triggers

HTTP, Timer, Blob, Queue, Event Hub, Cosmos DB, and more

Billing

Per execution and per GB-second of memory used

Auto-scale

Scales to zero when idle, scales out automatically

Execution timeout

Up to 10 minutes (Consumption plan)

Pricing Plans

Plan

Description

Consumption plan

Pay per execution, scales to zero, cold start possible

Premium plan

Pre-warmed instances, no cold start, VNet support

Dedicated plan

Run on App Service Plan — always warm

When to Use Azure Functions

  • Event-driven workloads (respond to file uploads, HTTP calls, messages)

  • Scheduled tasks (run a report every night at midnight)

  • Microservices architecture

  • Low-cost, low-traffic scenarios where idle time shouldn't cost money


4. Azure Container Instances (ACI)

What Are Containers?

A container packages your application code + all its dependencies into a single portable unit. Containers are lightweight and run consistently across environments.

Container vs. Virtual Machine:
  VM:        Full OS + App (GBs in size, minutes to start)
  Container: Just App + Dependencies (MBs in size, seconds to start)

What Is ACI?

Azure Container Instances (ACI) is the simplest way to run containers in Azure — without managing VMs or clusters. You just provide a container image, and Azure runs it.

Feature

Detail

Startup time

Seconds

Management

No orchestration needed

Billing

Per second of CPU and memory usage

OS support

Linux and Windows containers

Use case

Short-lived or simple containerized workloads

When to Use ACI

  • Simple containerized applications or microservices

  • Batch jobs and data processing tasks

  • Testing containerized applications quickly

  • Workloads that don't need full Kubernetes orchestration


5. Azure Kubernetes Service (AKS)

What Is Kubernetes?

Kubernetes (K8s) is an open-source system for automating the deployment, scaling, and management of containerized applications across a cluster of machines.

What Is AKS?

Azure Kubernetes Service (AKS) is a managed Kubernetes service — Azure handles the complexity of setting up and operating a Kubernetes cluster.

AKS Cluster
├── Control Plane (managed by Azure — free)
│     ├── API Server
│     ├── Scheduler
│     └── Controller Manager
└── Node Pool (worker nodes — you pay for these)
      ├── Node 1 (VM) → Pods (your containers)
      ├── Node 2 (VM) → Pods
      └── Node 3 (VM) → Pods

Key Characteristics

Feature

Detail

Control plane

Free — managed by Azure

Worker nodes

VMs you pay for

Auto-scaling

Scale node count and pods automatically

Integration

Works with Azure Monitor, Entra ID, Azure Container Registry

Upgrades

One-click Kubernetes version upgrades

When to Use AKS

  • Running many containerized microservices

  • Applications needing sophisticated scheduling and scaling

  • Large-scale production container workloads

  • Organizations already using Docker and Kubernetes


6. Azure Virtual Desktop

What Is It?

Azure Virtual Desktop (AVD) is a desktop-as-a-service — it delivers Windows desktops and applications to any device over the internet.

Users connect through a browser or Remote Desktop client and see a full Windows desktop running in the cloud.

Feature

Detail

OS

Windows 10/11 multi-session or Windows Server

Access

Any device — browser, thin client, tablet

Use cases

Remote workers, BYOD, call centers, regulated industries

Security

Data stays in Azure — nothing stored on the user's device

Licensing

Included with Microsoft 365 E3/E5 and certain Windows licenses


Compute Services Comparison

Service

Type

You Manage

Best For

Virtual Machines

IaaS

OS + App + Data

Full control, lift-and-shift

App Service

PaaS

App + Data

Web apps and APIs

Azure Functions

Serverless

Just your code

Event-driven, short tasks

Container Instances

Serverless containers

Container image

Simple container workloads

AKS

Managed Kubernetes

Nodes + containers

Large-scale microservices

Virtual Desktop

DaaS

User experience

Remote work, secure desktops


Quick Recap

VM            → Full control, full OS — like a cloud PC
App Service   → Managed web hosting — just deploy code
Functions     → Serverless — pay per execution, event-driven
ACI           → Run containers without clusters
AKS           → Managed Kubernetes for container orchestration
Virtual Desktop → Cloud-hosted Windows for remote workers

Official References


Next Chapter → Chapter 10: Azure Networking Services