How do Azure Functions scale in relation to Event Hubs partitions?

Wessel Vonk 45 Reputation points
2025-04-17T06:19:34.8833333+00:00

Hi, I'm using Azure Functions with an Event Hub trigger and would like to confirm how scaling and partition assignment works in this integration.

From my understanding:

  • Only one function instance processes events from a given partition at any one time, to maintain message order, offset integrity, etc.
  • Therefore, the maximum number of concurrently running function instances is equal to the number of partitions in the Event Hub (each partition is exclusively handled by a single instance at a time).
  • To increase parallel processing, one has to increase the number of partitions in the Event Hub.

Is that indeed the intended and recommended scaling model?

Thanks in advance!

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
711 questions
{count} votes

2 answers

Sort by: Most helpful
  1. phemanth 15,320 Reputation points Microsoft External Staff
    2025-04-17T08:17:27.65+00:00

    @Wessel Vonk

    You're correct in your understanding of how Azure Functions scale in relation to Event Hubs partitions. Here's a bit more detail to confirm and expand on your points:

    Single Instance per Partition: Indeed, only one function instance processes events from a given partition at any one time. This ensures that the order of messages and offset integrity are maintained.

    Maximum Concurrent Instances: The maximum number of concurrently running function instances is equal to the number of partitions in the Event Hub. Each partition is handled by a single instance to maintain the integrity of the event stream.

    Increasing Parallel Processing: To increase parallel processing, you would need to increase the number of partitions in the Event Hub. This allows more function instances to run concurrently, each processing events from a different partition.

    This scaling model is designed to ensure that the processing of events is both efficient and orderly. If you need to handle a higher volume of events, increasing the number of partitions is the recommended approach.

    Hope this helps. Do let us know if you any further queries.

    2 people found this answer helpful.

  2. Sander van de Velde | MVP 36,146 Reputation points MVP
    2025-04-17T15:09:33.33+00:00

    Hello @Wessel Vonk ,

    The answer @phemanth gives is a good starting point.

    Keep in mind that the number of Eventhub partitions are set at creation and cannot change anymore afterwards when using Basic or standard tier. Higher tiers can change that number.

    There is also a limitation on the number of partitions per eventhub, different per tier.

    More information about partitions is found here.

    0 comments No comments

Your answer

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