ARCHITECTURE GUIDE / DECIDE, IMPLEMENT, VERIFY
Incremental Monolith Modernization Guide
Separate the first module around business work. Plan data ownership, temporary connections, acceptance tests and both code and data rollback.
- Published
- Updated
Short answer
Separating a monolith into modules does not require turning every module into a service. Start with the work that needs to change independently, clarify its boundary inside the application, identify the data writer and test a transition with explicit rollback conditions.
When should you keep the monolith?
Releasing related code as one package is not a problem by itself. Identify the actual issue: does a small change affect the whole product, do unrelated tasks share a capacity bottleneck, or is a single query slow? The measurements on the performance and scale page show why a narrow improvement can be assessed before an architectural change.
The order workflow here is a design exercise for tracing the first module boundary and transition decisions. If the decision is still open, start with the rewrite or modernize worksheet. Keeping a modular monolith, extracting a module and building another application are distinct possible outcomes.
How do you define the first module boundary?
Name a business task and its rules, such as order approval, pricing or shipment preparation, rather than proposing a separate database-layer service. Microsoft’s domain analysis guidance also starts service boundaries with business capabilities rather than technical layers. Domain analysis
| Boundary question | Order approval example | Effect on the decision |
|---|---|---|
| What does it deliver? | An accepted or rejected order | Define the output and error contract |
| Which rules remain? | Access, price and stock conditions | Write acceptance tests with the business owner |
| What does it read? | Customer, price and stock records | Reveal reading dependencies |
| What may it change? | Approval status and its audit record | Identify the data writer |
| Who operates it? | The team managing releases and incidents | Assess the cost of a separate service |
You can establish the first boundary as a module inside the application. If independent releases or resource management are needed, test moving it out of process separately. Remote calls introduce network failures and independent operations; moving folders does not resolve these conditions.
How do you preserve data writing ownership?
For each critical record, specify which component may write at each transition stage. Letting both systems update it is not a reconciliation plan. In the order approval example, the old application is the authoritative writer before cutover. A trial copy must not create live approvals or stock changes. At handover, disable the old writing path and agree in advance how new records would be transferred back during rollback.
When saving a database record and notifying another system are separate operations, test failure between them. AWS’s outbox pattern addresses this dual-write problem, including duplicate messages at the consumer. An outbox cannot turn an incorrect business approval into a correct one. Transactional outbox
How do you implement the transition step by step?
- Freeze the reference behaviour. Record approval, rejection, resubmission, cancellation and unauthorised-access examples using the same business data. Include error behaviour in the acceptance set.
- Establish the call boundary. Bring access to the old module behind an explicit contract. Find callers that bypass it, especially batch jobs and stored procedures.
- Test the first module in the same environment. Separate the rule from unrelated work; do not make a runtime or database upgrade a compulsory part of the same change. Check equivalent acceptance outcomes for the same inputs.
- Introduce an adapter if needed. Translate legacy status codes and field meanings into the new model. Keep business decisions out of this temporary layer and record its removal conditions. Microsoft also identifies its latency and maintenance overhead. Anti-Corruption Layer
- Enable controlled routing. Decide which path handles the selected workflow or user group. Shadow comparisons must not repeat payments, email or stock changes. Strangler Fig uses a routing boundary to let old and new functionality coexist. Strangler Fig
- Test data and failures together. Reconcile record identifiers, totals, permissions and transaction order. Examine interrupted connections, delayed notifications and repeated requests. Separate comparison load from live user load.
- Transfer writing ownership. Check in-flight transactions, replication lag and final reconciliation. Disable the conflicting old path when changing the authoritative writer; the operations owner must know which acceptance failure triggers rollback.
- Decide retirement separately. Keep old tables, queues and connections until observation and rollback conditions are met. Removing an unused path remains a change that needs tests and an owner.
Which rollback situations must be distinguished?
| Situation | Rollback work | Result to verify |
|---|---|---|
| No new writes yet | Route traffic to the old path and stop the trial | Previous transaction behaviour and permissions |
| New records exist | Stop new writes, reconcile and apply the planned data transfer | No lost or duplicate business transactions |
| An external effect occurred | Have the business owner correct a payment, notification or shipment | Records agree with actual business state |
| Old components are removed | Restore components and replay the required changes | Recovery duration and data integrity |
Reverting a code package does not undo records created in the new system or shipments already dispatched. Rehearse the point beyond which controlled correction replaces automatic rollback. Set the interruption window from that rehearsal; a pattern name does not guarantee a transition without downtime.
Acceptance checklist for the first module
A separate service or cloud platform can be considered after accepting the first module. If operations, latency, access or continuity conditions are not met, a well-bounded module within the same application may be sufficient. Our application modernization work can cover the first boundary, acceptance examples and transition rehearsal.
VERIFICATION TRAIL
Sources
- Strangler Fig pattern ↗
Microsoft · 2026-10-15 (accessed; rolling documentation)
- Anti-Corruption Layer pattern ↗
Microsoft · 2026-10-15 (accessed; rolling documentation)
- Use domain analysis to model microservices ↗
Microsoft · 2026-10-15 (accessed; rolling documentation)
- Transactional outbox pattern ↗
Amazon Web Services · 2026-10-15 (accessed; rolling documentation)
FOUNDER
Mert Can Balci
- Java / Spring Boot
- Oracle PL/SQL / PostgreSQL
- JavaScript / React / Next.js
Mert Can Balci is a full-stack developer working on airline software and internal business applications. His work spans services, data flows and interfaces using Java, Spring Boot and Oracle PL/SQL. He graduated from the dual-degree programme at Istanbul Technical University and Binghamton University. His modernization work focuses on preserving business rules, data consistency and everyday usability.
Personal website ↗GitHub ↗LinkedIn ↗
Read our approach →