# What is CQRS? Definition and meaning

Command query responsibility segregation uses separate models for updating and querying data.

## Definition

**CQRS**: Command query responsibility segregation uses separate models for updating and querying data.

In short: Separating reads from writes.

## When it is used

Systems with very different read and write needs.

## Where it fits

CQRS 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.
- **[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.
- **[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 **[CQRS](/tools/cqrs)** 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: [Cost and latency budgets](/glossary/cost-and-latency-budgets) · Next term: [CrewAI](/glossary/crewai)
