Functions does not seem to scale as I had hoped. A lot of missing function calls.

Le, Nghia 40 Reputation points
2025-01-09T16:32:09.1033333+00:00

Plan: Flex plan.
Premise: We are testing the performance of the functions, uploading about 80k documents to a azure container. The BlobTrigger has a source of EventGrid.
Using: azcopy copy <source> <destination> -- recursive to copy 80k data.

Message Queues: Delivered 80k msgs, no errors nothing in the dead letter queue.
The function within the function app itself has one job. Print out data when it gets invoked, and we use application insights to query the invocation counts of the print outs to the messages in the log.

Variables: I've played with:
function memory (2048, 4096),
scaling,
batching. (The more I add to batch, the less invocations the functions get) So far Batch of 1 seems to yield the best results.
batch size: 64 - 512, 1024

All of my testing comes back with inconclusive or erratic results. There was only one time, where I managed to get 80k messages to the queue, and pull of 80k function invocations.

The odd thing is, there are no errors, nothing that would tell me why It's missing function calls. I would think messages get consumed. Things will get picked up in a queue. If it times out and can't finish in time, it'll log it. Here, it just doesn't call and doesn't tell us why.

Has anyone done this sort of testing on the event grid and functions before with better sucess?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

Answer accepted by question author
  1. Loknathsatyasaivarma Mahali 2,690 Reputation points Moderator
    2025-03-18T21:14:14.5233333+00:00

    Hello Le, Nghia,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    The issue was related to the "flex consumption" plan, which couldn't handle the load. The Event Grid's “delivery and retry” feature caused significant delays. The solution was to switch to the premium functions plan and EP2, which resolved the problem of functions not firing.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.