Hands-On LabIntermediate

Container Apps KEDA Scaling with Service Bus Queue Workers

Scale Azure Container Apps from zero to five replicas using KEDA and Service Bus queue message count as the scaling trigger.

60 minEstimated time
4Guided steps
AutoVerification
IsolatedSandbox
Container Apps KEDA Scaling with Service Bus Queue Workers

Lab overview

Modern event-driven architectures often rely on message queues to decouple producers from consumers, but a static pool of worker containers wastes money during quiet periods and buckles under sudden traffic spikes. KEDA (Kubernetes Event-driven Autoscaling) solves this by watching external event sources - such as Azure Service Bus queue depth - and dynamically adjusting replica counts, including scaling all the way down to zero when there is no work to process.

Azure Container Apps has KEDA built in, so you can attach a scale rule to any container app without managing a Kubernetes cluster yourself. In this lab, you will deploy a queue-worker container to a Container Apps environment, configure a KEDA scale rule that targets the Service Bus queue's messageCount metric, flood the queue with over 200 messages to trigger a burst scale-out from zero to five replicas, and then observe the workers drain the queue and scale back to zero.

Objectives

By completing this intermediate lab, you will be able to:

  • Build and push a queue-worker container image to Azure Container Registry
  • Deploy a Container App with a KEDA scale rule targeting Service Bus queue messageCount
  • Generate a burst of 200+ messages on the Service Bus queue using a sender script
  • Monitor replica scale-out from zero to five in real time using Azure CLI and the portal
  • Observe scale-to-zero behavior after the queue is fully drained

Who is this lab for?

This lab is designed for:

  • Cloud engineers learning event-driven autoscaling patterns on Azure
  • Developers building asynchronous workload processors with Container Apps
  • DevOps engineers implementing scale-to-zero architectures for cost optimization

Verified against your live environment

An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.

[CHECK] validation_activelive
Inspecting deployed resources...
Verifying configuration state...
✓ Step requirements satisfied

More labs like this

Related reading

PremiumIncluded in Premium
Duration
60 min
Steps
4

Environment

Browser Code IDELive Cloud Environment

Every lab includes

  • Real environment, pre-credentialed
  • Automated checks on every step
  • Isolated sandbox, auto cleanup
  • AI-recommended next steps

Lab curriculum

  1. 01

    Logging into Azure CLI

  2. 02

    Build and Push the Worker Image to Azure Container Registry

    1 automated check

  3. 03

    Deploy a Container App with a KEDA Service Bus Scale Rule

    1 automated check

  4. 04

    Flood the Queue and Observe KEDA Scaling Behavior

    1 automated check

Skills validated

Azure Container AppsAzure Container RegistryAzure Service BusKEDA

Not the lab you were looking for?

Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.

Explore the catalog