pattern

CQRS

also called Command Query Responsibility Segregation

Separating the model used to change state from the model used to read it, so each can be optimised independently.

patternsread-modelscaling

Writes want normalisation, constraints and a model shaped by business invariants. Reads want denormalisation, precomputed aggregates and a model shaped by the screen. CQRS stops pretending one model can do both: commands go through the write model, queries are served from one or more read models built from it.

It pays off when the read and write workloads genuinely differ — vastly more reads than writes, or reads that need shapes the write model cannot serve without expensive joins.

The cost is that the read model is behind, which makes eventual consistency a user-visible property, and that there are now two models to keep in step. Applied to a CRUD screen with balanced traffic it is pure overhead. It is also frequently confused with event sourcing; the two combine well but neither requires the other.