Emre Şahin

Ingeniørjournal

When Microservices Become an Architectural Challenge

How to recognise a distributed monolith, why service boundaries matter more than service count, and how I decide when to merge services back.

Emre Şahin ·

Microservices are usually introduced to solve a real problem: teams blocking each other, parts of a system that need to scale differently, or components with very different reliability requirements. Done well, they give teams independence.

But microservices are not free, and they do not fix unclear boundaries. When the boundaries are wrong, splitting a system into services makes it harder to change, harder to run and harder to reason about. At that point the architecture itself has become the problem.

This post is about recognising that moment and deciding what to do about it.

Boundaries matter more than count

The question I hear most often is "how many services should we have?". I think it is the wrong question. The useful question is "where are the boundaries, and do they match how the system actually changes?".

A good service boundary has a few properties. The service owns its data. It can be deployed without coordinating with others. Most changes to a business capability land inside one service. And the team that owns it can explain what it does in one or two sentences, without listing the services it depends on.

When boundaries follow technical layers instead of business capabilities, these properties disappear. A "validation service", a "notification service" and a "persistence service" might look tidy on a diagram, but almost every feature touches all three. Nothing is independent. Every change becomes a small coordination project.

The distributed monolith

The most common failure mode is what people call a distributed monolith: a system with all the operational cost of microservices and none of the independence.

The smells I look for:

  • Lockstep deployments. Two or more services must be released together, or one breaks. Release notes mention several services for a single feature.
  • Shared database. Several services read and write the same tables. A schema change requires coordinating everyone who touches them.
  • Shared domain libraries with business logic. A common package contains entities and rules, and every service must update it at the same time.
  • Synchronous call chains. A single user request travels through a long chain of services, each waiting for the next.
  • Unclear ownership. When something breaks, nobody is sure which service, or which team, is responsible.
  • Tests only work end to end. No service can be tested meaningfully on its own.

None of these alone proves the architecture is wrong. Together they usually mean the services are one system pretending to be several.

Chatty gRPC

gRPC makes service-to-service calls fast and pleasant to write. That is part of the danger. When a remote call looks like a local method call, it is easy to forget that it is not.

Chatty communication shows up as many small calls to answer one question: fetch a customer, then their settings, then their permissions, then their tenant configuration, each from a different service, often in a loop. Each call adds latency, a failure mode and a retry policy to think about. Tracing views start to look like staircases.

When I see this, I ask a few questions. Is this data really owned by different services, or did we split one concept across several? Could the calling service keep a local, eventually consistent copy of what it needs? Would a single, coarser call that returns what the caller actually needs be more honest about the dependency? Sometimes the answer is a better API. Sometimes it is a sign that the two services should not be separate.

Streaming and real-time systems are a reasonable place for gRPC between services. In the voice AI backend I worked on, gRPC to Python audio services made sense because the boundary was real: different runtimes, different scaling needs, a clear contract. The problem is not gRPC. It is using it to stitch together pieces that were never meant to be apart.

Shared databases

A shared database is the clearest signal that a boundary is not real. If two services write to the same table, they are coupled through the schema whether or not they ever call each other.

There are honest reasons for this to happen: a migration in progress, a reporting need, a deadline. But it should be treated as debt with a plan, not as a stable design. The usual paths out are to give one service ownership and have others go through its API or events, to split the data along a clearer line, or to accept that the two services are really one and merge them.

Operational complexity

Every service adds things that must exist and work: a pipeline, a deployment, configuration, secrets, health checks, dashboards, alerts, logs, a place in the tracing topology, a security review and an owner on call. For a large organisation with platform teams, much of this is automated. For a small team, it is real, recurring work.

I try to make this cost visible in design discussions. A new service should earn its place by giving something back: independent deployment, isolated failure, a different scaling profile, a different security boundary, or clear team ownership. If it gives none of these, it is probably a module, not a service.

The modular monolith as a serious option

A modular monolith is a single deployable unit with strong internal boundaries. Modules own their data, expose explicit interfaces and do not reach into each other's internals. The boundaries are enforced by project structure, access rules and review, not by the network.

It is not a step backwards. It keeps most of the design discipline of microservices and removes much of the operational cost. Calls between modules are in-process, transactions are possible where they are genuinely needed, and refactoring a boundary is a code change rather than a migration.

It also keeps the door open. If a module later needs to scale differently or be owned by a separate team, it can be extracted, and because its boundary was already clean, the extraction is much easier than splitting a tangled codebase.

For a new product, especially one with a small team and an evolving domain, I usually start here.

Merging services back

Merging services feels like admitting a mistake, which is why teams avoid it longer than they should. I think it is better seen as correcting a boundary with information we did not have before.

Signals that a merge is worth considering:

  • The services are always deployed together.
  • They share a database or a domain library with business logic.
  • Most features change both.
  • One team owns both and treats them as one thing.
  • The network call between them is a source of incidents or latency without a corresponding benefit.

The merge itself should be deliberate. I prefer to merge into a modular structure, keeping the old service as a clearly bounded module, so that the logical boundary survives even if the physical one does not. Contracts that external clients rely on stay stable, often behind a gateway such as YARP, while the internals are consolidated.

How I decide

When I review an existing system or design a new one, I go through roughly these questions for each candidate boundary:

  1. Does it own its data? If not, it is not independent.
  2. Can it be deployed alone? If releases are always coordinated, the boundary is not real.
  3. Does it have a reason to be separate? Scaling, failure isolation, security, runtime, or team ownership.
  4. What does it cost to run? Pipeline, monitoring, on-call, security, and the time to understand it.
  5. How does it communicate? Is the coupling synchronous and chatty, or coarse and tolerant of delay?
  6. What happens when it fails? Does the rest of the system degrade gracefully, or does everything stop?

If a boundary fails most of these, I recommend merging it or keeping it as a module. If it passes them, it is a good candidate for a separate service.

I also write the decision down, with the reasoning and the conditions that would make us revisit it. Boundaries are not permanent, and the people who revisit them later deserve to know why they were drawn.

Closing

Microservices are a tool for managing organisational and operational complexity. When they start creating more complexity than they manage, the honest response is to change the architecture, not to add more tooling around it.

The goal was never a specific number of services. It was a system that teams can change safely, operate calmly and understand without a map.