Software Engineering UKSoftware Engineering UK
Microservices Architecture: What to Look For
Software Engineering UK

Microservices Architecture: What to Look For

Omar EvansWords by Omar Evans

A professional kitchen can be run by one cook who does everything, or by a brigade in which each station owns a dish; the brigade only pays for itself once the pass is busy enough for the stations to work at the same time, and before that point it is more people, more coordination and more places for an order to go cold.

Microservices architecture is the same trade made in software. The system is a collection of separately deployable services, each with a single business responsibility and its own data, and each reached through a well-defined interface over a network. The trade is real. You buy independent deployment, independent scaling and fault isolation, and you pay in network calls, distributed data and the operational machinery that keeps a fleet of small processes alive.

The useful question is not whether the trade is fashionable. It is whether it is being made on purpose, and whether the people making it can name the forces on both sides. The following compares the three forms a decomposition usually takes and gives each one a value on the attributes that determine whether the trade pays.

Three shapes a decomposition can take

The first is microservices architecture proper: The Azure Architecture Center explains the style as a running system of small, autonomous services, where each is self-contained and implements a single business capability within a defined context. Each service is managed as its own codebase and its own deployment, and each is responsible for persisting its own state.

The second is the modular monolith. It is one deployable artefact, built and released as a unit, whose internals are divided into modules with declared interfaces. The build enforces that all module access occurs through that interface. The Abilian Innovation Lab's review of alternatives argues for it as the default for teams that have not yet earned the cost of distribution.

The third is surgical extraction, sometimes called a hybrid. Most capabilities stay in one deployable and a small number move into services where a specific force demands it, such as a workload with a different scaling profile or a component that has to fail without taking the rest down. Abilian says this is paying the microservice tax only where the return is clear.

Five attributes separate these three, and each type takes a value on every one of them.

What makes the constraint real

In a microservices architecture the separation is physical. A service cannot reach into another service's memory, so the only way in is the published interface, and the internal implementation stays hidden. Microsoft's guidance is direct about this: services communicate through well-designed APIs that model the domain, while shared schemas and shared libraries are coupling. The weakness is that no tool verifies the contract until a consumer fails, which is why contract tests and versioning discipline are so important.

In a modular monolith, the separation must be created because the language will readily let one module call another. ti8m's account of the pattern explains an automatic check that fails the build when a module accesses another module's internals, with Spring Modulith and ArchUnit doing that job in Java. That check is what makes the architecture real. Without it you have a monolith with folders.

import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.lang.ArchRule;

import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;

@AnalyzeClasses(packages = "com.example.shop")
class ModuleBoundariesTest {

    @ArchTest
    static final ArchRule orders_do_not_read_billing_internals =
        noClasses().that().resideInAPackage("..orders..")
            .should().dependOnClassesThat()
            .resideInAPackage("..billing.internal..");
}

In a surgical extraction both regimes run at once. The architecture test maintains the constraint inside the monolith, the network contract maintains it at the seam, and the seam is the part most likely to be left unguarded because it is new and no one manages it yet.

Who owns the data

A service in a microservices architecture owns its schema. Microsoft is explicit that data storage is private to the service that owns it, and that this decentralisation is what allows services to evolve without negotiating schema changes with strangers. The bill arrives as consistency. Once more than one service writes, you are no longer inside an ACID transaction, and the design has to move towards eventual consistency and patterns such as saga, which Chris Richardson's pattern description sets out as a series of local transactions.

The modular monolith keeps one database and one transaction manager, which is a substantial gift. The discipline is that each module keeps its tables private and that transactions do not span modules, exactly as they would not span services. That constraint has no cost at runtime and saves a great deal of pain later if a module ever needs to leave.

Surgical extraction is the hardest of the three on this attribute. The extracted service and the monolith now both hold an opinion about the same business fact, and someone has to name which one is authoritative and what compensating action runs when one side rejects the other. Teams that skip that conversation end up with two sources of truth and a reconciliation job no one wants to own.

Which parts fail together

Fault isolation is the strongest reason for microservices architecture and the one most often overstated. A failing service does not necessarily take the application down, provided the services upstream of it are built to handle the fault, which is what circuit breakers and asynchronous messaging are for. Google Cloud's overview of the style pairs that resilience assertion with the observability cost: tracing a single request across many independent services requires metrics, logs and traces working together, and idempotency is a design requirement.

In a modular monolith a crash takes the process. A module that leaks memory or spins its own thread pool starves its neighbours, because they share a runtime. You can buy some isolation with bulkheads and separate worker pools, or you can extract the offending module once it has proved it needs its own life.

Surgical extraction gives you partial isolation, which is the honest description. The extracted service fails on its own if it was drawn on a real interface, the core fails as a unit, and the calls between them need the same timeouts and fallbacks you would write between any two services.

What the team has to operate

A microservices architecture multiplies the number of things that can be deployed, versioned and paged on. Microsoft catalogues the supporting components in its explanation of a typical deployment: orchestration, an API gateway, message-oriented middleware, centralised logging, real-time monitoring and distributed tracing. Each of those is a system with its own failure modes and its own on-call rotation.

The modular monolith has one build, one deployment and one version in production at a time, so ti8m treats the lack of a compatibility matrix to reason about between services as a genuine benefit.

Surgical extraction runs two operating models at once, the monolith's pipeline and the service's pipeline, plus whatever coordinates them. This is manageable while the number of extracted services stays small and the seam is well defined, and it becomes a liability when enthusiasm drives extraction.

What a change across an interface requires

In a microservices architecture, a change that spans two services is a coordinated release. The contract has to move without breaking consumers, and Microsoft warns about the coupling that comes from chatty interfaces and rigid protocols. Richardson points out the risk directly: tight design-time coupling forces services to change in lockstep, which quietly removes the autonomy the architecture was bought for.

In a modular monolith the same change is a refactor in one repository, compiled and tested together, and the interface changes in a single commit. The Abilian review treats this as the reason to avoid premature distribution, because the modular structure gives most of the design benefit while the change stays cheap.

Surgical extraction places the cheap case and the expensive case in the same system. Changes inside the monolith are ordinary refactors, and changes at the seam are cross-team releases. That asymmetry should drive where you draw the seam, and it argues for drawing it where the business rule changes least often.

The same three shapes against the same attributes

Attribute Microservices architecture Modular monolith Surgical extraction
Boundary enforcement Process and network contract Build-time architecture test Both, with an unguarded seam
Data ownership Private schema per service One schema, private tables per module Split ownership, hardest at the seam
Failure containment Per service, if consumers handle faults Whole process Per extracted service, core as a unit
Deployment unit One per service One for everything One for the core, one per extracted service
Change across a boundary Versioned contract and coordinated release Refactor in one commit Cheap inside, expensive at the seam
Operational load Highest, and it grows with the service count Lowest Between the two, plus coordination

Reading the proposal in front of you

Count the data stores before you count the services. A system with many services and one shared schema is a distributed monolith, and Microsoft's antipattern catalogue shows shared database schemas as a cause of coupling for exactly that reason.

Ask what fails the build when a service threshold is exceeded. If the answer is a folder naming convention and a code review habit, you are looking at a monolith, whatever the diagram says.

Ask what the smallest independently deployable unit is, and whether the team that owns it can release it on a Tuesday afternoon without asking another team for a slot. Richardson's definition relies on independent deployability and team ownership, so a service that needs a coordinated release has already lost the property it was created to provide.

Ask where a transaction crosses a service edge and what compensates when the second half fails. The consistency story is unfinished if no one can identify the compensating action.

Ask who is paged when the extracted service is unhealthy at three in the morning, and whether that individual has the authority to roll it back. An architecture that distributes deployment but centralises authority merely shifts the bottleneck.

These facts do not make microservices architecture a mistake. It makes it conditional. This architecture is worth choosing when the forces pushing towards independent deployment are stronger than the forces pulling towards simple interactions and cheap change, and that weighing is the whole of the decision. What to look for is evidence that someone has done it and can name the specific forces that settled the matter. An architecture is a proposal that specifies them.

Sources