Assessing an over-split microservices estate with data (change coupling, call graphs, ownership, cost and DORA metrics), deciding which services to merge into fewer, team-aligned services or a modular monolith, and executing the consolidation incrementally with stakeholder buy-in.
Start with evidence, not opinions: DORA metrics, the share of PRs touching several services, coordinated releases, incident causes and cost per service. Build a change-coupling graph from git history and a call graph from traces: services that change, deploy and fail together are one thing pretending to be several. Map services to teams: 40 services for six teams means each team runs ~7, which is too much cognitive load and on-call surface. Merge clusters along business capabilities into team-aligned services or modular monoliths with enforced modules, and keep separate only what has a real reason (scaling, availability, compliance, a different team). Do it incrementally, one cluster at a time, behind stable external contracts, and record it in ADRs with measures. The trade-off: fewer deployables means less independence per component, which is fine when teams, not components, are the unit of independence.
"I'd start by treating it as a hypothesis to test, because 'too many services' is a feeling and leadership will want numbers. I'd gather four things over a couple of weeks: DORA metrics per team, the share of pull requests in the last six months that touched more than one service, how many releases needed coordination, and the causes of the last quarter's incidents. Then I'd generate two graphs: a change-coupling graph from git history, which services change in the same week for the same ticket, and a runtime call graph from distributed traces. Clusters that change together, deploy together and call each other synchronously are really one service split across several repos.
For example, at [company] we had [N] services for [M] teams. The data showed [60%] of features touched three or more services, and [one cluster of nine services] always released together. I proposed consolidating that cluster into [two] team-aligned services, each a modular monolith with internal modules enforced by architecture tests, while keeping payments separate because of PCI scope and different availability needs. We did it one cluster at a time: move code into modules first, keep the external routes stable behind the gateway, then merge databases using schemas. Over [two quarters] lead time went from [X] to [Y] and we [retired N pipelines and cut cloud spend by Z%].
I'd present it to leadership as an optimisation of team throughput and cost, not as reversing a mistake, and record it in ADRs with success measures. And I'd put guard rails in so we don't fragment again: criteria for creating a new service, like a different owning team or a genuinely different scaling or compliance need. The mistake I see is either a big-bang 'back to the monolith' rewrite, or doing nothing because merging feels like admitting failure. The unit of independence should be the team, and the number of deployables should follow from that."
| Signal | Source | What it suggests |
|---|---|---|
| Lead time, deployment frequency, change failure rate, time to restore (DORA) | Pipelines, incident tool | Baseline and success measure |
| % PRs/tickets touching ≥2 services | Git history, work items | Boundaries in the wrong place |
| Coordinated releases per month | Release calendar | Distributed monolith |
| Change coupling between services | Commits per ticket or week | Merge candidates |
| Synchronous call depth and chattiness | Traces (application map) | Latency and fragility |
| Services per team, pages per team | Catalogue, on-call tool | Cognitive load |
| Cost per service (compute, databases, pipelines) | Azure Cost Management tags | Fixed overhead of many small services |
| Merge when… | Keep separate when… |
|---|---|
| Same owning team | Different owning teams |
| Change and deploy together | Change independently |
| Chatty synchronous calls between them | Mostly async, few interactions |
| Same scaling and availability profile | Very different load or SLOs |
| No special compliance boundary | Different security or compliance scope (payments, health or identity data) |
| Tiny services with more pipeline than code | Large enough to justify their overhead |
| Shape | Fits |
|---|---|
| Team-aligned service (one per team or capability) | Most clusters |
| Modular monolith per team | Several capabilities, one team, strong internal boundaries |
| Keep as is | Real independence reasons |
Consolidating [40] services into [14] for [6] teams cut coordinated releases from ~8 a month to ~1, lead time from ~9 days to ~3, and Azure spend by ~25% from fewer databases, App Service plans and pipelines, while keeping payments and identity as separate services.
Checks staff-level judgement: using evidence to reshape an architecture to fit the organisation, and executing it safely with buy-in.
Green flags
Red flags
Common causes: splitting by entity or layer, "one service per developer" enthusiasm, copying Netflix-scale architecture with a fraction of the teams, and reorganisations that leave services behind. The result is a distributed monolith: separate deployables, joint releases, and every feature crossing the network several times.
From git history (or work items), count how often two services change for the same ticket or within the same short window.
Catalogue Pricing Stock Promotions Orders Payments
Catalogue - 41 37 29 6 0
Pricing 41 - 33 35 5 1
Stock 37 33 - 12 9 0
Promotions 29 35 12 - 3 0
Orders 6 5 9 3 - 14
Payments 0 1 0 0 14 -
(shared tickets, last 6 months)
The top-left block is one capability (Catalogue) in four pieces. Orders–Payments coupling is moderate and Payments has a compliance reason to stay separate. Tools: git log scripts, CodeScene, or work-item queries.
From traces, list synchronous edges with call counts and latency. Long chains (≥3 hops in a user request) and high call counts between two services both point to merges or to replicating data via events.
Team Topologies' point: a team can only own so much. Six teams with 40 services means ~7 each, each with pipelines, dashboards, dependencies to patch and alerts. Consolidating per team reduces that without reducing team independence.
Step 1: code Step 2: hosting Step 3: data Step 4: clean up
Pricing repo ---> Catalogue host runs pricing schema moves delete old pipeline,
moved as a module both modules; gateway into catalogue DB; infra, alerts; update
inside Catalogue routes /prices to it in-process calls replace catalogue entry
solution (YARP / APIM) HTTP between modules
Principles:
internal types, architecture tests, schema per module. That keeps the option to split again.Frame for leadership: lead time, change failure rate, on-call load and cloud cost. Avoid "microservices were a mistake": the original split may have suited a different organisation. Record in ADRs: context, evidence, decision, consequences and measures. Agree criteria for new services so the estate doesn't drift back.
Merging two services into one host as separate modules, keeping their external routes and an enforced boundary.
// Catalogue host after consolidation: Pricing is a module, not a separate service.
using Catalogue.Module;
using Pricing.Module;
var builder = WebApplication.CreateBuilder(args);
builder.AddCatalogueModule(); // own DbContext on schema "catalogue"
builder.AddPricingModule(); // own DbContext on schema "pricing"; exposes IPricingApi to other modules
var app = builder.Build();
// External routes unchanged, so consumers and the gateway config don't need to change.
app.MapGroup("/products").MapCatalogueEndpoints();
app.MapGroup("/prices").MapPricingEndpoints();
app.Run();
namespace Pricing.Module;
// The module's public surface: an in-process interface replaces the old HTTP client.
public interface IPricingApi
{
Task<decimal?> GetPriceAsync(string sku, CancellationToken ct);
}
internal sealed class PricingApi(PricingDbContext db) : IPricingApi
{
public async Task<decimal?> GetPriceAsync(string sku, CancellationToken ct) =>
await db.Prices.Where(p => p.Sku == sku).Select(p => (decimal?)p.Amount).SingleOrDefaultAsync(ct);
}
// Architecture test: Catalogue may use Pricing's public API only, never its internals or DbContext.
[Fact]
public void Catalogue_uses_only_pricing_public_api()
{
var result = Types.InAssembly(typeof(Catalogue.Module.CatalogueModule).Assembly)
.ShouldNot().HaveDependencyOnAny("Pricing.Module.Data", "Pricing.Module.Domain")
.GetResult();
Assert.True(result.IsSuccessful);
}
internal types and architecture tests.At staff level the question isn't "microservices or monolith" but matching the number of deployables to the organisation. Independence is valuable at the team level; inside a team, a modular monolith gives most of the structure without the network. The hard part is political: presenting consolidation as an evidence-based optimisation, getting product leaders to fund it alongside features, and avoiding blame for past decisions.
| Option | When it fits | Cost | When not to |
|---|---|---|---|
| Keep 40 services, improve tooling | Boundaries are right, pain is tooling | Platform investment | Change coupling is high |
| Consolidate per capability/team | High change coupling, few teams | Migration effort over quarters | Teams genuinely independent already |
| Single modular monolith | 1–3 teams, one product | Loses independent scaling | Many teams, different compliance needs |
| Rewrite | Rarely | Very high risk | Almost always |
Measure before and after: lead time, deployment frequency, change failure rate, coordinated releases, pages per team and cloud cost.
I'd start by asking what problem the mandate is meant to solve: slow delivery, outages, scaling, hiring, or a board-level "modernise" goal. Then I'd gather evidence: DORA metrics, change coupling from git history, incident causes, load data, team structure and cloud cost.
With four teams and no platform team, 15 services in six months would most likely produce a distributed monolith with higher cost and slower delivery. So I'd propose a phased plan tied to their goal: modularise the monolith with enforced boundaries and team ownership, extract one to three services where there's a measured driver, and build platform capability as we go.
I'd record it in an ADR with the alternatives and triggers for further splits, and present it in business terms: risk, cost, time to value.
The trade-off: I'm asking leadership to trade a bold headline for measurable outcomes.
I keep a modular monolith until a module has a measured reason to become its own deployable: it needs to scale independently, it has a different release cadence or owning team, it needs fault or security isolation, or it needs a different runtime. "Microservices are modern" isn't a reason.
The first candidate should have few inbound dependencies, a clean contract and its own schema already. Extraction is incremental: make the module talk only through its contract, stop cross-module joins and transactions, move its data, deploy it as a service, and switch traffic behind a feature flag with a rollback path.
The trade-off: every extracted module turns method calls into network calls, so you gain autonomy and isolation but pay with latency, partial failures and eventual consistency.
Start from business capabilities (ordering, pricing, payments, fulfilment) and bounded contexts, the areas where a word like "Order" has one consistent meaning. A good boundary has one owner for its data and one owning team, and by Conway's law it should match how teams communicate. Test a proposed boundary with real change history and call flows: most features should change one service, and a user request should need few synchronous hops. Wrong boundaries show up as changes that always span services, chatty calls and shared tables. The trade-off: smaller services give more autonomy but more coordination, so start coarse and split when the seam is proven.
How to tell it (STAR)
**S:** At [company] we had [40] microservices for [six] teams, and features routinely needed changes and coordinated releases across several services. **T:** As [staff engineer / architect] I was asked whether our architecture was slowing us down and what to do. **A:** I gathered evidence: DORA metrics, a co-change matrix from git history, call graphs from traces, services and pages per team, and cost per service. It showed a few clusters that always changed together. I proposed merging them into team-aligned services with enforced internal modules, kept payments and identity separate, wrote it up as ADRs with targets, and we did it one cluster at a time without pausing features. **R:** Over [two quarters] coordinated releases fell from [~8] to [~1] a month, lead time from [~9] to [~3] days, and cloud spend by [~25%].
Last updated 23 Nov 2026.