CQRS
Separating the write model from the read models that serve queries.
4 to work through
-
intermediate Multiple choice
A team proposes CQRS for a CRUD admin panel because reads are slow. Is that the right call?
2 min answer -
advanced
A consumer fintech team proposes CQRS because their read and write workloads are very different. What evidence should be required before accepting the added synchronisation, projection and operational complexity?
2 min answer -
advanced
A marketplace team proposes CQRS because search and browse read patterns differ sharply from the transactional write model. What evidence should be required before accepting the extra synchronisation and projection complexity?
3 min answer -
advanced
A search index built by a projection has been serving wrong results for three weeks because of a bug in the projection logic. Walk through recovery.
2 min answer
5 terms in this topic
CQRS as a Data Architecture
Treating the serving layer as a derived, rebuildable projection of an authoritative write store.
practiceMaterialised Read Model
A precomputed, query-shaped copy of data maintained asynchronously from the system of record - and the operational obligations that come with it.
conceptPattern Scope Discipline
The rule that heavyweight data patterns - CQRS, event sourcing, materialised read models - belong to the specific part of a domain that needs them, n…
patternProjection
The process that consumes changes from the write side and maintains a read model, and the component where most CQRS bugs live.
patternRead Model
A data structure shaped for a specific query rather than for the domain, maintained separately from the write model.
Neighbouring topics
Data Architecture
General material on structuring, storing and governing data.
Relational Modelling
Normalisation, keys, constraints and the invariants a schema enforces.
NoSQL Stores
Key-value, document, wide-column and graph — what each buys and forbids.
Indexing
Designing indexes per query shape, and paying for them on every write.
Query Optimisation
Reading a plan, fixing statistics, and finding the real bottleneck.
Transactions & Isolation
ACID, isolation levels, and the anomalies each level permits.
Replication
Primaries, replicas, lag, and synchronous versus asynchronous durability.
Partitioning & Sharding
Splitting data across machines, and the one-way door of a partition key.
Caching Strategies
Cache-aside, read-through, write-through and where each belongs.
Cache Invalidation
Stampedes, penetration, staleness windows and versioned keys.
Event Sourcing
Storing the change log as the system of record, and what that costs forever.
Change Data Capture
Turning a database's replication log into a stream, and its coupling risk.
Data Warehousing
Dimensional modelling, star schemas and analytical workloads.
Data Lakes & Lakehouses
Open formats on object storage with transactional metadata on top.
ETL & ELT
Where transformation happens, and how much raw history you keep.
Streaming Data
Windowing, watermarks, late arrivals and exactly-once semantics.
Data Governance
Ownership, lineage, quality, catalogues and who may see what.
Data Lifecycle & Retention
How long data is kept, where it ages to, and how it is actually deleted.
Polyglot Persistence
Choosing a store per workload, and the operational cost of variety.