Event Hubs Architecture

Azure Event Hubs is a highly scalable data streaming platform and event ingestion service. It can capture millions of events per second so you can develop and deploy event-driven applications and solutions.

Azure Event Hubs Architecture Diagram
High-level overview of Azure Event Hubs architecture.

Core Components

The Event Hubs architecture is designed for high throughput and low latency, enabling the ingestion and processing of vast amounts of event data. The primary components are:

Namespaces

An Event Hubs namespace is a logical container for Event Hubs instances. A namespace provides a unique scope name for your Event Hubs. When you create an Event Hubs namespace, you are creating a PaaS (platform-as-a-service) cloud application that is accessible via the Event Hubs protocol.

Event Hubs

An Event Hub is the entity within a namespace that data streams are sent to and consumed from. An Event Hub is a named entity that acts as a channel. You can think of it as a specific topic or stream of events.

Partitions

Partitions are the fundamental unit of parallelism in Event Hubs. An Event Hub consists of one or more partitions. Event Hubs uses partitions to allow consumers to scale out. When data is sent to an Event Hub, it is appended to one of the partitions.

Consumer Groups

A consumer group is a logical view of an Event Hub. Each consumer group allows a separate instance of an application to read from the Event Hub independently, without impacting other consumer groups.

Data Flow and Processing

The typical data flow in Event Hubs involves producers sending events and consumers reading them:

  1. Producers: Applications or services that generate event data. They send these events to a specific Event Hub within a namespace.
  2. Ingestion: Event Hubs receives the events and appends them to the appropriate partitions based on the partition key or round-robin distribution.
  3. Storage: Events are stored in partitions for a configured retention period.
  4. Consumers: Applications or services that process the event data. They join a consumer group and read events from the partitions.
  5. Processing: Consumers process the events for various use cases, such as real-time analytics, data warehousing, or triggering downstream workflows.

Scalability and Durability

Event Hubs is designed with scalability and durability as core principles:

Integration with Other Azure Services

Event Hubs integrates seamlessly with other Azure services to build comprehensive event-driven architectures: