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
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-configure-availability-scale.md
+34-6Lines changed: 34 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.topic: how-to
7
7
ms.subservice: azure-mqtt-broker
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 11/04/2024
10
+
ms.date: 11/11/2024
11
11
12
12
#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.
13
13
ms.service: azure-iot-operations
@@ -121,6 +121,7 @@ The frontend subfield defines the settings for the frontend pods. The two main s
121
121
-**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.
122
122
123
123
-**Workers**: The number of logical frontend workers per replica. Each worker can consume up to one CPU core at most.
124
+
124
125
#### Backend chain
125
126
126
127
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
256
257
257
258
---
258
259
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
260
267
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.
262
269
263
-
### Configuration required to ensure the backends and dataflow instances are scheduled on separate nodes/node-pools
270
+
### Verifying anti-affinity settings
264
271
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
+
```
266
294
267
-
### Self-healing and resilience -->
295
+
These are the only anti-affinity rules set for the broker.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-disk-backed-message-buffer.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: patricka
6
6
ms.topic: how-to
7
7
ms.service: azure-iot-operations
8
8
ms.subservice: azure-mqtt-broker
9
-
ms.date: 11/04/2024
9
+
ms.date: 11/11/2024
10
10
11
11
#CustomerIntent: As an operator, I want to configure MQTT broker so that I can modify the message queue behavior.
12
12
---
@@ -79,24 +79,33 @@ Tailor the broker message buffer options by adjusting the following settings:
79
79
80
80
-**Configure the volume**: Specify a volume claim template to mount a dedicated storage volume for your message buffer.
81
81
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.
83
83
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).
85
85
86
86
Use the following sections to understand the different volume modes:
87
87
88
88
-[Ephemeral volume](#ephemeral-volume) is the preferred option,
89
89
-[Persistent volume](#persistent-volume) is preferred next, and
90
90
-[*`emptyDir`* volume](#emptydir-volume) least preferred.
91
91
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.
93
93
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):
95
102
96
103
```azurecli
97
104
az iot ops create ... --broker-config-file <FILE>.json
98
105
```
99
106
107
+
This setting cannot be changed after deployment. To change the disk-backed message buffer configuration, redeploy the Azure IoT Operations instance.
108
+
100
109
## Ephemeral volume
101
110
102
111
[Ephemeral volume](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes#generic-ephemeral-volumes) is the preferred option for your message buffer.
0 commit comments