Skip to content

Commit ceccd15

Browse files
Merge pull request #290335 from jlian/release-aio-ga
Multi-node deployment + why use EVC/PVC
2 parents 2adf2dd + 441e0cd commit ceccd15

File tree

2 files changed

+48
-11
lines changed

2 files changed

+48
-11
lines changed

articles/iot-operations/manage-mqtt-broker/howto-configure-availability-scale.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.topic: how-to
77
ms.subservice: azure-mqtt-broker
88
ms.custom:
99
- ignite-2023
10-
ms.date: 11/04/2024
10+
ms.date: 11/11/2024
1111

1212
#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.
1313
ms.service: azure-iot-operations
@@ -121,6 +121,7 @@ The frontend subfield defines the settings for the frontend pods. The two main s
121121
- **Replicas**: The number of frontend replicas (pods) to deploy. Increasing the number of frontend replicas provides high availability in case one of the frontend pods fails.
122122

123123
- **Workers**: The number of logical frontend workers per replica. Each worker can consume up to one CPU core at most.
124+
124125
#### Backend chain
125126

126127
The backend chain subfield defines the settings for the backend partitions. The three main settings are:
@@ -256,15 +257,42 @@ To learn more, see [Azure CLI support for advanced MQTT broker configuration](ht
256257

257258
---
258259

259-
<!-- TODO -->
260+
## Multi-node deployment
261+
262+
To ensure high availability and resilience with multi-node deployments, the Azure IoT Operations MQTT broker automatically sets [anti-affinity rules](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for backend pods.
263+
264+
These rules are predefined and cannot be modified.
265+
266+
### Purpose of anti-affinity rules
260267

261-
<!-- ## Best practices
268+
The anti-affinity rules ensure that backend pods from the same partition don't run on the same node. This helps to distribute the load and provides resilience against node failures. Specifically, backend pods from the same partition have anti-affinity with each other.
262269

263-
### Configuration required to ensure the backends and dataflow instances are scheduled on separate nodes/node-pools
270+
### Verifying anti-affinity settings
264271

265-
### Load balancers required in front of the frontends
272+
To verify the anti-affinity settings for a backend pod, use the following command:
273+
274+
```sh
275+
kubectl get pod aio-broker-backend-1-0 -n azure-iot-operations -o yaml | grep affinity -A 15
276+
```
277+
278+
The output will show the anti-affinity configuration, similar to the following:
279+
280+
```yaml
281+
affinity:
282+
podAntiAffinity:
283+
preferredDuringSchedulingIgnoredDuringExecution:
284+
- podAffinityTerm:
285+
labelSelector:
286+
matchExpressions:
287+
- key: chain-number
288+
operator: In
289+
values:
290+
- "1"
291+
topologyKey: kubernetes.io/hostname
292+
weight: 100
293+
```
266294
267-
### Self-healing and resilience -->
295+
These are the only anti-affinity rules set for the broker.
268296
269297
## Next steps
270298

articles/iot-operations/manage-mqtt-broker/howto-disk-backed-message-buffer.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: patricka
66
ms.topic: how-to
77
ms.service: azure-iot-operations
88
ms.subservice: azure-mqtt-broker
9-
ms.date: 11/04/2024
9+
ms.date: 11/11/2024
1010

1111
#CustomerIntent: As an operator, I want to configure MQTT broker so that I can modify the message queue behavior.
1212
---
@@ -79,24 +79,33 @@ Tailor the broker message buffer options by adjusting the following settings:
7979

8080
- **Configure the volume**: Specify a volume claim template to mount a dedicated storage volume for your message buffer.
8181

82-
- **Select a storage class**: Define the desired *StorageClass* using the `storageClassName` property.
82+
- **Select a storage class**: Define the desired *StorageClass* using the `storageClassName` property.
8383

84-
- **Define access modes**: Determine the access modes you need for your volume. For more information, see [persistent volume access modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1).
84+
- **Define access modes**: Determine the access modes you need for your volume. For more information, see [persistent volume access modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1).
8585

8686
Use the following sections to understand the different volume modes:
8787

8888
- [Ephemeral volume](#ephemeral-volume) is the preferred option,
8989
- [Persistent volume](#persistent-volume) is preferred next, and
9090
- [*`emptyDir`* volume](#emptydir-volume) least preferred.
9191

92-
Both persistent volume and ephemeral volume are generally provided by the same storage classes. If you have both options, choose ephemeral. However, ephemeral requires Kubernetes 1.23 or higher.
92+
Both persistent and ephemeral volumes are generally provided by the same storage classes. If both options are available, choose ephemeral. Note that ephemeral volumes require Kubernetes 1.23 or higher.
9393

94-
Finally, deploy the Azure IoT Operations using the `az iot ops create` command with the `--broker-config-file` flag. See the following command (other parameters omitted for brevity):
94+
> [!TIP]
95+
> Specifying a Ephemeral Volume Claim (EVC) or Persistent Volume Claim (PVC) template lets you to use a storage class of your choice, increasing flexibility for some deployment scenarios. For example, Persistent Volumes (PVs) provisioned using a PVC template appear in commands like `kubectl get pv`, which can be useful for inspecting the cluster state.
96+
>
97+
> If your Kubernetes nodes lack sufficient local disk space for the message buffer, use a storage class that provides network storage like Azure Blobs. However, it's generally better to use local disk with a smaller `maxSize` value, as the message buffer benefits from fast access and doesn't require durability.
98+
99+
### Deploy Azure IoT Operations with disk-backed message buffer
100+
101+
To use disk-backed message buffer, deploy Azure IoT Operations using the `az iot ops create` command with the `--broker-config-file` flag. See the following command (other parameters omitted for brevity):
95102

96103
```azurecli
97104
az iot ops create ... --broker-config-file <FILE>.json
98105
```
99106

107+
This setting cannot be changed after deployment. To change the disk-backed message buffer configuration, redeploy the Azure IoT Operations instance.
108+
100109
## Ephemeral volume
101110

102111
[Ephemeral volume](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes#generic-ephemeral-volumes) is the preferred option for your message buffer.

0 commit comments

Comments
 (0)