Introduction to Azure Compute Options

Watch the video to deepen your understanding.
SubscribeComplete the full lesson to earn 25 points — 50 with Pro
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro
Lesson: Introduction to Azure Compute Options
Introduction
In cloud architecture, "compute" refers to the hosting model that executes your application code. Choosing the right compute service is a foundational decision that impacts your application’s scalability, cost, management overhead, and performance.
Azure offers a diverse spectrum of compute services, ranging from "IaaS" (Infrastructure as a Service), where you manage the operating system, to "Serverless" (FaaS), where you focus solely on code and let Azure handle the infrastructure. Understanding these options is critical for designing infrastructure solutions that meet specific business requirements.
The Compute Spectrum
To choose the right tool, you must understand where a service falls on the spectrum of control versus convenience.
1. Virtual Machines (IaaS)
Azure Virtual Machines (VMs) provide the most control. You are responsible for patching, updating, and configuring the OS.
- Best for: Legacy applications, custom configurations, or scenarios requiring specific OS-level access.
- Example: Migrating an on-premises SQL Server instance that requires a specific OS version or proprietary drivers.
2. Azure App Service (PaaS)
App Service is a fully managed platform for building, deploying, and scaling web apps. You provide the code, and Azure handles the underlying infrastructure, OS patching, and load balancing.
- Best for: Web applications, REST APIs, and mobile backends.
- Example: Hosting a .NET, Java, or Node.js web application without managing servers.
3. Azure Container Instances (ACI) & Azure Kubernetes Service (AKS)
Containers allow you to package code and dependencies together.
- ACI: The fastest way to run a container in Azure without managing a cluster. Great for short-lived tasks.
- AKS: A managed Kubernetes service for orchestrating complex, multi-container applications.
- Best for: Microservices architectures and portable applications.
4. Azure Functions (Serverless)
Azure Functions allows you to run code triggered by events without provisioning any infrastructure. You pay only for the execution time.
- Best for: Event-driven tasks, data processing, and background jobs.
- Example: Triggering a process every time a file is uploaded to Azure Blob Storage.
Practical Examples & Code Snippets
Deploying a Simple Azure Function (Python)
Azure Functions are ideal for event-driven logic. Below is a simple HTTP-triggered function:
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
name = req.params.get('name')
if name:
return func.HttpResponse(f"Hello, {name}!")
else:
return func.HttpResponse("Please pass a name in the query string.", status_code=400)
Infrastructure as Code (Bicep snippet for a VM)
When designing infrastructure, you should define your compute resources using IaC. Here is a snippet to define a basic VM in Azure Bicep:
resource vm 'Microsoft.Compute/virtualMachines@2022-03-01' = {
name: 'myLinuxVM'
location: 'eastus'
properties: {
hardwareProfile: { vmSize: 'Standard_B1s' }
osProfile: {
computerName: 'linux-box'
adminUsername: 'azureuser'
}
}
}
Best Practices
- Start with PaaS/Serverless: Always evaluate if your application can run on App Service or Azure Functions before resorting to VMs. Reducing "server management" lowers your operational burden.
- Use Autoscale: Regardless of the compute type, configure scaling rules. Use Scale Out (adding more instances) rather than Scale Up (making the instance bigger) whenever possible for better reliability.
- Right-Size Resources: Use Azure Advisor to monitor VM utilization. If your CPU usage is consistently under 5%, you are overpaying—downsize the instance.
- Implement Security: For VMs, use Azure Bastion instead of exposing RDP/SSH ports to the public internet. For containers, store sensitive configuration in Azure Key Vault.
⚠️ Common Pitfalls
- "Lifting and Shifting" without modification: Simply moving a VM to the cloud without refactoring often leads to higher costs and missed opportunities for cloud-native performance.
- Ignoring Cold Starts: In Serverless (Azure Functions), an idle function may experience a "cold start" delay. If your application requires sub-millisecond latency, consider a dedicated App Service plan instead.
- Over-provisioning: Setting up large clusters or high-spec VMs "just in case" leads to significant budget waste. Start small and scale based on actual metrics.
Key Takeaways
- Understand the Control Trade-off: More control (VMs) equals more management responsibility. Less control (Functions/App Service) equals higher developer productivity.
- Match the Compute to the Workload: Use containers for microservices, Functions for event-driven tasks, App Service for web apps, and VMs for legacy/system-level needs.
- Prioritize Automation: Use Infrastructure as Code (Bicep/Terraform) to deploy compute resources. This ensures consistency, repeatability, and version control for your infrastructure.
- Monitor and Optimize: Compute costs are usually the largest part of an Azure bill. Use Azure Monitor and Advisor to ensure your compute footprint is efficient and secure.
By mastering these compute options, you can design infrastructure that is not only functional but also resilient, scalable, and cost-effective.
Reach the last section to complete this lesson and earn points — you're on section 1 of 3.
- Introduction to Azure Monitor
- Azure Monitor Architecture and Data Sources
- Configuring Log Analytics Workspaces
- Designing Log Routing Solutions
- Configuring Diagnostic Settings
- Application Insights for Solution Architects
- Network Watcher and Network Monitoring
- Azure Monitor Alerts and Action Groups
- Workbooks and Custom Dashboards
- Designing a Comprehensive Monitoring Strategy
- Logging and Monitoring Quiz5q
- Microsoft Entra ID for Solution Architects
- Designing Identity Solutions: B2B Collaboration
- Designing Identity Solutions: B2C Scenarios
- Conditional Access Policy Design
- Designing for Multi-Factor Authentication
- Managed Identities for Azure Resources
- Service Principals and App Registrations
- Role-Based Access Control Design
- Privileged Identity Management
- Microsoft Entra ID Protection
- Zero Trust Architecture with Microsoft Entra
- Authentication and Authorization Quiz5q
- Introduction to Azure Governance
- Designing Management Group Hierarchies
- Subscription Strategy Design
- Resource Group Organization Patterns
- Azure Policy Design and Assignment
- Custom Policy Definitions and Initiatives
- Resource Locks and Tagging Strategies
- Azure Blueprints and Landing Zones
- Cost Management and Budget Design
- Cloud Adoption Framework for Governance
- Governance Solutions Quiz5q
- Introduction to Azure Storage
- Storage Account Types and Replication
- Blob Storage Tiers and Lifecycle Management
- Azure Files and Azure NetApp Files
- Azure Managed Disks Design
- Azure Data Lake Storage Gen2
- Cosmos DB Consistency Models
- Cosmos DB Partitioning and Throughput Design
- Cosmos DB API Selection Guide
- Table Storage and Queue Storage Design
- Storage Security and Encryption
- Non-Relational Storage Quiz5q
- Azure SQL Database Service Tiers
- Azure SQL Managed Instance Design
- Azure Database for MySQL and PostgreSQL
- Database Scaling: Vertical and Horizontal
- Read Replicas and Geo-Replication
- Database Security and Auditing Design
- Transparent Data Encryption and Always Encrypted
- Caching with Azure Cache for Redis
- Azure SQL Elastic Pools Design
- Relational Storage Quiz5q
- Azure Data Factory Design Patterns
- Data Integration Pipeline Architecture
- Azure Synapse Analytics Design
- Azure Databricks Integration Patterns
- Azure Stream Analytics for Real-Time Data
- Azure Event Hubs for Data Ingestion
- Data Migration Strategies and Tools
- Azure Purview for Data Governance
- Data Integration Quiz5q
- Introduction to High Availability in Azure
- Availability Zones and Availability Sets
- Azure Load Balancer Design
- Application Gateway and WAF Design
- Azure Front Door and Global Load Balancing
- Azure Traffic Manager Routing Methods
- Multi-Region Architecture Design
- SLA Design and Composite SLAs
- Health Probes and Failover Configuration
- Azure Service Fabric for Stateful HA
- High Availability Quiz5q
- Azure Backup Architecture and Vaults
- Backup Policies for VMs and Databases
- Azure Site Recovery Design
- RTO and RPO Planning Strategies
- Geo-Redundant and Cross-Region Recovery
- Hybrid and On-Premises Backup Solutions
- Resiliency Patterns and Chaos Engineering
- Disaster Recovery Testing and Drills
- Azure Immutable Backup and Soft Delete
- Backup and Disaster Recovery Quiz5q
- Introduction to Azure Compute Options
- Virtual Machine Design and Sizing
- VM Scale Sets and Autoscaling Strategies
- Azure Batch for Large-Scale Workloads
- Azure App Service Plans and Design
- App Service Environments and Isolation
- Azure Container Instances
- Azure Kubernetes Service Architecture
- AKS Networking and Storage Design
- Azure Functions and Serverless Design
- Durable Functions and Orchestration
- Compute Decision Framework
- Azure Virtual Desktop Design
- Compute Solutions Quiz5q
- Microservices Architecture Patterns
- Azure API Management Design
- Azure Service Bus Messaging Design
- Azure Event Grid and Event-Driven Architecture
- Azure Event Hubs for Streaming
- Azure Logic Apps and Integration Workflows
- Azure SignalR and Web PubSub
- Caching Strategies and Azure CDN
- App Configuration and Feature Flags
- Designing for Scalability and Performance
- Azure Container Apps Design
- Application Architecture Quiz5q
- Virtual Network Design and Address Planning
- Subnet Design and Network Segmentation
- Hub-Spoke Network Topology
- Azure Virtual WAN Design
- VPN Gateway Design and Configuration
- ExpressRoute Circuit Design
- Network Security Groups Design
- Azure Firewall and Firewall Manager
- Azure DDoS Protection Design
- Private Endpoints and Private Link
- Azure DNS and DNS Architecture
- Network Performance and Traffic Routing
- Azure Bastion and Secure Access
- Network Solutions Quiz5q
- Azure Migrate Overview and Assessment
- Migration Assessment and Discovery
- Azure Cloud Adoption Framework for Migration
- VM Migration with Azure Migrate
- Database Migration with Azure DMS
- Application Migration to App Service
- Containerizing Applications for Migration
- Migration Cost Planning and Optimization
- Data Box and Offline Migration Methods
- Migrations Quiz5q
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles the points you earn on every lesson and quiz so you progress twice as fast, unlocks half of every practice exam — plus full case studies — with the Learn & Exam study modes, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× points per lesson & quiz
- ✓ 50% of every exam unlocked
- ✓ Learn & Exam modes
- ✓ Distraction-free lessons