Azure IoT Hub C2D metrics & throttling

Kamil Lucyszyn 20 Reputation points
2024-06-03T14:49:38.0366667+00:00

Scenario: We reached the number of C2D messages per second, and while trying to send a C2D message to our devices, we encountered exceptions that informed us that the request quota for C2D messages was exceeded.

  1. Are there any built-in Azure metrics presenting the number of C2D messages sent per second? We do not have any analytics presenting that we reached the quota - only the exceptions from our code.
  2. Can an alert rule be set to notify when the C2D message limit is exceeded?
  3. Do we understand that the "unit" mentioned in the docs: Understand Azure IoT Hub quotas and throttling | Microsoft Learn is equivalent to IoT Hub partition? One unit = One IoT Hub partition. This means that the higher the number of partitions, the higher the number of C2D throttling quotas per second.
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,148 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 30,066 Reputation points
    2024-06-17T07:07:15.59+00:00

    Kamil Lucyszyn Greetings!

    Please see below answers to your queries.

    Are there any built-in Azure metrics presenting the number of C2D messages sent per second? We do not have any analytics presenting that we reached the quota - only the exceptions from our code.

    Please refer to the resource Monitoring Azure IoT Hub data to find different metrics provided to you by out of the box functionality.

    AFAIK, there is no built-in metric that provides number of C2D messages sent per second.

    Also, see Azure IoTHub - How to get usage data per device and Is there a way to get number of messages per IoT device sending to IoT Hub if it helps.

    Can an alert rule be set to notify when the C2D message limit is exceeded?

    Please check Set up and use metrics and logs with an IoT hub and Monitoring Azure IoT Hub data reference for more details.

    Do we understand that the "unit" mentioned in the docs: Understand Azure IoT Hub quotas and throttling | Microsoft Learn is equivalent to IoT Hub partition? One unit = One IoT Hub partition. This means that the higher the number of partitions, the higher the number of C2D throttling quotas per second.

    It refers to the number of IoT Hub units that you have provisioned for your hub. Each unit provides a certain amount of capacity for your hub, including the number of C2D messages that can be sent per second. The number of units that you provision for your hub determines the maximum daily quota of messages that you can send in your hub per day. The higher the number of units, the higher the number of C2D throttling quotas per second. However, it's important to note that increasing the number of units will also increase the cost of your IoT Hub.

    Do let me know if that helps or have any further queries.

    0 comments No comments