SA-201a · Module 1
Event-Driven Architecture
4 min read
Event-driven architecture inverts the control flow. Instead of component A calling component B directly, component A publishes an event and component B reacts to it. The components do not know about each other. They know about events. This decoupling is the fundamental value of the pattern — components can be added, removed, or modified without changing the components that publish the events they consume.
- Strengths Loose coupling between components. New consumers can be added without modifying producers. Natural fit for asynchronous workflows — order processing, notification systems, data pipelines. Scales horizontally because consumers are independent. Resilient because a failed consumer does not crash the producer.
- Weaknesses Debugging is difficult — when something goes wrong, tracing the event chain across multiple consumers is a detective exercise. Eventual consistency replaces immediate consistency — the system is always catching up. Event ordering is not guaranteed without explicit design. The architecture is invisible — there is no call stack to follow, only an event bus to reconstruct.
- When to Use Systems with multiple consumers of the same data change. Notification and alerting systems. Data pipelines where processing steps are independent. Integration architectures where new systems are frequently added. Anywhere the response "processed" does not mean "fully complete."
- When to Avoid Simple request-response workflows where synchronous processing is sufficient. Systems requiring strong consistency where eventual consistency is unacceptable. Small applications where the overhead of an event bus exceeds the benefit of decoupling. Teams without experience managing distributed systems.