Agent and runner infrastructure
Design and implement agent and runner infrastructure
Every job needs a machine. Choosing which machine is a cost, security and maintainability decision, and the exam tests the trade-off rather than the click-path.
The options
| Option | Managed by | Billing | Use when |
|---|---|---|---|
| Microsoft-hosted | Microsoft | Concurrency-based (parallel jobs) | Standard toolchains, no persistent state needed |
| Self-hosted | You | Your infrastructure + parallel job licence | Custom software, private network access, large caches |
| VM Scale Set agents | You, autoscaled | Azure VM cost | Bursty demand needing elastic self-hosted capacity |
| Managed DevOps Pools | Microsoft, on your config | Azure cost | The current recommendation over raw VMSS agents |
| GitHub-hosted (for Pipelines) | GitHub | Per minute, pay-as-you-go | More powerful machines, usage-based billing |
Microsoft-hosted agents exist only in Azure DevOps Services — they are not available in Azure DevOps Server. Any on-premises scenario is self-hosted by definition.
Why teams move to self-hosted
Three reasons recur, and they map directly to exam scenarios:
- Software you must install that is not on the hosted image.
- Network reachability — the build must reach a private endpoint, an on-premises database, or a licence server.
- Speed through persistence. Machine-level caches and configuration survive between runs on a self-hosted agent. A Microsoft-hosted agent is a clean machine every time, which is excellent for reproducibility and terrible for incremental build caches.
That third point is the trade-off in one line: hosted buys you cleanliness, self-hosted buys you warm caches. You cannot have both on the same agent.
Billing models differ in kind, not just amount
Microsoft-hosted capacity is bought as parallel jobs — a concurrency slot, not minutes. Two jobs at once needs two parallels regardless of how long they run. GitHub-hosted agents for Azure Pipelines bill per minute of usage instead, which inverts the optimisation: with concurrency billing you care about how many jobs overlap; with per-minute billing you care about how long they take.
Maintainability
Self-hosted is not free after setup. You own agent version upgrades, OS patching, tool installs, disk hygiene between runs, and the security posture of a machine that holds pipeline credentials. VM Scale Set agents and Managed DevOps Pools exist to keep the elasticity while handing back most of that burden — which is why Microsoft now recommends Managed DevOps Pools over building your own autoscaling scale-set pool.
Primary sources