Event-Driven Architecture
MessagingEvent-driven architecture is a design pattern where system components communicate by producing and reacting to events, enabling loose coupling, real-time processing, and independent scaling of services.
In event-driven architecture (EDA), components emit events when something notable happens (e.g., "order placed", "payment received") rather than directly calling other services. Other components subscribe to the events they care about and react accordingly.
EDA comes in two main flavors: event notification (lightweight events that prompt the receiver to fetch details) and event-carried state transfer (events contain all necessary data, reducing the need for callbacks).
Benefits include extreme loose coupling (producers don't know about consumers), natural audit trails (events form an immutable log), and the ability to add new consumers without modifying existing producers.
Challenges include eventual consistency (consumers process events asynchronously), debugging complexity (tracing a request across multiple event-driven hops), and ensuring event ordering when required.
Related Terms
Ready to design?
Practice using event-driven architecture in a real system design on Supaboard's interactive whiteboard.
Browse Challenges