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…