Stackbook Logo
architecture-descriptionestablished · high operational burden

Event-Driven Architecture (EDA)

Also known as: eda, event-driven, async-architecture, message-driven

Intent

Decouple services through asynchronous event communication, enabling independent scaling, deployment, and evolution.

Problem

Synchronous HTTP chains create tight coupling, cascade failures, and latency accumulation. Services can't evolve independently.

Forces

  • Services must deploy independently
  • Failure in one shouldn't cascade to others
  • Variable workloads: some bursty, some steady
  • Audit trail and replay needed for debugging

Solution

✓ When to Use

  • Microservices needing loose coupling
  • Audit trail, replay, temporal queries
  • Polyglot services (different languages)
  • Variable, bursty workloads

✗ When Not to Use

  • Simple request-response (REST/gRPC fine)
  • Strong consistency required (distributed transactions)
  • Team not ready for eventual consistency
  • Low throughput where sync is simpler

Pros

  • +Decoupling: producer doesn't know consumers
  • +Independent scaling: consumers scale separately
  • +Resilience: broker buffers during consumer outage
  • +Replay: new consumers, debugging, migration
  • +Polyglot: any language with broker client

Cons

  • Eventual consistency: hard for developers
  • Debugging: distributed trace across async boundaries
  • Schema evolution: breaking changes break consumers
  • Operational: broker, schema registry, monitoring
  • Latency: async adds ms to seconds

Cost Profile

Infrastructure

Medium — broker cluster, schema registry

Operational

High — topic management, lag monitoring, replay

Cognitive

High — async thinking, event modeling

Failure Modes

  • Consumer lag → stale data, delayed processing

  • Schema break → consumer crashes, data loss

  • Broker outage → producer blocks or drops

  • Duplicate events → idempotency failure

  • Event ordering violation → inconsistent state

Real-World Examples

Alternatives

  • rest
  • grpc
  • graphql
  • polling
  • webhooks

Related Patterns

  • event-sourcing
  • cqrs
  • outbox-pattern
  • cdc
  • saga-pattern
  • idempotency-key

Competency Domains

distribution communicationdata statereliability opseconomics evolutiondeployment