# What is Event sourcing? Definition and meaning

Persists every state change as an immutable event, from which current state is rebuilt.

## Definition

**Event sourcing**: Persists every state change as an immutable event, from which current state is rebuilt.

In short: Storing changes as a sequence of events.

## When it is used

Auditability and replay.

## Where it fits

Event sourcing belongs to **Architecture** in the [MLOps and AI infrastructure](/topics/mlops-ai-infrastructure) topic. These are the other terms in the same group:

- **[Microservices](/glossary/microservices)**: An architecture that splits a system into services that are deployed and scaled separately.
- **[Domain-driven design](/glossary/domain-driven-design)**: A design approach that uses a shared language and bounded contexts to align code with the business.
- **[CQRS](/glossary/cqrs)**: Command query responsibility segregation uses separate models for updating and querying data.
- **[Hexagonal architecture](/glossary/hexagonal-architecture)**: Isolates business logic from infrastructure through explicit ports and adapters.
- **[Saga pattern](/glossary/saga-pattern)**: Splits a business transaction into local steps, each with a compensating action if later steps fail.
- **[Circuit breaker](/glossary/circuit-breaker)**: Opens after repeated failures so a service fails fast and recovers, instead of piling up requests.
- **[gRPC](/glossary/grpc)**: A framework that uses Protocol Buffers and HTTP/2 for typed, efficient service calls.
- **[GraphQL](/glossary/graphql)**: An API style in which clients ask for exactly the fields they need in one request.

## Learn more

The full guide to **[Event sourcing](/tools/event-sourcing)** explains how it works, when to use it and how it compares with the alternatives, with examples. The [glossary](/glossary) lists every term on the site from A to Z.

Previous term: [Evaluation metrics](/glossary/evaluation-metrics) · Next term: [Event-driven architecture](/glossary/event-driven-architecture)
