CQRS
CQRS Operational Tradeoffs
AdvancedHow separating the command and query models enables independent scaling, what consistency guarantees CQRS gives up, how read model staleness propagates, and when the operational complexity is justified.
Step 1 of 5
Unified Model: The Starting Point
Most applications start with a unified model: reads and writes share the same database tables and the same service layer. This is simple, strongly consistent, and works well at low scale. The problem emerges when read patterns and write patterns have fundamentally different performance characteristics: complex joins for reads, high-throughput simple writes. Optimizing one degrades the other.
Write Latency12 ms
Read Latency (complex join)180 ms
DB CPU (reads)72 %
DB CPU (writes)18 %
Unified model: reads driving 72% CPU, writes fast, but conflict for resources
Key Takeaways
- →Read and write workloads often have different resource profiles: unified models force them to share
- →Complex read queries (dashboards, search, aggregations) compete with OLTP writes for I/O and CPU
1 / 5