Glossary

CQRS

Command Query Responsibility Segregation: separate the write model from the read model.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

Command Query Responsibility Segregation: separate the write model from the read model.

How it works

Writes go through one model optimised for validation and consistency; reads come from separate, denormalized views optimised for query speed (often kept in sync asynchronously). Lets each side scale and evolve independently — powerful for complex domains, but two models and eventual consistency add real complexity, so don't reach for it by default.

Common questions

What is CQRS?

Command Query Responsibility Segregation: separate the write model from the read model.

How does CQRS work?

Writes go through one model optimised for validation and consistency; reads come from separate, denormalized views optimised for query speed (often kept in sync asynchronously). Lets each side scale and evolve independently — powerful for complex domains, but two models and…

What is CQRS used for in system design?

Writes go through one model optimised for validation and consistency; reads come from separate, denormalized views optimised for query speed (often kept in sync asynchronously). Lets each side scale and evolve independently — powerful for complex domains, but two models and…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →