Skip to main content

Challenge 10: Containers & App Hosting

Estimated Time

20-30 min | Cost: Free | Domain: Azure Architecture & Services (35-40%)

Exam skills covered

  • Compare compute types (containers, VMs, functions)
  • Describe application hosting options (web apps, containers, VMs)
  • Describe Azure Functions

Overview

Beyond VMs, Azure offers lighter-weight compute options. Containers package your application with its dependencies into a portable unit. Azure App Service hosts web apps without managing VMs. Azure Functions run individual pieces of code on-demand (serverless).

Each option trades control for simplicity: VMs give maximum control, containers provide portability, App Service simplifies web hosting, and Functions are the simplest — just write code.

Explore

Task 1: Compare compute options

ServiceWhat you manageScale unitStart-up timeBest for
Azure VMsOS + AppsFull VMMinutesLegacy apps, full control
Azure Container InstancesContainer imageContainerSecondsSimple container tasks
Azure Container AppsContainer image + scaling rulesContainerSecondsMicroservices
Azure App ServiceApplication codeApp instanceSecondsWeb apps and APIs
Azure FunctionsFunction codeSingle functionMillisecondsEvent-driven tasks

Task 2: Explore Azure App Service

  1. In Azure Portal, search for App Services
  2. Click + CreateWeb App
  3. Explore the creation form:
    • Runtime stack: .NET, Java, Node.js, Python, PHP, Ruby
    • Operating System: Linux or Windows
    • App Service Plan: Pricing tier (Free F1 available!)
  4. Notice: no VM size, no OS patches, no networking config
  5. Click Cancel

Free tier (F1):

  • 60 CPU minutes/day
  • 1 GB RAM
  • No custom domain (uses azurewebsites.net)
  • Perfect for learning!

Task 3: Explore Azure Functions

  1. In Azure Portal, search for Function App
  2. Click + Create
  3. Explore:
    • Runtime: .NET, Java, Node.js, Python, PowerShell
    • Hosting plan: Consumption (pay per execution), Premium, or Dedicated
  4. Consumption plan = true serverless:
    • First 1 million executions/month = FREE
    • Auto-scales from 0 to thousands of instances
  5. Click Cancel

Function triggers (what causes the code to run):

TriggerExample
HTTPREST API endpoint
TimerRun every 5 minutes
Blob StorageFile uploaded
QueueMessage received
Event GridEvent occurred

Task 4: Understand containers

Containers are lightweight, portable packages that include:

  • Your application code
  • Runtime and libraries
  • Configuration files
  • Everything needed to run — regardless of the host
ConceptVMContainer
IncludesFull OS + AppsApp + dependencies only
SizeGigabytesMegabytes
Start timeMinutesSeconds
IsolationHardware-levelProcess-level
DensityFew per hostHundreds per host

Azure container services:

  • Azure Container Instances (ACI): Run a container without managing VMs
  • Azure Container Apps: Managed microservices platform
  • Azure Kubernetes Service (AKS): Full container orchestration

Task 5: When to use what

ScenarioBest choiceWhy
Host a WordPress blogApp ServicePaaS web hosting, easy setup
Process images when uploadedAzure FunctionsEvent-driven, pay per execution
Run a containerized microserviceContainer AppsManaged container hosting
Migrate an on-prem serverAzure VMLift-and-shift, full control
Run a batch job for 10 minutesACISimple container, no long-running cost
Azure CLI Alternative
# List available App Service runtimes
az webapp list-runtimes --output table

# List available Function App runtimes
az functionapp list-runtimes --os linux --output table

Key Concepts

ConceptDescription
Azure App ServicePaaS for web apps, APIs, mobile backends
Azure FunctionsServerless compute — run code on-demand, pay per execution
ContainerLightweight package with app + dependencies (portable)
ACIRun a container without managing infrastructure
Container AppsManaged platform for microservice containers
AKSManaged Kubernetes for complex container orchestration
ServerlessNo server management, automatic scaling, per-execution billing

Knowledge Check

1. Which Azure service allows you to run code that responds to events without managing any infrastructure?

2. What is a key advantage of containers compared to virtual machines?

3. A developer wants to host a web application with automatic scaling and no server management. The app is written in Python. Which service is most appropriate?

4. On the Azure Functions Consumption plan, when do you pay?

5. Which Azure service provides managed Kubernetes container orchestration?

Learn More