Azure Event Hubs Quotas and Limits

Understanding the quotas and limits of Azure Event Hubs is crucial for designing scalable, reliable, and cost-effective solutions. These limits ensure fair usage across all customers and help maintain the stability of the service. This document outlines the key quotas and limits you should be aware of when working with Event Hubs.

General Limits

The following limits apply to Azure Event Hubs across different tiers and configurations:

Resource Limit Description
Maximum number of Event Hubs per namespace 100 (Basic/Standard) The total number of Event Hubs you can create within a single Event Hubs namespace.
Maximum number of Consumer Groups per Event Hub 20 (Basic/Standard) Each Event Hub can have multiple consumer groups to allow different applications or services to read the event stream independently.
Maximum throughput units (TUs) per namespace 20 (Basic), 40 (Standard) This limit pertains to the provisioned TUs for a namespace. Auto-inflate can increase this limit dynamically.
Maximum event size 256 KB The maximum size of a single event payload. This includes message properties.
Maximum batch size 1 MB The maximum size of a batch of events that can be sent or received in a single operation.
Maximum partition count per Event Hub 32 (Basic/Standard) The number of partitions determines the parallelism for event processing.

Throughput Limits

Throughput limits are often tied to the selected pricing tier and the number of Throughput Units (TUs) or Processing Units (PUs) provisioned. Higher tiers and more units generally mean higher throughput.

Standard Tier Throughput

In the Standard tier, throughput is controlled by Throughput Units (TUs). Each TU provides a certain amount of ingress and egress bandwidth:

  • Ingress: 1 MB/sec (or 1000 events/sec), whichever comes first.
  • Egress: 2 MB/sec (or 4000 events/sec), whichever comes first.

You can scale TUs manually or use the auto-inflate feature to dynamically increase TUs based on traffic.

Premium Tier Throughput

The Premium tier offers dedicated capacity and more predictable performance. Throughput is measured in Processing Units (PUs) and offers significantly higher limits than the Standard tier.

Network and Connection Limits

  • Concurrent Connections: While there isn't a hard limit on concurrent connections per namespace defined in the documentation, it's practical to consider that each connection consumes resources. Efficient connection management is recommended.
  • Amqp/Kafka Connections: For specific protocols, connection limits might be influenced by the underlying protocol itself and the client library implementation.

Data Retention

Data retention is a configurable setting that determines how long events are stored in an Event Hub before being automatically deleted.

  • Basic/Standard Tier: Up to 7 days.
  • Premium Tier: Up to 90 days.

Event Hubs Capture can be used to archive events to Azure Blob Storage or Azure Data Lake Storage for longer-term retention.

Important: Limits can vary slightly based on the Azure region and specific service updates. Always refer to the official Azure Event Hubs documentation for the most up-to-date information.

Request Rate Limits

While not explicitly documented as strict quotas, high request rates for management operations (e.g., creating/deleting hubs, updating configurations) can be throttled. For event sending and receiving, the throughput is primarily governed by TUs/PUs and batch sizes.

Best Practices for Managing Limits

  • Monitor Usage: Regularly monitor your Event Hubs metrics (ingress/egress, TUs, connection counts) in the Azure portal.
  • Use Auto-Inflate: For Standard tier, enable auto-inflate to automatically scale TUs as your workload increases, preventing throttling.
  • Optimize Batching: Send and receive events in batches to improve throughput and reduce the number of requests.
  • Choose the Right Tier: Select the appropriate Event Hubs tier (Basic, Standard, Premium) based on your performance, scalability, and cost requirements.
  • Partition Strategy: Design your partitioning strategy carefully to enable parallel processing and distribute load effectively.
  • Data Archiving: For long-term data needs, leverage Event Hubs Capture to offload data to durable storage.

By understanding and managing these quotas and limits, you can ensure your Azure Event Hubs implementation performs optimally and meets your application's demands.