event-driven architecture
A design in which services communicate by publishing and reacting to events, instead of calling each other directly and waiting.
In more detail
It separates a quick acknowledgement to the caller from the work that follows, lets consumers scale and fail independently, and absorbs bursts. The costs are duplicates, ordering questions and harder end-to-end tracing.
Example
Kafka often serves as the shared event log.Related terms
- event — A record of something that has already happened, such as task completed, with an identifier, a time, a type and its data.
- message queue — A store that holds messages from producers until consumers are ready to process them, decoupling the rate of arrival from the rate of work.
- asynchronous processing — Accepting a request now and doing the work later, separately, instead of making the caller wait for it to finish.
- at-least-once delivery — A delivery guarantee under which every message arrives, but some may arrive more than once.
- transactional outbox — Saving an event into an outbox table in the same database transaction as the business change, then having a separate worker publish it.
- change data capture — Reading every insert, update and delete from a database's own change log and turning them into a stream of events.
- fan-out — The number of children each node of a tree can have.
Taught in
- Event-Driven Architecture And Queues — Modern API Architecture: REST, GraphQL & gRPC
- Dual Writes And Why They Lose Data — Apache Kafka & Event Streaming
- The Transactional Outbox — Apache Kafka & Event Streaming
- Change Data Capture In Principle — Apache Kafka & Event Streaming