.NET Architecture & System Design Interview Question #118

What is event-driven architecture?

Microservices, API Gateway, Service Communication & Event-Driven Architecture Mid-Level Intermediate

Quick Interview Answer

Event-driven architecture organizes communication around events representing facts that have occurred, such as OrderPlaced or PaymentCompleted. Producers publish events without needing to know all interested consumers.

Detailed Explanation

Event-driven architecture organizes communication around events representing facts that have occurred, such as OrderPlaced or PaymentCompleted. Producers publish events without needing to know all interested consumers.

This can improve decoupling and extensibility, but the system must handle event contracts, duplicates, ordering, eventual consistency, observability, and failed consumers.

Code Example

Order Service
    |
 OrderPlaced
    v
Event Broker
 |       |       |
Billing Analytics Notification