Skip to content

Commit c42ce8b

Browse files
committed
Merged main into live
2 parents 6a0718c + 102d7b2 commit c42ce8b

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/managed-devops-pools/configure-networking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Configure networking
33
description: Learn how to configure networking for Managed DevOps Pools.
4-
ms.date: 06/04/2025
4+
ms.date: 06/13/2025
55
---
66

77
# Configure Managed DevOps Pools networking

docs/managed-devops-pools/configure-scaling.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Configure scaling
33
description: Learn the different performance options for Managed DevOps Pools and their impact on agent performance.
4-
ms.date: 11/15/2024
4+
ms.date: 06/13/2025
55
---
66

77
# Configure scaling
@@ -15,7 +15,7 @@ Managed DevOps Pools can be configured as stateless or stateful.
1515
* [Stateless pools](#stateless-pools) - Provide a fresh agent for every job.
1616
* [Stateful pools](#stateful-pools) - Allow sharing of agents between multiple jobs.
1717

18-
The default setting for a Managed DevOps pool is stateless (**Fresh agent every time**) but in some cases teams might want to reuse agents in order to reuse the packages or files created during the previous pipeline run. Build workload is a common scenario where teams want to preserve state and reuse agents. You can achieve stateful pools through Managed DevOps Pools while balancing it with security best practices. By default an agent can be reused for a maximum of 7 days but you can configure it to be recycled sooner.
18+
The default setting for a Managed DevOps pool is stateless (**Fresh agent every time**) but in some cases teams might want to reuse agents in order to reuse the packages or files created during the previous pipeline run. Build workload is a common scenario where teams want to preserve state and reuse agents. You can achieve stateful pools through Managed DevOps Pools while balancing it with security best practices. By default an agent can be reused for a maximum of 7 days but you can configure it to be recycled sooner.
1919

2020
> [!NOTE]
2121
> Stateless pools or use of the agent state setting **Fresh agent every time** are recommended by security experts as a defense against supply chain attacks.
@@ -24,6 +24,8 @@ The default setting for a Managed DevOps pool is stateless (**Fresh agent every
2424

2525
When a stateless agent is configured, a new agent is procured for each job, and is discarded after the job completes.
2626

27+
For the lifecycle of stateless agents and an explanation on how they are used in Azure DevOps pipelines (including potential delays in allocation), see the following [Lifecycle of agents and potential delays in allocation](#lifecycle-of-agents-and-potential-delays-in-allocation) section.
28+
2729
#### [Azure portal](#tab/azure-portal/)
2830

2931
:::image type="content" source="media/agent-performance/stateless-agent.png" alt-text="Screenshot of a stateless agent.":::
@@ -884,6 +886,18 @@ If you don't know your usage patterns and want to rely on automatic forecasting
884886

885887
* * *
886888

889+
## Lifecycle of agents and potential delays in allocation
890+
891+
Standby agents using a [Stateless](#stateless-pools) scheme require the Azure Pipelines agent to be installed and configured before transitioning from the [ready](./view-agents.md#status) state to the [allocated](./view-agents.md#status) state and running a pipeline. When provisioning new agents, Managed DevOps Pools attempts to download the latest [Azure Pipelines agent](https://github.com/microsoft/azure-pipelines-agent/releases) in order to have it already downloaded on standby agents before they transition into ready status. Startup, connection, and beginning the job can take anywhere from 10 seconds to a minute depending on the pool's SKU speed, image used, and networking load. Additionally, certain settings in a pipeline job can cause a redownload and running of a different agent, and regressions and rollbacks of the agent can also cause a redownload of the agent. [Ready agents](./view-agents.md#status) will always have a potential delay, as Managed DevOps Pools uses this agent in an "ephemeral" manner, meaning we start and run the task agent one time per job.
892+
893+
If you are seeing delays in ready agents picking up jobs from Azure DevOps, the following are important to consider:
894+
895+
* Do you have ready agents? - The most common issue is a misunderstanding of when agents should be preprovisioned. When the number of jobs queued is greater than the standby agent count on a pool, or jobs are queued outside of the pre-provisioning schedule, when the standby agent count is set to be empty, then machines must be spun up from scratch.
896+
* Are you configuring standby agents with multiple images properly? - If you are not specifying which image to use in your pipeline using the [ImageOverride](./demands.md#imageoverride) demand, jobs will be targeting the first image. This means, depending on your scaling settings, you might not have as many agents available as you'd expect as some are allocated to other images.
897+
* Are you using the [ImageVersionOverride](./demands.md#imageversionoverride) in your pipelines? - When you use `ImageVersionOverride` to specify a different image version than what's configured in your [pool settings](./configure-images.md), each agent is started on demand using the specified image version. Standby agents are provisioned using the image versions specified in your [pool's configuration](./configure-images.md), so if you use `ImageVersionOverride`, any standby agents won't match that version and a fresh agent is started.
898+
* Are Proxy/VNet/Firewall settings slowing down your pool? - Potential slowness from any network setting will result in agents taking longer to start the agent and connect it to Azure DevOps.
899+
* Are you overriding the agent version? - By default, Managed DevOps pools will run on the most recent Azure DevOps task agent version. Settings in the Pipeline yaml (such as the [Agent.Version](/azure/devops/pipelines/yaml-schema/pool-demands#agent-variables-as-system-capabilities) demand) and Azure DevOps organization settings can force pipelines to use older versions of the task agent, requiring a redownload once a machine has been allocated.
900+
887901
## See also
888902

889903
* [Configure pool settings](./configure-pool-settings.md)

0 commit comments

Comments
 (0)