Event-Driven Architecture (EDA) is an architectural style where services communicate through events rather than direct calls. A single event (OrderPlaced) can trigger multiple independent handlers in parallel: sending an email, updating stock, writing analytics.
Benefits
Loose coupling — the event producer does not know about subscribers
Scalability — handlers can be scaled independently
Extensibility — a new handler plugs in without any change to the producer
Components
Producer — generates and publishes the event
Event Broker — routes events (Kafka, RabbitMQ)
Consumer — subscribes and processes
Challenges
Debugging: harder to trace the flow of execution
Eventual Consistency: different services' state temporarily diverges