IoT Hub Event Grid costs

305 Views Asked by At

Our system has IoT devices that send device-to-cloud (DeviceTelemetry) messages to our IoT Hub instance. Each message has a custom format and can be identified by the event type field in the IoT Hub message properties. Then, based on the event type, the message is consumed by Azure Functions.

We use the IoT Hub Event Grid system topic.

Flow: D2C messages routed to IoT Hub Event Grid system topic -> Advanced filter evaluation routes message to proper Azure Function.

The solution is efficient, but based on our observations and estimations, it will lead to unacceptable costs. As we understand, we pay for every operation in Event Grid, which is publishing message to Event Grid, custom advanced filter evaluation, and message delivery. Knowing that each Event Grid subscription will use custom filter evaluation and the assumption that we will have 20 subscriptions, we have 22 operations for each D2C message.

Question 1. Are our Event Grid calculations correct? Using Event Grid that way makes it terribly expensive.

Question 2. Can the Event Grid flow be adjusted to make it cheaper? I mean, e.g., avoid custom filter evaluation for each subscription.

Question 3. Can the Event Grid message subject even be changed? This will allow us to use standard filtering - not advanced one.

1

There are 1 best solutions below

2
Sampath On

. Cost for every operation in Event Grid, which includes publishing messages to Event Grid, custom advanced filter evaluation, and message delivery. However, the first 100,000 operations per month are free for push-style delivery, which is generally available.

. For IoT Hub events, the subject is the device name. The subject takes the format devices/{deviceId}.

  • One way is to use standard filtering instead of advanced filtering for cheaper cost but the subject of IoT Hub events is the device name it takes the format devices/{deviceId}. AFAIK, The subject cannot be changed.

enter image description here

I used the below MSDOC for

  • Receive events to an HTTP endpoint.
  • IoT Hub events by using Event Grid to trigger actions.