Quick revision
The short answer
We check the benefits by measuring delivery with the DORA metrics per service (deployment frequency, lead time for changes, change failure rate and time to restore) and comparing them with the monolith period, and by looking for distributed monolith signs: services that must deploy together, shared tables, shared domain libraries and chatty synchronous chains. Then we fix the coupling with contract tests, backward-compatible APIs, table ownership and events, improve diagnosis with tracing, correlation ids, dashboards and a service catalogue, and merge services that always change together.
What to remember
In this answer, we measured whether the microservice benefits arrived using DORA metrics compared with the monolith period, identified the distributed monolith signs of coordinated deploys, shared tables, shared domain libraries and synchronous chains, fixed the coupling with contract tests, backward-compatible APIs, table ownership and events, improved diagnosis with tracing, correlation ids, dashboards and a service catalogue, and merged services that always change together.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
We check the benefits by measuring delivery with the DORA metrics per service (deployment frequency, lead time for changes, change failure rate and time to restore) and comparing them with the monolith period, and by looking for distributed monolith signs: services that must deploy together, shared tables, shared domain libraries and chatty synchronous chains. Then we fix the coupling with contract tests, backward-compatible APIs, table ownership and events, improve diagnosis with tracing, correlation ids, dashboards and a service catalogue, and merge services that always change together.
Why this question is asked
When a company deploys less often after moving to microservices than before, the migration has produced the costs without the main benefit. This is common, and it is fixable, but only if we find out which specific coupling is holding things back. Interviewers ask this scenario because it tests whether we can measure an architecture's outcomes rather than its intentions, and whether we know the concrete repairs. In this answer, we will set up the measurements, find the signs of a distributed monolith, fix the coupling, improve diagnosis, and decide where merging is the right answer.
1Measuring Whether the Benefits Arrived
The promised benefit of microservices was faster, safer delivery by independent teams. So we measure delivery, using the four DORA metrics, named after the DevOps Research and Assessment programme that studied them. Deployment frequency: how often each service goes to production. Lead time for changes: time from commit to running in production. Change failure rate: the share of deployments that cause an incident or rollback. Time to restore: how long it takes to recover from a failure.
We compute these per service and per team from the deployment pipeline and incident records, and compare them with the monolith period, which we can usually reconstruct from old pipeline logs. If the monolith shipped twice a week with a two-day lead time and the services now ship together every two weeks with a nine-day lead time, the numbers say clearly that the expected benefit has not arrived.
| Metric | Monolith (last year) | 25 services (now) |
|---|---|---|
| Deployment frequency | 2 per week | 1 coordinated release per 2 weeks |
| Lead time for changes | 2 days | 9 days |
| Change failure rate | 12% | 18% |
| Time to restore | 45 minutes | 3 hours |
2Finding the Distributed Monolith Signs
A distributed monolith is a system split into services that still have to change and deploy together. The question gives three clues, and we check for each systematically. Services that must deploy together: the deployment history shows which services are always released in the same window, and release plans list them in a fixed order. Shared database tables: database audit logs or a scan of the code's queries show which tables are written or read by more than one service. Shared libraries with domain models: a dependency scan finds a common library with entity classes that every service must upgrade together. Chatty synchronous chains: tracing shows requests crossing five or more services one after another.
Each sign explains one part of the symptoms. Coordinated deploys and shared tables explain the slow delivery; synchronous chains and the lack of tracing explain why incidents take three hours to diagnose.
3Fixing the Coupling
For coordinated deploys, the fix is to make APIs backward compatible and prove it with contract tests. Consumer-driven contracts, with tools such as Pact or Spring Cloud Contract, let each consumer state what it relies on, and the provider's build checks those expectations. Once the build proves compatibility, a service can deploy alone, and the release train can be dissolved one service at a time.
For shared tables, we decide one owner per table, move the table into the owner's schema and give other services an API or events. For shared domain libraries, each service gets its own models and we share contracts instead of classes. For synchronous chains, we replace calls for reference data with local copies updated by events, and move side effects, such as notifications, to asynchronous events, where the business can accept eventual consistency.
- Deploy history shows they release togetherorders and pricing, 85% of releases
- Add consumer contract testspricing build checks orders' expectations
- Make the API change backward compatibleadd fields, deprecate later
- Still change together for most tickets?YesMerge them into one serviceNoDeploy independently from now on
4 steps in order. Play them, or step through them one at a time.
4Improving Diagnosis
Incidents take longer because nobody can see a request's path. Distributed tracing with OpenTelemetry, which Spring Boot supports through Micrometer Tracing, gives each request a trace id that travels through every service, so one search in the tracing tool shows the whole call tree with timings. The same id in every log line lets us correlate logs across services.
Beyond tracing, each service needs a standard dashboard (traffic, errors, latency, saturation) and clear ownership recorded in a service catalogue, with the on-call team and runbook links. When an incident starts, the on-call engineer can then find the failing service and its owner in minutes instead of asking around.
5When Fewer Services Are Better
Some pairs will keep changing together even after contract tests, because they are really one capability. For those, merging is the right fix. Fewer services with good boundaries deliver faster than many services with bad ones, and a merge removes a network hop, an API contract and a deployment pipeline at once.
After the changes, we keep measuring the same four metrics quarterly. Success looks like deployment frequency per service rising, lead time falling, and time to restore dropping as tracing and ownership take effect.
6Follow-up questions
Which metric would you show leadership first?
Lead time for changes, compared with the monolith period, because it measures what leadership cares about most: how long it takes for an idea to reach customers. It is also easy to explain and it moves visibly as coupling is removed. I would show deployment frequency next to it, since the two together tell the story, and time to restore if incidents are the main pain.
How do you measure the monolith period if the data is incomplete?
We reconstruct what we can from version control tags, old pipeline logs and incident tickets, and state the uncertainty openly. Even rough numbers, such as releases per month from tags, are enough to see whether delivery got faster or slower.
Should the shared database be fixed before anything else?
Not necessarily first, because it is often the largest piece of work. I would start with contract tests and tracing, which give fast wins, and run the table ownership work in parallel, one table group at a time, starting with tables that cause the most coordinated releases.
7Conclusion
In this answer, we measured whether the microservice benefits arrived using DORA metrics compared with the monolith period, identified the distributed monolith signs of coordinated deploys, shared tables, shared domain libraries and synchronous chains, fixed the coupling with contract tests, backward-compatible APIs, table ownership and events, improved diagnosis with tracing, correlation ids, dashboards and a service catalogue, and merged services that always change together.
Open with
I would start by measuring rather than debating. The benefit microservices were supposed to bring was faster, independent delivery, so I would compute the four DORA metrics per service and team, deployment frequency, lead time for changes, change failure rate and time to restore, and compare them with the monolith period from old pipeline logs.
Then, if they want more
If lead time went from two days to nine, that is clear. Then I would look for distributed monolith signs: services that always deploy together in the release history, tables written or read by several services, a shared library with domain models, and long synchronous call chains in traces. Each explains part of the symptoms.
To fix coupling, I would add consumer-driven contract tests and keep APIs backward compatible so services can deploy alone, give every shared table one owner with an API or events for others, replace shared domain classes with shared contracts, and replace synchronous calls for reference data with events where consistency allows.
For diagnosis, I would add distributed tracing with OpenTelemetry, trace ids in every log line, standard dashboards and a service catalogue with owners and runbooks. Pairs that still change together after that should be merged. If leadership asked which metric to show first, I would pick lead time for changes, compared with the monolith.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Spring Boot 3
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Two years after splitting a monolith into 25 microservices, a company deploys less often...": https://scrivio-interview-library.netlify.app/spring-boot/microservice-design/310f4fef07/