Event-Driven Architecture in Cloud: How Systems React Instead of Ask

Event-Driven Architecture in Cloud: How Systems React Instead of Ask

Event-driven architecture in cloud systems is a design where services react to things that have happened, instead of asking each other for information. When an order is placed, a file is uploaded or a payment fails, the service that noticed publishes an event, and every other service that cares about that event responds in its own time. The short answer is that nothing calls anything directly: work flows through events, which keeps services loosely coupled and lets a system grow without turning into a tangle of direct calls.

This style suits the cloud particularly well, because cloud platforms provide the plumbing it needs: managed queues, event buses and stream processors that handle delivery, retries and scaling. Before those services existed, building event-driven systems meant running and babysitting your own message brokers. Now the broker is a managed service, and the architecture is within reach of ordinary teams. Our guide to cloud networking explained covers the networks these events travel across.

Key takeaways

  • Event-driven architecture in cloud systems means services react to events instead of calling each other directly.
  • The four building blocks are producers, events, brokers and consumers.
  • The main patterns are publish/subscribe, event streaming, choreography and orchestration.
  • Managed services such as EventBridge, SNS, SQS and Kafka remove the need to run your own broker.
  • The trade-offs are eventual consistency, harder debugging and the need to handle duplicate delivery.

What event-driven architecture actually means

An event is a record that something happened, and it is immutable: once published, it is a fact about the past. An order was placed at a certain time, for a certain amount, by a certain customer. That fact does not change. Services that need to know about it subscribe to the relevant events and react, each in their own way. The email service sends a confirmation, the warehouse service starts picking, and the analytics service records the sale.

The key difference from a traditional request-response design is who initiates the work. In request-response, service A calls service B and waits for an answer. In event-driven design, service A publishes an event and moves on, and service B reacts when the event reaches it. The publisher does not know who is listening, and the consumer does not know who published. That ignorance is the point: it is what keeps the services independent. Best for: systems where one action should trigger several independent reactions, and where a short delay is acceptable.

The four building blocks

Every event-driven system has four parts. Producers are the services that detect something worth reporting and publish events. Events themselves are small, self-contained messages, usually carrying the type of event, the time it happened, and the data a consumer needs to act. Brokers are the infrastructure that receives events from producers and delivers them to consumers, storing them until they are picked up. Consumers are the services that subscribe to events and do the work.

The broker is the part teams most often underestimate. It must store events durably so nothing is lost if a consumer is down, deliver each event at least once, and scale to the volume of events the system produces. Managed brokers handle all of this, which is why most cloud teams start there. Best for: architects who want a clear mental model before choosing tools, because the same four blocks appear in every event-driven system.

Publish/subscribe: one event, many reactions

Publish/subscribe, usually shortened to pub/sub, is the simplest event pattern. A producer publishes an event to a topic, and every service subscribed to that topic receives a copy. Adding a new consumer is just a matter of subscribing it to the topic; the producer never changes. This is how a single order event can trigger an email, a warehouse pick, a loyalty-points update and an analytics record, all independently.

The weakness of pub/sub is that it says nothing about ordering or history. If two events arrive in the wrong order, or a consumer needs to replay what happened last week, a plain pub/sub topic cannot help. That is where streaming comes in. Best for: fan-out work, where one event should trigger several independent actions that do not depend on each other.

Event streaming: the log as the source of truth

Event streaming keeps events in an ordered, durable log that consumers read at their own pace. Apache Kafka, the best-known streaming platform, works this way. It was developed at LinkedIn and open sourced in early 2011, and it treats the event log as the system’s record of what happened. A consumer can read from the start, replay events after a failure, or have several consumers read the same log independently.

Streaming suits systems that need history, replay or high throughput. A fraud-detection service, for example, may need to re-read the last hour of transactions after a rule change, which is trivial with a log and impossible with a plain queue. The cost is operational: running a streaming cluster well takes skill, which is why many teams use a managed Kafka service instead. Best for: high-volume data pipelines, analytics and any system where replaying history matters.

Choreography versus orchestration

When a business process spans several services, teams choose between choreography and orchestration. In choreography, each service reacts to events and publishes its own, and the process emerges from the chain of reactions, with no central controller. It is flexible and loosely coupled, but the overall flow is spread across many services, which makes it hard to see and hard to debug.

In orchestration, a central coordinator, sometimes called a saga orchestrator, tells each service what to do next and tracks the overall state. The flow is visible in one place, and failures are easier to handle, but the coordinator becomes a component every service depends on. Most real systems use both: choreography for simple fan-out, and orchestration for multi-step processes where the order of steps matters. Best for: teams deciding how much central control a multi-service workflow needs.

Aspect Request-response Event-driven
How work starts One service calls another and waits A service publishes an event and moves on
Coupling Caller knows the service it calls Publisher and consumer never meet
Failure behaviour Caller fails if the service fails Events wait in the broker until the consumer recovers
Scaling Both services scale together Each consumer scales on its own
Consistency Strong, within one call Eventual, across the system
Debugging Follow one call chain Trace events across many services

The table makes the trade-off plain. Request-response is simpler to reason about and gives immediate answers, while event-driven design is more resilient and more scalable but harder to follow. Neither is better in general; the right choice depends on whether the work needs an answer now or can happen later.

A diagram on a monitor showing events flowing from producers through a central broker to several consumer services
An event broker sits between producers and consumers, storing events durably and delivering them even when a consumer is temporarily down.

Managed services that make it practical

Cloud providers offer several managed building blocks, and choosing between them is mostly about the shape of the work. Amazon EventBridge, launched in July 2019 as an evolution of CloudWatch Events, is a serverless event bus that routes events from applications, software-as-a-service tools and AWS services to targets such as functions and queues. It suits routing and integration work, where the main job is getting the right events to the right places.

Simple Notification Service, or SNS, is a pub/sub service for fan-out, while Simple Queue Service, or SQS, is a queue that holds messages until a consumer is ready. Together they form a common pattern: SNS fans an event out to several SQS queues, and each consumer reads its own queue at its own pace. For streaming at scale, managed Kafka services provide the durable log without the work of running a cluster. Best for: teams that want event-driven architecture without operating a broker themselves.

The trade-offs nobody should skip

Eventual consistency is the first trade-off. When a service reacts to an event, there is a delay, and during that delay different parts of the system disagree about the world. A customer may see an order confirmed before the warehouse has picked it, and the user interface must be designed for that. Teams that expect every read to reflect every write immediately will be disappointed.

Duplicate delivery is the second. Most brokers guarantee at-least-once delivery, which means a consumer can receive the same event twice, after a crash or a retry. Consumers must therefore be idempotent: processing the same event twice must have the same effect as processing it once. The usual technique is to record the event’s identifier and skip events already seen. Debugging is the third cost: when something goes wrong, there is no single call chain to follow, so distributed tracing and a way to inspect the event log are essential. Best for: teams weighing the pattern honestly before committing, when the costs are still avoidable.

Decision checklist: is event-driven right for this work?

  • Choose event-driven when one action should trigger several independent reactions, such as notifications, warehouse picks and analytics.
  • Choose event-driven when the producer should not wait, because the consumer’s work can happen later without the user noticing.
  • Choose request-response when the caller needs an answer immediately, such as checking a price or validating a login.
  • Choose streaming when history and replay matter, and plain pub/sub when simple fan-out is enough.
  • Confirm every consumer is idempotent before going live, because duplicate delivery will happen eventually.
  • Set up distributed tracing and dead-letter queues from the start, not after the first incident.

Frequently asked questions

What is event-driven architecture in simple terms?

It is a design where services react to events, which are records that something happened, instead of calling each other directly. A producer publishes an event, a broker delivers it, and consumers react, each in their own way and time.

Is event-driven architecture the same as microservices?

No, but they often go together. Microservices describe how a system is split into services, while event-driven design describes how those services communicate. Microservices can use direct calls, and a monolith can be event-driven internally.

What is the difference between a queue and an event bus?

A queue delivers each message to one consumer, which is ideal for distributing work. An event bus delivers each event to every interested consumer, which is ideal for fan-out. Many systems use both: a bus for routing and queues for the work itself.

Does event-driven architecture mean eventual consistency?

Almost always, yes. Because consumers react after the event is published, there is a delay before every part of the system agrees. Systems that need immediate consistency for a particular read should keep that read on a synchronous path.

How do you handle a failed event?

Retry it a few times, then move it to a dead-letter queue for inspection. A dead-letter queue holds events that could not be processed, so they can be examined, fixed and replayed instead of being lost silently. Our guide to cloud load balancing explained covers a related resilience technique at the network layer.

Latest articles

Scroll to Top