Azure offers a spectrum of compute options — from full IaaS control with Virtual Machines to fully managed serverless with Azure Functions. Choosing the right service depends on how much infrastructure management you want to own.
Azure Virtual Machines (IaaS)
Azure VMs let you run Windows or Linux in the cloud. You choose the VM size, OS, disk, and network configuration. Azure manages the physical hardware; you manage everything from the OS up.
VM series are grouped by purpose:
| Series | Purpose | Examples |
|---|---|---|
| B-series | Burstable / dev/test | B2s, B4ms |
| D-series | General purpose | D4s_v5, D8s_v5 |
| F-series | Compute optimised | F4s_v2, F16s_v2 |
| E-series | Memory optimised | E8s_v5 |
| N-series | GPU (AI / rendering) | NC6, ND96amsr_A100 |
| M-series | Ultra memory | M128s (SAP HANA) |
VM Scale Sets
VM Scale Sets (VMSS) let you deploy and manage a group of identical, load-balanced VMs. Scale Sets integrate with Azure Monitor to autoscale based on CPU, memory, or custom metrics. Used for:
- Web front-ends that need to scale with traffic
- Batch processing workloads
- High-availability application tiers
Cost Optimisation for VMs
| Option | Discount | Commitment |
|---|---|---|
| Pay-as-you-go | — | None |
| Azure Spot VMs | Up to 90% | None (preemptible) |
| Reserved Instances | Up to 72% | 1 or 3 years |
| Azure Hybrid Benefit | Up to 85% | Existing Windows/SQL licences |
| Dev/Test pricing | Varies | Visual Studio subscription required |
Azure App Service (PaaS)
App Service is a fully managed platform for hosting web applications, RESTful APIs, and mobile backends. Supported languages: .NET, Node.js, Python, Java, PHP, Ruby.
Key features:
- Built-in auto-scaling and load balancing
- Integrated CI/CD from GitHub, Azure DevOps, or Bitbucket
- Custom domains and free managed TLS certificates
- Deployment slots (staging environments) with swap capability
- App Service Environments (ASE) for isolated, high-scale deployments in your VNet
Best for: Web applications, APIs, mobile backends — when you want to focus on code rather than infrastructure.
Azure Functions (Serverless)
Azure Functions is Microsoft's Function-as-a-Service (FaaS) offering. Write a function in C#, JavaScript, TypeScript, Python, Java, or PowerShell. Azure handles servers, OS, and scaling.
Trigger types: HTTP, Timer, Blob Storage, Queue Storage, Service Bus, Event Hub, Cosmos DB change feed, and more.
Hosting plans:
- Consumption plan: Scale to zero, pay per execution and execution time. Cold starts possible.
- Premium plan: Pre-warmed instances, no cold start, VNet integration.
- Dedicated (App Service) plan: Run on always-on App Service infrastructure.
Azure Container Apps
Azure Container Apps is a managed serverless container service (similar to GCP Cloud Run). Built on Kubernetes and KEDA (event-driven autoscaling). Best for microservices, APIs, and event-driven workloads without managing Kubernetes clusters.