wasAsked.

CQRS — Benefits and Drawbacks: In your own opinion, why is there a benefit to using CQRS? What’s a drawback of it? ↳ Follow-up: Why use CQRS for a system at this scale, when CQRS is typically for very large-scale systems?

Dodge Construction Network · Senior Developer · technical

Published

Asked in 2026 · System Design

Community answers

Posted by wasAsked editorial collection

Benefits of CQRS (in my view) 1. Optimised reads and writes: the write side focuses on business rules and consistency; the read side uses models shaped exactly for screens or APIs (denormalised views, precomputed aggregates, search indexes), making queries simple and fast. 2. Independent scaling: read-heavy workloads can scale out with replicas, caches or read stores without affecting writes. 3. Clearer code: command handlers express business intent (ApproveRefund), and query handlers stay thin projections; less complex mapping through a single shared model. 4. Better fit for complex domains and event-driven designs: commands produce domain events, which can update read models, trigger integrations and support auditing or event sourcing. 5. Security and validation clarity: commands are the only path to change state, making authorization and validation easier to enforce consistently. Drawbacks 1. Added complexity: more classes and concepts (commands, handlers, read models, projections), and a learning curve for the team. 2. Eventual consistency (when read and write stores are separate): users may not see their changes immediately, which needs UX handling (optimistic UI, "processing" states, reading from the write side right after a change). 3. Synchronisation infrastructure: projection logic, messaging, retries, rebuilding read models, and monitoring for lag or failures. 4. Duplication: data stored in multiple shapes, and more code paths to test. 5. Overkill for simple CRUD: it can slow development down without benefit. Why use CQRS at moderate scale? (the follow-up) CQRS is not only a large-scale pattern. The lightweight version — separating command handlers from query handlers within the same database (often with MediatR or simple handler classes) — is cheap and useful at any scale: - Read queries can use efficient projections (Dapper or EF Core Select) instead of loading aggregates, which improves performance even with modest data. - Complex business rules stay isolated in command handlers, improving maintainability and testability. - It keeps the door open: if a read path later needs a separate store (search or reporting), the boundaries already exist. Full CQRS with separate databases and event-driven projections is justified by scale or complex read requirements. A good answer distinguishes the two: "We used CQRS-lite with one database for code clarity and query performance, and only introduced a separate read store (Elasticsearch) for search, where reads had very different requirements."

Ravindra Wadile · · 0 likes

Sign in to add your answer

Related interview topics