Back to Catalog
Cloud
azure
CQRS
Separate operations that read data from those that update data
Intent & Description
The CQRS (Command Query Responsibility Segregation) pattern separates operations that read data from those that update data by using distinct interfaces. This separation allows optimization for read and write operations independently. Read operations can use optimized views, while write operations ensure consistency through the command side.
Real-world Use Case
Use when read and write operations have different performance requirements or when complex queries need optimization separate from write operations.
Source
Advantages
- Optimized read and write performance
- Scalable read operations
- Separation of concerns
- Flexible data modeling
Disadvantages
- Increased complexity
- Data consistency challenges
- More code to maintain