The Outbox Pattern đź‘€
Save data
Publish events
Two operations
One failure away from trouble
Service crashes in between
Half-done work
Inconsistent state across microservices
The Outbox Pattern fixes this.
đź§± Write business data
📦 Write the event to an outbox table
đź”’ Same database transaction
One atomic operation.
Events are published later
Safely
Reliably
If you build event-driven microservices,
this is one of the safest defaults you can choose.
If you build backend systems with .NET or AWS, follow me.
#microservices #distributedSystems #eventdriven #backend #softwareengineering #cloudarchitecture #aws #codingmatheus
Adding a queue doesn’t remove failure.
It just moves it.
Queues are powerful and often the right choice.
But async doesn’t mean safe.
Failures get deferred.
Backlogs grow.
Retries amplify problems.
The real danger is the illusion of safety.
Resilience doesn’t come from infrastructure.
It comes from designing for failure.
Follow me to keep up and stay ahead.
#microservices #distributedSystems #softwarearchitecture #eventdriven #backendengineering #resilience #engineeringlessons
.NET Aspire is powerful and I absolutely love it.
But it’s important to be clear about what it does...and what it doesn’t.
Aspire makes running multiple microservices locally incredibly easy.
Clone a repo, run one command, and you’re productive fast.
But Aspire isn’t architecture.
It won’t fix bad boundaries, tight coupling, or unclear contracts.
It accelerates good decisions, it doesn’t replace them.
If you build microservices with .NET, this distinction matters.
#dotnet #dotnetaspire #microservices #softwarearchitecture #distributedSystems #backendengineering
Splitting a database during a migration is where things usually go wrong.
Most systems start with one shared database…
and everything depends on it.
If you try to split it in one go, you will break production.
The safer approach?
• Trace how the data is actually used in code
• Duplicate data temporarily to remove coupling
• Keep backward compatibility during the transition
It’s not about a perfect cut.
It’s about a safe, gradual separation.
Feature flags aren’t just for product experiments.
They’re one of the safest ways to migrate architecture in production.
Instead of flipping everything at once, you can:
• Send 1% of traffic to the new path
• Observe behavior
• Gradually ramp up
• Instantly roll back by switching the flag off
This is how teams reduce risk when breaking apart monoliths or evolving systems.
And today, this isn’t just if/else anymore.
Tools like LaunchDarkly, Unleash, and AWS AppConfig make this a first-class capability.
One thing I’ve been thinking about more lately:
We’ve been using feature flags to control user-facing behavior…
But what happens when systems start making decisions themselves?
Architecture is evolving. Control mechanisms like this are going to matter even more.
#softwarearchitecture #microservices #aws #featureflags #cloudarchitecture
Switching to a new system is the riskiest part of any migration.
Because that’s when:
• hidden bugs show up
• edge cases break
• and rollback suddenly matters a lot
One way teams reduce that risk is parallel run.
Run the old and new systems side by side.
Sometimes even executing the same requests in both systems using shadow testing to validate behaviour in production.
In this video I break down how parallel run works and how it complements patterns like strangler fig.
Don’t just migrate. Prove it first.
#softwarearchitecture #microservices #systemdesign #backenddevelopment #cloud
Don’t migrate your monolith all at once.
It sounds like the obvious move… but it’s one of the fastest ways to introduce risk, disruption, and unnecessary cost.
There’s a better way.
In this video, I break down the Strangler Fig Pattern and how it lets you modernize your system safely, one piece at a time.
If you build or evolve backend systems, this is one pattern you need to understand.
#microservices #softwarearchitecture #dotnet #cloudarchitecture #backenddevelopment #systemdesign
Microservices are not the starting point for most systems.
But how do you know when your modular monolith is reaching its limits?
In this video I break down three practical signals that it may be time to start thinking about extracting services:
• One module forces the whole system to scale
• Your data architecture pushes you toward distributed patterns
• Team ownership keeps colliding
Microservices should be an evolution, not an ideology.
If your modular monolith starts showing these signals, it may be time to move on.
#microservices #softwarearchitecture #backenddevelopment #dotnet #cloudarchitecture
Modular monoliths are great.
In fact, for many systems they are the best place to start.
But there is a turning point.
At scale, everything still ships together. That means small changes from one team can end up waiting behind unrelated work from others.
And sometimes you even get what I call wasteful scaling. One or two modules require more capacity, but because everything is packaged together you end up scaling the entire monolith.
One way to deal with this is not a full migration, but a targeted one.
Extract the modules that have very different deployment cadences or scaling requirements into microservices and leave the rest of the system as a modular monolith.
Often that hybrid approach is enough to restore autonomy and smooth out the release cadence again.
#microservices #softwarearchitecture #dotnet #cloudarchitecture #backenddevelopment
Turning a ball of mud into a modular monolith doesn’t require a massive rewrite.
In many cases, you can evolve the architecture step by step.
In this video I walk through 4 repeatable steps to bring structure back into a chaotic monolith and start rebuilding proper module boundaries.
Small changes. Big architectural impact.
If you build backend systems with .NET or AWS, follow me for more content like this.
#microservices #softwarearchitecture #systemdesign #backenddevelopment #dotnet
Most monoliths don’t suddenly collapse into chaos.
They start clean.
But over time:
• shortcuts accumulate
• dependencies point in the wrong direction
• boundaries slowly disappear
Before you know it, fixing one tiny bug means exploring half the codebase.
That’s architectural entropy.
If you notice these signs, it may be time to start thinking about evolving your architecture toward a modular monolith or microservices.
There’s no point waiting for the ball of mud to turn into a swamp monster.
#softwarearchitecture #microservices #monolith #systemdesign #backenddevelopment
Most monoliths fail for a simple reason.
They are not modular.
A modular monolith is not just "one big codebase." It is an architecture built around clear module boundaries, data ownership, and change isolation.
When those rules are followed, a modular monolith gives you the simplicity of a single deployment while keeping the system structured enough to evolve over time.
In this short video, I explain the core rules that make a modular monolith actually work.
#microservices #softwarearchitecture #backenddevelopment #systemdesign #codingmatheus