You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add CPU calculation formulas and capacity planning guidance
- Add formula table for calculating broker CPU requirements
- Add caution about other AIO components consuming ~200-300m CPU
- Add small cluster example showing why equal cores isn't enough
- Expand larger deployment example with step-by-step math
- Based on test results confirming pods get stuck Pending when
cluster CPU is at or below broker reservation
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-configure-availability-scale.md
+56-5Lines changed: 56 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: sethmanheim
5
5
ms.author: sethm
6
6
ms.topic: how-to
7
7
ms.subservice: azure-mqtt-broker
8
-
ms.date: 05/14/2025
8
+
ms.date: 02/20/2026
9
9
ms.service: azure-iot-operations
10
10
11
11
# CustomerIntent: As an operator, I want to understand the settings for the MQTT broker so that I can configure it for high availability and scale.
@@ -258,12 +258,59 @@ To prevent resource starvation in the cluster, the broker can be configured to [
258
258
>
259
259
> If you enable CPU resource limits, make sure your cluster has enough CPU resources to satisfy the broker's requests based on your cardinality configuration. See the CPU requirements below.
260
260
261
-
The MQTT broker currently requests one (1.0) CPU unit per frontend worker and two (2.0) CPU units per backend worker. For more information, see [Kubernetes CPU resource units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu).
261
+
### Calculate CPU requirements
262
262
263
-
For example, the following cardinality would request the following CPU resources:
263
+
The MQTT broker requests CPU resources per pod based on the number of workers configured:
264
264
265
-
-**For frontends**: 2 CPU units per frontend pod, totaling 6 CPU units.
266
-
-**For backends**: 4 CPU units per backend pod (for two backend workers), times 2 (redundancy factor), times 3 (number of partitions), totaling 24 CPU units.
265
+
-**Frontend pods**: 1.0 CPU per worker
266
+
-**Backend pods**: 2.0 CPU per worker
267
+
268
+
Use the following formulas to calculate total CPU requirements:
269
+
270
+
| Component | Formula |
271
+
|-----------|---------|
272
+
| Frontend CPU |`replicas`×`frontend.workers`× 1.0 CPU |
273
+
| Backend CPU |`partitions`×`redundancyFactor`×`backend.workers`× 2.0 CPU |
274
+
|**Total broker CPU**| Frontend CPU + Backend CPU |
275
+
276
+
For more information, see [Kubernetes CPU resource units](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu).
277
+
278
+
> [!CAUTION]
279
+
> The broker isn't the only component that consumes CPU on the cluster. Other Azure IoT Operations components (such as the dataflow engine, OPC UA connector, and system pods) also reserve CPU resources, typically around 200-300m in aggregate. When planning cluster capacity, make sure to account for this overhead on top of the broker's CPU requirements. If the total CPU requested by all pods exceeds the available CPU on your cluster, broker pods get stuck in a `Pending` state.
280
+
281
+
#### Example: small cluster
282
+
283
+
Consider a 2-node cluster with 4 CPU cores per node (8 cores total) with the following cardinality:
Even though the cluster has 8 cores total, this deployment fails because other Azure IoT Operations components also consume CPU (~280m). The broker pods get stuck in `Pending` state with `Insufficient cpu` errors.
308
+
309
+
To resolve this, either add more nodes, increase cores per node, or reduce the broker cardinality.
310
+
311
+
#### Example: larger deployment
312
+
313
+
The following cardinality requests significantly more CPU resources:
267
314
268
315
```json
269
316
{
@@ -281,6 +328,10 @@ For example, the following cardinality would request the following CPU resources
0 commit comments