AI-200 Study Guide: Azure Container Apps Scaling with Service Bus
Prepare for AI-200 with a worked Azure Container Apps and Service Bus lab covering queue-based scaling, model throughput, managed identity, and message settlement.
Use an Azure Container Apps worker and a Service Bus queue to practice AI-200 backend design. Choose scaling limits with the downstream model in mind, then verify whether the worker meets its queue-age and completion targets. A growing replica count alone cannot prove the workload is keeping up.
Turn an AI-200 backend objective into a measurable lab
Open the official AI-200 study guide and locate the container and messaging objectives. Start with a synthetic document-processing workload. An API accepts a document and puts a small work item on a Service Bus queue. An Azure Container Apps worker receives the item, calls a model endpoint, and records a result. Use a sandbox or build a paper model with the same measurements.
Define success before selecting a scale rule. For this exercise, the team wants an ordinary burst processed within two minutes while staying within the model endpoint’s capacity. Record arrivals, the oldest outstanding work item, the rate of successfully completed jobs, and downstream throttling. Include a correlation identifier so one job can be followed without writing its document contents to logs.
Estimate the limit before raising replica count
Suppose a sustained burst delivers 120 jobs per minute. With one request in flight per replica and a four-second observed processing time, one replica could complete about 15 jobs per minute under these simplified assumptions. Eight replicas only match the arrival rate. A backlog that already exists needs spare completion capacity to shrink.
Now cap the model endpoint at an illustrative 100 requests per minute and assume one model request per job. Even ten workers cannot complete 120 jobs per minute under that cap. The queue grows by at least 20 jobs per minute before allowing for retries or uneven processing time. Compare approved options such as reserving more model throughput, smoothing arrivals, or changing the workload. Treat the calculation as a starting hypothesis and measure real latency and completed-job throughput.
Separate Container Apps scale checks from message processing
Configure an Azure Service Bus scale rule using the authentication method supported by your environment. Azure Container Apps supports managed identity for the Service Bus scale rule. Identify which identity the scaler uses and which identity the worker uses to receive messages. They can share an identity by design or use separate identities with each assigned the access it needs.
If the queue contains work and the app remains at its minimum replica count, inspect the rule’s queue name, identity configuration, and scaling observations. If replicas increase but no jobs complete, check whether the worker can connect to the queue and invoke the model. Keep those checks separate. Seeing more replicas tells you that the scaling decision occurred. It does not establish that the worker can process the jobs it was created to handle.
Protect the result when a message lock expires
Use Peek-Lock for the controlled exercise and complete the message after the durable result is recorded. Model a job whose processing outlasts its lock. Check whether the configured client renews the lock where appropriate, and test what happens if a settlement attempt fails. A later delivery may reproduce the same business request. Use a stable job identifier and test whether repeating it changes the stored result or repeats a costly operation.
Decide which failures are temporary and which should be reviewed as invalid work. Inspect delivery counts and the dead-letter reason when items stop progressing. A dead-letter queue is a place to preserve failure evidence for a defined recovery procedure. Review and replay approved items only after you know the original failure was corrected and the handler can tolerate duplicates.
Practice three scenarios with different first observations
Make the queue grow while every replica is busy, then decide which metric would show that downstream throttling is limiting throughput. Next, leave the queue nonempty and remove permission from a dedicated test scaler identity. Predict the difference from a worker that starts but cannot receive. Finally, simulate a job that commits a result before settlement fails and verify one durable result after redelivery.
Write a one-line diagnosis for each observation and a test that could disprove it. Use the exercise to review scaling, messaging, and diagnostics together, then return to the official outline for objectives outside this backend case.
Your next steps
- Calculate capacity across both the workers and the model endpoint.
- Verify the scaler and worker identities independently.
- Use queue age and completed work to evaluate a scaling change.
Sources & official resources
Linked resources checked on 2026-11-27. Technical behavior and provider guidance can change; check the documentation for the version you use.
About this guide and its recommendations
Published by Prep With Proof with AI-assisted drafting. Study routines and examples are editorial suggestions, not official exam instructions or claims of a learner's personal results. Cited provider facts are linked; ownership of recommended Prep With Proof products is disclosed. No competitor endorsement or guaranteed certification outcome is implied.
Suggest a correction →