# What is Saga pattern? Definition and meaning

Splits a business transaction into local steps, each with a compensating action if later steps fail.

## Definition

**Saga pattern**: Splits a business transaction into local steps, each with a compensating action if later steps fail.

In short: Managing distributed transactions with compensations.

## When it is used

Consistency across microservices.

## Where it fits

Saga pattern 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.
- **[Event sourcing](/glossary/event-sourcing)**: Persists every state change as an immutable event, from which current state is rebuilt.
- **[Hexagonal architecture](/glossary/hexagonal-architecture)**: Isolates business logic from infrastructure through explicit ports and adapters.
- **[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 **[Saga pattern](/tools/saga-pattern)** 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: [SAC](/glossary/sac) · Next term: [SageMaker](/glossary/sagemaker)
