AZ-400 Practice Question: Design and implement build and release pipelines
You are designing a multi-stage YAML pipeline in Azure DevOps that builds, tests, and deploys a .NET Core application. The pipeline must use a self-hosted agent pool for compliance. You need to minimize agent idle time while ensuring that the agent is always available for builds. What should you do?
⚠ Common exam trap
It's easy for candidates to confuse 'minimizing idle time' with 'maximizing utilization' and choose Option B (multiple agents on one VM), not realizing that resource contention and lack of horizontal scaling make it unsuitable for concurrent builds and compliance-driven self-hosted pools.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Deploy a scale set agent pool with autoscaling enabled
A scale set agent pool with autoscaling enabled dynamically provisions and deprovisions Azure virtual machines based on the pipeline's demand, minimizing idle time while ensuring agents are available when builds are triggered. This approach aligns with the requirement for a self-hosted agent pool for compliance and optimizes cost by scaling down when no jobs are pending.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Provision a virtual machine scale set with a fixed number of agents
Why it's wrong here
Provisioning a virtual machine scale set with a fixed number of agents does not scale with demand, resulting in idle agents and wasted compute cost during low load, and insufficient capacity and longer queue times during peak load.
- ✗
Install multiple agents on a single VM to maximize utilization
Why it's wrong here
Installing multiple agents on a single VM maximizes resource contention rather than utilization, as concurrent builds compete for the same CPU and memory, and the VM provides no horizontal elasticity, so idle time persists and reliability suffers if the VM fails.
- ✓
Deploy a scale set agent pool with autoscaling enabled
Why this is correct
Deploying a scale set agent pool with autoscaling enabled is the correct approach because it dynamically adds or removes agent VMs based on job queue length, ensuring sufficient capacity during build bursts while minimizing idle compute costs during quiet periods.
- ✗
Use a single persistent agent and queue builds when idle
Why it's wrong here
Using a single persistent agent and queueing builds when idle introduces a severe bottleneck, as only one pipeline job can execute at a time while all other jobs wait, increasing lead times and preventing any parallelism for multi-pipeline scenarios.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure DevOps
Azure DevOps is a Microsoft service that provides development tools for planning, building, testing, and deploying software applications using automated pipelines and collaboration features.
Key term
DevOps
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to shorten the development lifecycle and deliver high-quality software continuously.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.