Back to Pattern Library
Event-Drivenarchitecture-pattern

CQRS

readswritesevent sourcingmaterialized views
🎮

Try This Pattern Interactively

Experience this pattern hands-on in our interactive playground with live examples and visualizations

Visual learning • Step-by-step guides • Real-time feedback
Launch Playground

CQRS

Summary

Separate write and read models to optimize for different workloads; often paired with events.

What it is

Commands mutate write models; queries read denormalized projections. Enables scaling and performance tuning per side.

Trade-offs

  • Eventual consistency
  • More moving parts and governance