CQRS: When You Need It, When It's Dead Weight
Separating read and write models: the clarity CQRS buys in a complex domain, and the dead weight it adds to plain CRUD
Tag
29 entries: Note, System, Essay.
Separating read and write models: the clarity CQRS buys in a complex domain, and the dead weight it adds to plain CRUD
Most big-data problems are really bad modeling or a missing index; before moving to a distributed system, ask whether the data is actually big
The consistency and data-integrity crises that projects which moved to NoSQL for the comfort of going schemaless eventually hit
Before adding a separate search engine, queue, or document DB: how far PostgreSQL gets you on its own, and where its limit begins.
The concrete red flags that reveal code or architecture has turned needlessly complex — and where to start simplifying
Connecting a critical system to external APIs: using timeouts, retries, and circuit breakers to stop one service's collapse from taking the whole system down.
Before you move to FaaS: the real cost of cold-start latency, vendor lock-in risk, and the workloads where serverless actually pays off
Separate API layers for mobile and web: the hidden cost of bending one API to fit every client, and when a BFF is actually warranted
Should a job run inside the HTTP request or go to a queue? The decision line, drawn through response time and fault tolerance
Closing dual-write with an outbox, suppressing the at-least-once repeats it creates, and encrypting the personal data inside the event.
The price of loose coupling through events: balancing the flexibility it buys against the risk of making your system's flow impossible to trace
Multi-cluster GitOps with no long-lived kubeconfig: SPIFFE IDs, SPIRE-issued short-lived SVIDs — the order to build it in, and what each step costs.
Turning a message that crosses PHP, Go and Python over a frozen envelope into one OpenTelemetry trace — no new field, no new dependency.
Naive replay re-poisons the queue or double-fires side effects. The safe shape: reset, dry-run, sandbox-first, select.
An architecture decision written in a wiki is a wish. The boundaries you can't enforce quietly erode until the diagram stops matching the code.
A message's data is an untyped contract the queue won't check. Validate it at the edge: producer before publish, consumer as a safety net.
At-least-once delivery means a handler will see the same message twice. The idempotency key, where it comes from, and the dedupe that survives a crash
You can't change a cross-service contract atomically. The rule: additive is safe, a breaking change needs a new identity — consumers upgrade first
Vibe coding lowers the cost of a first version, not the cost of being wrong. That bill arrives in production, not at build time.
Why the classic layered structure is enough for most projects while we drown in abstraction layers, and when Clean Architecture actually pays off.