> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sizing Maia runners on Azure Container Apps

export const s_runner = "Streaming runner";

export const m_runner = "Maia runner";

export const maia = "Maia";

export const RunnerMetadata = ({runnerType, platforms = []}) => {
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Runner type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{runnerType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Runner platform</td>
            <td style={{
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {platforms.map((platform, i) => <span key={i} style={{
    background: '#dcfce7',
    color: '#15803d',
    border: '1px solid #bbf7d0',
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {platform} ✅
                  </span>)}
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<RunnerMetadata runnerType={`${maia} Hybrid`} platforms={["Azure"]} />

This guide helps you select the correct scale level for your workload. By default, the ARM template deploys the {m_runner} with two replicas on a D4 Dedicated workload profile. Because Azure Container Apps doesn't support autoscaling, you must choose the replica count when you deploy.

<Note>
  This page covers sizing for the {m_runner} (the Data Productivity Cloud agent) deployed via Azure Container Apps. If you're sizing a {s_runner}—sometimes referred to as a CDC agent, used for change data capture pipelines—read [Sizing Streaming runners](/docs/streaming/sizing-streaming-agents) instead.
</Note>

For general installation steps, read [Maia runner installation using an ARM template](/docs/guides/azure-arm-runner-install). For guidance on when to add capacity, read [Scaling best practices](/docs/guides/scaling-best-practices).

***

## Key concepts

### Runner instances and replicas

In Azure Container Apps terminology, a {m_runner} instance maps directly to a Container App replica. Increasing the number of {m_runner} instances means increasing the replica count in the ARM template.

### Workload profile nodes

The D4 Dedicated workload profile provisions nodes with 4 vCPU and 16 GiB memory. Each replica is allocated 2 vCPU and 4 GiB memory, so each D4 node accommodates exactly two replicas. The `minimumCount` and `maximumCount` settings on the workload profile control how many nodes are provisioned.

### Fixed scaling

Azure Container Apps doesn't currently support autoscaling for the {m_runner}. Set `minReplicas` equal to `maxReplicas` to maintain a fixed replica count. Choose your scale level based on the expected number of concurrent pipeline jobs.

***

## Sizing reference

The table below shows the ARM template values to set at each scale level. Apply changes to both the container app scale settings and the workload profile.

| Scale          | Replicas | D4 nodes | `minReplicas` | `maxReplicas` | Workload profile `minimumCount` | Workload profile `maximumCount` | Minimum subnet |
| -------------- | -------- | -------- | ------------- | ------------- | ------------------------------- | ------------------------------- | -------------- |
| Base (default) | 2        | 1        | 2             | 2             | 1                               | 2                               | /27            |
| ×2             | 4        | 2        | 4             | 4             | 2                               | 3                               | /27            |
| ×3             | 6        | 3        | 6             | 6             | 3                               | 4                               | /26            |
| ×4             | 8        | 4        | 8             | 8             | 4                               | 5                               | /26            |
| ×6             | 12       | 6        | 12            | 12            | 6                               | 7                               | /26            |
| ×8             | 16       | 8        | 16            | 16            | 8                               | 9                               | /25            |

<Note>
  `maximumCount` is set one higher than `minimumCount` to provide a spare node for rolling updates. This doesn't enable autoscaling.
</Note>

***

## ARM template parameters

### Container app scale settings

Set both `minReplicas` and `maxReplicas` to the same value to maintain a fixed replica count:

```json theme={null}
"scale": {
    "minReplicas": 2,
    "maxReplicas": 2
}
```

### Workload profile settings

Set `minimumCount` to the number of D4 nodes required for your chosen replica count. Set `maximumCount` to `minimumCount + 1`:

```json theme={null}
"workloadProfiles": [
    {
        "workloadProfileType": "D4",
        "name": "runner-workload-profile",
        "minimumCount": 1,
        "maximumCount": 2
    }
]
```

<Note>
  `minimumCount` = number of replicas ÷ 2 (round up for odd replica counts). `maximumCount` = `minimumCount + 1`.
</Note>

***

## Subnet requirements

Each Container Apps environment requires a dedicated subnet. The subnet must meet the following requirements at all scale levels:

* Delegated to `Microsoft.App/environments`.
* Service endpoints enabled: `Microsoft.Storage`, `Microsoft.KeyVault`, and `Microsoft.ContainerRegistry`.
* Default outbound access disabled (`--default-outbound-access false`); a NAT gateway is required for outbound traffic.

The minimum subnet prefix increases with the number of nodes:

| Subnet prefix | Usable IPs | Supported scale levels                    |
| ------------- | ---------- | ----------------------------------------- |
| /27           | \~27       | Base (2 replicas) through ×2 (4 replicas) |
| /26           | \~59       | ×3 (6 replicas) through ×6 (12 replicas)  |
| /25           | \~123      | ×8 (16 replicas) and above                |

<Note>
  If you're deploying multiple {m_runner} environments in the same virtual network, each environment requires its own dedicated subnet. Plan your VNet address space to accommodate the required number of subnets at the chosen prefix size.
</Note>

***

## Sizing guidelines

* Each additional two replicas requires one additional D4 node.
* Upgrade the subnet from /27 to /26 when you exceed four replicas.
* Upgrade the subnet from /26 to /25 when you exceed 12 replicas.
* Always set `maximumCount` to `minimumCount + 1` in the workload profile to allow rolling updates.
* For multiple {m_runner} environments in a single VNet, allocate a separate subnet per environment.
