Contents

Chapter 1

Agent Pool Sizing Guide

Self-hosted vs Microsoft-hosted agents for data platform CI/CD workloads.

Datanest Digital — https://datanest.dev


Overview

Choosing the right agent pool strategy directly impacts pipeline execution time,

cost, and security. This guide provides sizing recommendations for the four pipeline

types included in this product, with concrete guidance on when to use Microsoft-hosted

agents vs self-hosted agents.


Decision Matrix

FactorMicrosoft-HostedSelf-Hosted
Setup effortNoneMedium to High
MaintenanceNone (managed by Microsoft)OS patching, tool updates
Cost modelPer-minute (free tier: 1,800 min/month)Infrastructure cost only
Network accessPublic internet onlyPrivate VNET, on-premises
Startup latency30-90 secondsNear-instant (if pre-warmed)
Disk space~10 GB freeCustom (100+ GB possible)
Pre-installed toolsStandard setFully customizable
Parallel jobs1 free, then paidLimited by agent count
Stateful cachingNo (ephemeral VMs)Yes (persistent disk)
Private endpoint accessNoYes

Recommendation by Pipeline

Terraform Infrastructure Pipeline

Recommended: Self-hosted (for production), Microsoft-hosted (for dev)

Reason
Terraform state storage may be behind a private endpoint
State files can be large; persistent disk caching avoids re-download
Provider plugins (~500 MB) benefit from disk caching between runs
Production infrastructure changes need network access to private VNETs

Agent Sizing:

  • vCPUs: 2
  • RAM: 4 GB
  • Disk: 50 GB (SSD)
  • Network: VNET with access to state storage and target subscriptions

Databricks DABs Deploy Pipeline

Recommended: Microsoft-hosted (all environments)

Reason
Databricks CLI communicates over HTTPS to workspace public endpoints
No large local dependencies; CLI is a small binary
Python linting and unit tests run quickly on standard agents
No persistent state needed between runs

If using private-link Databricks workspaces: Switch to self-hosted agents

with VNET connectivity to the workspace's private endpoint.

Agent Sizing (if self-hosted):

  • vCPUs: 2
  • RAM: 4 GB
  • Disk: 30 GB (SSD)

ADF ARM Deploy Pipeline

Recommended: Microsoft-hosted (all environments)

Reason
ARM template deployments use Azure Resource Manager public APIs
No large binaries or build artifacts
Pipeline is lightweight and short-running (typically 2-5 minutes)

Agent Sizing (if self-hosted):

  • vCPUs: 2
  • RAM: 2 GB
  • Disk: 20 GB

SQL Database Migration Pipeline

Recommended: Self-hosted (for staging and production)

Reason
SQL servers are typically behind private endpoints or firewall rules
DACPAC builds require .NET SDK which benefits from NuGet package caching
sqlpackage operations against large databases can be memory-intensive
Schema drift reports need direct database connectivity

Agent Sizing:

  • vCPUs: 4
  • RAM: 8 GB
  • Disk: 50 GB (SSD)
  • Network: VNET with SQL Server private endpoint access

Self-Hosted Agent Setup

Infrastructure Options

OptionProsCons
Azure VM Scale Sets (VMSS)Auto-scaling, managed lifecycleHigher complexity
Azure Container InstancesFast startup, cost-efficientNo persistent disk
Azure Kubernetes ServiceScalable, reusable clustersOperational overhead
Single Azure VMSimple, cheapNo auto-scaling

Azure VM Scale Sets provide the best balance of auto-scaling, cost control, and

maintenance simplicity for self-hosted agents.

bash
# Create a VMSS for pipeline agents
az vmss create \
  --name "vmss-azdo-agents" \
  --resource-group "rg-azdo-agents" \
  --image "Ubuntu2204" \
  --vm-sku "Standard_D2s_v5" \
  --instance-count 0 \
  --upgrade-policy-mode manual \
  --vnet-name "vnet-data-platform" \
  --subnet "snet-azdo-agents" \
  --admin-username "azureagent" \
  --generate-ssh-keys

Register as an Azure DevOps agent pool:

1. Go to Organization Settings > Agent pools > Add pool.

2. Select Azure virtual machine scale set.

3. Select the VMSS resource and configure:

SettingRecommended Value
Maximum number of VMs4
Number of agents to keep on standby1
Delay in minutes before deleting excess idle agents30
Grace period (minutes)15

Agent Software Requirements

Install these tools on the self-hosted agent image:

ToolVersionRequired By
Azure CLILatestAll pipelines
Terraform1.7.xTerraform pipeline
Databricks CLI0.232.xDABs pipeline
.NET SDK8.xSQL migration pipeline
sqlpackageLatestSQL migration pipeline
Python3.11.xDABs pipeline, linting
GitLatestAll pipelines
jqLatestVarious script steps
ruff0.4.xPython linting
Docker (optional)LatestContainer-based builds

Cost Optimization

Microsoft-Hosted

  • Free tier: 1 free parallel job with 1,800 minutes/month.
  • Paid: Each additional parallel job is approximately $40/month.
  • Optimize by reducing pipeline duration (parallel stages, caching).

Self-Hosted

  • VMSS with auto-scale to zero: Pay only when pipelines are running.
  • Spot instances: Use Azure Spot VMs for dev/test agent pools (up to 90% savings).

Not recommended for production deployments due to eviction risk.

  • Reserved instances: For always-on standby agents, 1-year reservations save ~35%.

Cost Estimation (Monthly)

ScenarioMicrosoft-HostedSelf-Hosted (VMSS)
50 pipeline runs/month, 10 min avgFree tier~$15 (D2s_v5 spot)
200 runs/month, 10 min avg~$40 (1 extra parallel)~$45 (D2s_v5)
500 runs/month, 15 min avg~$120 (3 extra parallel)~$90 (D2s_v5)

Security Considerations

1. Network isolation: Place self-hosted agents in a dedicated subnet with NSG rules

that only allow outbound access to required endpoints.

2. Ephemeral agents: Configure VMSS agents to reimage after every job to prevent

credential leakage between pipeline runs.

3. Managed identity: Assign a system-assigned managed identity to the VMSS and use

it for Azure authentication instead of service principal secrets.

4. Agent updates: Enable automatic agent software updates in the pool configuration.

5. Firewall rules: Microsoft-hosted agents use dynamic IP ranges. If your resources

require IP allowlisting, self-hosted agents with a static outbound IP (via NAT Gateway)

are the only reliable option.


Copyright 2024-2026 Datanest Digital. All rights reserved.

Chapter 2
🔒 Available in full product

Unified Data Platform CI/CD Architecture Guide

Chapter 3
🔒 Available in full product

Branch Policy Templates

Chapter 4
🔒 Available in full product

Service Connection Setup Guide

Chapter 5
🔒 Available in full product

Variable Group Configuration Guide

Chapter 6
🔒 Available in full product

Agent Pool Sizing Guide

Chapter 7
🔒 Available in full product

Unified Data Platform CI/CD Architecture Guide

You’ve reached the end of the free preview

Get the full Azure DevOps for Data Pipelines and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $59 →
📦 Free sample included — download another copy or visit the store for the full product.
Azure DevOps for Data Pipelines v1.0.0 — Free Preview