software-design
When duplication beats DRY
Every engineer learns DRY in their first year: don't repeat yourself, extract the common code, keep one source of truth. It is
software-design
Every engineer learns DRY in their first year: don't repeat yourself, extract the common code, keep one source of truth. It is
architecture
Messaging looks clean on a diagram and gets messy in production. Duplicate messages, slow consumers, fat events, DLQs used as trash cans: what each problem really costs and the patterns (idempotency, event design, async UX) that keep a broker-based system honest.
software-architecture
Architecture is the set of decisions that feel permanent after six months. An honest tour of monolith, layered, modular monolith, SOA, microservices and event-driven options: what each really costs and why the modular monolith deserves more attention than it gets.
Microservices promise independence and deliver network calls where method calls used to be. Why small and medium teams pay the highest price: chaos scaling instead of product scaling, lost shared context, operational overhead, and the way back to sanity.
A distributed monolith is what you get when microservice boundaries are drawn wrong. How to design autonomous modules in three phases: business analysis for boundaries, tight communication contracts, and deployment decisions driven by real architectural drivers.
Race conditions in read models are the price of parallel event-driven systems. How to handle events arriving out of order: treat the read model as an anti-corruption layer, separate facts from rumours, and build projections that survive an effect arriving before its cause.
Event-driven architecture with Kafka can still be a distributed monolith. The anti-patterns that get you there: CRUD sourcing, property sourcing, clickbait events, missing commands, and the fixes: rich events, outbox, internal vs external events, anti-corruption layers.
Not all events are equal: domain events, Event Carried State Transfer, notification events and the Claim Check pattern each serve a different job. A typology of what you are really sending, plus the event vs command distinction that prevents architectural chaos.
Event-driven systems lose, duplicate and reorder messages unless you design against it. Practical patterns for reliable delivery: the outbox pattern, change data capture straight from the database, handling order and duplicates, and how to test it all.
Microservices vs monoliths is a trade-off, not a dogma. Why companies really migrate (team coordination, not speed), the complexity bill that follows, what DoorDash's transformation shows, and how to pick architecture on evidence instead of fashion.
Kafka and RabbitMQ solve messaging differently: Kafka is an append-only streaming log with fan-out consumers and offsets, RabbitMQ a classic broker with exchange routing and explicit acks. A side by side comparison to pick the right one for your system.
Monolith, microservices, or serverless? A side by side comparison of how each backend architecture handles scaling, development speed, deployment, and cost, where each one breaks down in practice, and a summary that helps you pick the right fit for your project.