Azure Functions with Event Hub Trigger - Incoming Messages Is Much Higher than Outgoing Messages
Hi,
We have an Azure Function App with a set of functions and most of them are connected to different event hubs via Event Hub trigger.
The problem:
There's a specific function that runs at lower rate than the actual workload reaching the event hub.
Note that we have auto scale enabled with maximum instances on the consumption tier, plus the specific event hub has only one consumer group and the only consuming party is that specific azure function.
Findings that support it:
The incoming messages in the event hub is bigger than the outgoing messages as you can see in the following image. Note that we have no idea what happened on the date where these metrics started diverting, it's unclear why that happened.
Further investigations:
We assume we hit some kind of quota imitation and there's some sort of throttling perhaps.
We did see that there was throttling on the event hub namespace by observing the "Throttled Requests" metric.
We increased the throughput units and enabled the auto inflate feature as well which brought "Throttled Requests" metric to zero, which is good, but the gap between the incoming and outgoing remains the same.
Perhaps we're hitting function scale quota? Perhaps even at subscription level limits as mentioned here - https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#scale
Problem is, it is unclear how we can diagnose and troubleshoot it.
Additional context:
- Function app is in a consumption tier
- Function app has auto scale enabled, set to maximum (200 instances)
- Function app includes other functions as well, all other functions seem to operate as expected, only this function in specific seems to have a problem (all other functions are connected to different event hubs but on the same event hub namespace)
- Event hub namespace is in a standard tier
- As mentioned, this specific azure function is the only consuming party of this specific event hub, which has only one consumer group
- Azure function uses cardinality set to many
Can anyone please help?
When can the incoming messages in event hubs be larger than outgoing when "Throttled Requests" metric is zero and the single consuming party is set up with auto-scale?
How can we diagnose and troubleshoot it further?