{"head":{"title":"What Is Event-Driven Architecture? Definition | OceanLab","description":"In event-driven architecture, services announce what happened and others react, instead of calling each other. Trade-offs, an example and mistakes.","canonical":"https://oceanlab.in/glossary/event-driven-architecture"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"event-driven architecture","path":"/glossary/event-driven-architecture"}],"slug":"event-driven-architecture","term":"Event-driven architecture","aka":["EDA","event-driven design"],"category":"System design","short":"A way of designing software where parts of the system publish events about what happened, and other parts react to them on their own.","body":[["An event is a fact, such as order placed or payment failed. The service that saw it publishes the event to a broker or ",{"href":"/glossary/message-queue","text":"message queue"},". Any number of other services subscribe: one sends an email, one updates stock, one feeds analytics. The publisher does not need to know who is listening."],["This is the opposite of a chain of direct calls, where the order service calls email, then stock, then analytics, and fails if any of them is down."]],"why":["Events decouple parts of a system, so new features can be added by subscribing to existing events, and a slow consumer does not slow the main flow. The cost is that the flow is harder to follow and debug, and consumers must cope with delays and duplicates."],"example":["When a patient books in a clinic app, a booking created event is published. A reminder service schedules texts, the billing service creates a draft invoice and the ",{"href":"/glossary/data-warehouse","text":"data warehouse"}," records it. Later, adding a feedback survey is just one new subscriber."],"inBuild":["We define event names and payloads as a contract and version them, write events in the same transaction as the data change (often with an outbox table), make consumers ",{"href":"/glossary/idempotency","text":"idempotent"}," and trace events end to end in ",{"href":"/glossary/observability","text":"observability"}," tools."],"mistakes":[["Using events for things that need an immediate answer, like checking a password."],["Publishing an event and then failing to save the data, or the other way round."],["No catalogue of events, so nobody knows what listens to what."]],"related":[{"href":"/glossary/message-queue","label":"Message queue","detail":"A buffer that holds messages, such as tasks or events, until a worker is ready to process them, so the sender does not have to wait."},{"href":"/glossary/webhook","label":"Webhook","detail":"An HTTP request one system sends to a URL you choose as soon as an event happens, so you do not have to keep asking."},{"href":"/glossary/idempotency","label":"Idempotency","detail":"The property of an operation that has the same effect whether it runs once or several times, so it is safe to retry."},{"href":"/glossary/microservices","label":"Microservices","detail":"A way of building an application as many small services, each owning one job and its own data, deployed independently."},{"href":"/glossary/etl","label":"ETL (extract, transform, load)","detail":"A data pipeline that pulls data out of source systems, cleans and reshapes it, and loads it into a destination such as a data warehouse."}],"tools":[{"href":"/tools/workflow-automation-roi","label":"Workflow automation ROI","detail":"Free tool"}],"links":[],"sources":[],"legal":false,"updatedAt":"2026-10-25"}