An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
IoT Hub throttling is governed by operation-specific limits that are applied per hub (and in some cases per hub per unit) and per second. To avoid 429 throttling errors, the total rate of each operation type must stay within its corresponding throttle for the SKU and number of units.
Key points from the throttling model:
- Operation throttles are rate limits
- Throttles are enforced as rate limitations (per second, often also evaluated over minute ranges) and are subject to traffic shaping.
- When limits are exceeded for too long, IoT Hub responds with HTTP 429 and an IoT Hub error code such as
429001 ThrottlingException. - Clients should implement back-off and retry when receiving 429 responses. See Retry patterns.
- Device-to-cloud (D2C) and cloud-to-device (C2D) message rates
- D2C and C2D throttles define the maximum rate at which messages can be sent, independent of the 4‑KB metering chunks.
- D2C messages can be up to 256 KB; C2D messages can be up to 64 KB. These are maximum message sizes, not per-second limits.
- To avoid throttling, the total D2C send rate from all devices and the total C2D send rate from the service must remain below the per-hub limits for the chosen tier and unit count.
- Example of traffic shaping and 429 behavior
- If an S1 hub with a limit of 100 D2C messages/sec receives 200 messages/sec:
- Initially, IoT Hub accepts and processes the burst, queuing excess requests.
- Over time, IoT Hub processes only 100 messages/sec and latency increases.
- When the backlog queue fills, IoT Hub starts returning
429 ThrottlingException.
- This behavior applies similarly to other throttled operations.
- If an S1 hub with a limit of 100 D2C messages/sec receives 200 messages/sec:
- Direct methods and jobs – bandwidth-based throttling
- For direct methods, throttling is based on bandwidth per unit:
- Payload 0–4 KB counts as 4 KB; up to 40 calls/sec/unit before hitting 160 KB/sec/unit.
- Payload 4–8 KB counts as 8 KB; up to 20 calls/sec/unit.
- Payload 156–160 KB counts as 160 KB; only 1 call/sec/unit.
- For S3 tier jobs (update twin, invoke direct method via jobs), there is a 50 jobs device operations/sec/unit limit; direct method calls outside jobs still use the 24 MB/sec/unit limit.
- For direct methods, throttling is based on bandwidth per unit:
- Device connections throttle (separate from message rate)
- Device connections have their own throttle (for example, 100 new connections/sec for a single S1 unit), independent of the maximum number of simultaneously connected devices.
- This affects how quickly devices can connect, not how many messages per second they can send once connected.
- Monitoring and tuning to avoid 429
- Use the Telemetry message send attempts metric and compare it with the documented throttling limits to see if the hub is being driven near or beyond its capacity.
- Monitor the Number of throttling errors metric, which tracks
429001 ThrottlingException. - If throttling persists even after reducing message rates and implementing back-off, consider scaling up the IoT hub (more units or higher tier).
- Error codes related to throttling
-
429000 GenericTooManyRequests: too many requests overall; reduce request rate. -
429001 ThrottlingException: operation-specific throttling; see IoT Hub quotas and throttling. -
429002 ThrottleBacklogLimitExceeded: backlog queue exceeded; reduce rate and review traffic shaping behavior. -
429003 ThrottlingBacklogTimeout: backlogged requests timed out; reduce rate. -
429005 DeviceThrottlingLimitExceeded: per-device throttling; reduce that device’s request rate.
-
To determine the exact “messages per second” value that avoids 429 for a specific hub, consult the IoT Hub quotas table for the chosen tier and number of units, then ensure total D2C and C2D message rates stay below those per-second limits, factoring in traffic shaping and backlog behavior.
References: