You Don't Need Microservices. You Need Boundaries.

The architecture diagram looks excellent. Six services, a message broker, an API gateway. Everything has its own colour. Then someone asks what happens when a customer cancels an order halfway through payment.
Suddenly, the arrows need a meeting.
This is the part of the microservices conversation I find most interesting. We talk about how many pieces a system should have before agreeing on what each piece is responsible for. Moving code into another process feels like progress because you can point at it. Deciding who owns a business rule is less photogenic.
My default would be to get the boundaries right first. Sometimes that leads to microservices. Often it leads to a much better monolith.
What are we actually trying to fix?
Suppose changing a discount rule breaks checkout, editing a customer record affects invoicing, and nobody knows which tables a feature is allowed to update. That is a coupling problem. Giving checkout and invoicing separate repositories does not, by itself, resolve it.
If the new services still reach into each other's tables and must be released together, you have kept the coordination problem and added network failures. The architecture now requires more infrastructure to remain equally confusing.
Martin Fowler's Monolith First makes a useful point: good service boundaries are difficult to identify early, and moving responsibilities between services is harder than moving them inside one application. His argument is experience-based guidance, not proof that every new system must begin as a monolith. I take it as a reason to leave room to learn.
A boundary should change how you work
Consider a hypothetical shop. Pricing decides what a basket costs. Orders records what the customer agreed to buy. Payments tracks attempts to collect the money. These are responsibilities, not a requirement for three servers.
Orders should ask pricing for a quote through an explicit interface, then retain the agreed amount. It should not reconstruct discount logic by rummaging through pricing's internal tables. Payments should expose the state of a payment attempt, rather than invite every caller to interpret a provider's raw response.
That is a useful boundary even when every call is an ordinary function call in one process. It gives you somewhere to put a rule, someone to review changes to it, and a contract you can test.
The enforcement matters. Define allowed imports, keep implementation details private, assign ownership of writes, and check those rules in CI. A folder called billing is a suggestion. A failing dependency check is a constraint. Integration tests still need to prove the modules work together.
This is not a small-project-only idea. In its 2019 account of deconstructing its monolith, Shopify described pursuing stronger modularity without multiplying deployment units. That historical case is useful because it separates two decisions people often bundle together: how code is organised and how it is deployed.
Illustrative shop, not a universal domain model. Responsibility and write ownership can be enforced inside a shared application.
The network sends you a bill
Inside a single database transaction, related writes can succeed or fail together. Across independently managed stores, the same business operation needs a more deliberate story. If payment succeeds but order confirmation fails, which state is authoritative? Can a retry charge twice? What should the customer see while you reconcile it?
An event does not make those questions disappear. It changes when you have to answer them.
AWS's guidance on sagas describes coordinating distributed transactions through local steps and compensating actions, while warning about debugging and implementation complexity. A refund, for example, is a new business operation; it is not a time machine that erases a charge.
There are good reasons to accept this work. But accepting it accidentally, because a module looked large, is an expensive way to learn distributed systems.
Should we just retry the whole checkout?
Not blindly. Use a stable operation identifier, check the existing payment state, and resume or reconcile the incomplete step without collecting again. If the purchase cannot be completed, an appropriate compensating action may be a refund. Handle failures in that action too. The exact policy belongs to the product and payment contract.
When splitting earns its keep
Imagine video processing consuming resources that a checkout request needs. An independently scaled worker or service may give you a genuinely useful isolation boundary. Or imagine a mature capability with a dedicated team whose releases are repeatedly blocked by unrelated changes. Independent deployment could address a measured delivery problem.
Those are concrete benefits. "We might have millions of users one day" is a prediction, not yet a diagnosis.
Before extracting anything, I would want to name the owner, the data it controls, the compatibility rules, the failure behaviour, and the improvement we expect to measure. I would also want to know whether callers can tolerate the dependency being unavailable. A separate process does not automatically provide failure isolation if every request still waits for it.
Fowler's microservice prerequisites emphasise provisioning, monitoring, rapid deployment, and development-operations collaboration. Those capabilities are valuable for monoliths too. With more independently running pieces, they become harder to do without.
- Know the responsibility
A coherent contract, clear write ownership, and a named owner.
- Design for failure
Timeouts, duplicate delivery, compatibility, and recovery.
- Measure the payoff
Independent scale, safer isolation, or fewer blocked releases.
Try one boundary before twenty services
Pick a responsibility that causes recurring confusion. Give it a small public interface. Stop new callers from bypassing it. Move business rules behind it in manageable changes, and document the invariants that must remain true. Then watch whether ordinary changes become easier to make and safer to review.
Do not disguise a rewrite as preparation for a possible extraction. A module can remain in-process indefinitely and still justify the work. Nor does clean packaging make a later extraction free: data migration, latency, security, and operational ownership still need real engineering.
If you eventually split it out, you should be able to explain the benefit without pointing at the diagram.
The useful question is not "How many services should we have?" It is "What can change here without surprising everyone else?" Get a better answer to that, and the deployment decision usually becomes much less theatrical.