Most developers answer this question like this:
“CQRS separates read and write.”
That’s correct — but far from enough to impress an interviewer.
❌ Bad answer
It separates read and write operations.
✅ Senior answer
CQRS (Command Query Responsibility Segregation) separates read operations (queries) and write operations (commands) into different models.
This allows optimizing each side independently for performance, scalability, and maintainability.
// Command
public class CreateOrderCommand {
public string Product { get; set; }
}
// Query
public class GetOrderQuery {
public int OrderId { get; set; }
}👉 Use CQRS when:
⚠️ Avoid CQRS when:
❌ Using CQRS everywhere (overengineering)
❌ Not understanding trade-offs (complexity ↑)
❌ Mixing command and query logic again
Want to practice explaining this like a senior?
Practice Now