How to Replace a Mission-Critical Monolith With the Strangler Pattern and Parallel Runs
A company replaces a mission-critical monolith through the strangler pattern by moving business functions out of the old system one at a time. A routing layer is placed in front of the monolith and sends each request to the old code or to a new service, so the switch happens function by function. A parallel run adds proof. For a period, the old and new versions process the same requests, and the team compares their results before the new version takes over.
These methods are important for systems the business cannot stop, such as order processing, billing, user sign-in or claims. A failed switch on such a system stops revenue and support on the same day, and a full rewrite delivered in one release puts years of work at risk in a single weekend.
Teams usually find good descriptions of each pattern but little help with combining them. Questions like "how long should old and new versions work side by side" or "which differences are acceptable" stay open. That is why we wrote this guide.
It draws on modernization work by the engineering company Zoolatech, including a migration of millions of user accounts that stayed online the whole time. We explain what each pattern does, three ways to compare old and new versions and a seven-step plan with a clear check at the end of every step.
By the end, you will have a plan your team can use to replace a critical monolith without stopping the business.
Quick Summary
- The strangler pattern limits how much changes at once, and the parallel run proves that each change works before users depend on it.
- There are three parallel run modes, called shadow, replay and reverse, and each works best for a different kind of function.
- Write down what must match and which differences are acceptable before the comparison starts.
- Keep the old path available for at least one full business cycle, such as a month-end close.
- Zoolatech and MasterControl moved about 20% of users to a new identity platform in 90 days and more than 60% in six months, with no access issues.
What the Strangler Pattern and the Parallel Run Each Do
The strangler pattern and the parallel run solve different problems, so a safe migration usually needs the two together. The strangler pattern controls the size of each change, and the parallel run controls the proof behind each switch.
Martin Fowler named the strangler fig application after rain forest vines in Queensland that grow around a host tree and slowly replace it. The table compares the two patterns side by side. Read each row to see which question a pattern answers and which risk it removes.
| Pattern | Question it answers | What changes | Main risk it removes |
|---|---|---|---|
| Strangler pattern | How do we replace a large system in small parts? | One business function at a time moves behind a routing layer to a new service | A single release that breaks everything at once |
| Parallel run | How do we know the new part is correct? | Old and new versions process the same requests, and the team compares results | A new service that passes tests and still gives wrong business results |
A team can move functions one by one and still move broken ones, because each move proves nothing by default. A team can also keep 2 systems side by side for months and learn nothing, if nobody compares the results. The plan below combines the patterns so each move comes with proof.
Three Parallel Run Modes and When to Use Each
A parallel run can work in three modes, and the best one depends on what the function does. The mode decides who answers users and what the team compares.
The table describes each mode. Use the "Best for" column to choose a mode for each function you plan to move, and check the last column for the main thing to protect against.
| Mode | Who answers users | What the team compares | Best for | Watch out for |
|---|---|---|---|---|
| Shadow | The old system | Live answers from old and new versions to the same request | Searches, price calculations, eligibility checks | Side effects such as emails or payments from the new version |
| Replay | The old system | Answers to recorded production requests, sent again to the new version later | Functions where copying live traffic is too risky | Stale data if the new version starts from an old database copy |
| Reverse | The new system | Answers from the old version, which still receives copies after the switch | Orders, billing and other functions that change data | Two systems writing the same records |
AWS publishes a reference architecture for replaying parallel requests that shows the replay mode in detail. In that design, recorded requests go to the new service in time order, and any difference from the monolith's recorded answer raises an alarm.
How to Replace a Monolith Step by Step
The seven steps below combine the strangler pattern and the parallel run into one plan. Each step depends on the previous one, so follow them in order and use the "Done when" line to confirm that a step is complete.
Step 1: Map business functions and pick the first slice
A monolith that nobody has mapped hides rules in stored procedures, batch jobs and manual workarounds. Start by listing the business functions the system performs, such as "calculate price", "create order" or "sign in user".
Pick the first slice with these rules:
- Clear inputs and outputs. The function receives defined data and returns a result you can compare.
- Moderate business risk. A mistake would hurt, but it would not stop the company.
- Few hidden links. Other parts of the monolith call it through a small number of entry points.
Avoid the function at the center of every transaction for the first slice. Your team needs one smaller success to test the routing, data sync and comparison before the riskiest move.
Done when: you have a list of business functions, the first slice is chosen and its owner on the business side has agreed.
Step 2: Put a routing layer in front of the monolith
The routing layer is the switch that decides where each request goes. Without it, every client application calls the monolith directly, and you cannot move traffic gradually.
Place an application programming interface (API) gateway or a facade in front of the monolith and send all traffic through it. Add a translation layer between the old and new data models, so the new service does not inherit the monolith's structure.
Done when: all requests for the first slice pass through the routing layer, and you can send any share of them to a new destination with one setting.
Step 3: Build the new service and keep its data in sync
The new service needs current data from the first day it receives requests. Decide which system holds the correct version of each record during the move, and write that decision down.
Copy changes from the monolith's database to the new service with change data capture (CDC). If the application has to write to 2 databases for a period, plan in advance how and when you will remove the second write, because a temporary double write easily becomes permanent.
Done when: the new service has the same data as the monolith, and your team can measure the delay between a change in the monolith and its arrival in the new service.
Step 4: Choose the comparison mode and define what must match
A comparison without written rules ends in endless debate about each difference. Choose a mode from the table above for the slice, then agree on the rules before the first comparison.
Write down three lists:
- Fields that must match exactly. For example, order totals, tax amounts and statuses.
- Differences you accept. For example, timestamps, rounding in the last decimal place or a different order of items in a list.
- Side effects to block. For example, emails, payments and messages to partners that the new version must not send during the comparison.
Done when: business and engineering owners have signed off on the three lists, and the new service cannot trigger any blocked side effect.
Step 5: Compare results and settle every difference
Every difference between old and new results falls into one of three groups. It is a defect in the new service, a defect in the old system that the new one fixed, or an accepted difference that belongs on the list from Step 4.
Review differences every day and track their number over time. A business owner decides on each group, because some differences are correct by design and only the business can confirm that.
Done when: the share of unexplained differences stays under the agreed limit for an agreed period, such as 2 weeks of normal traffic.
Step 6: Move traffic in waves
Moving all traffic at once wastes the work of the previous steps. Move it in waves, such as 1%, 10%, 50% and 100% of requests, or by user group, region or customer type.
Before each wave, confirm that you can send traffic back to the old path with one setting. Keep the comparison active in reverse mode, so the old system still checks the new one after each wave.
Done when: all traffic for the slice goes through the new service, and the error rate and response time stay within the agreed limits for a full wave cycle.
Step 7: Retire the old path for this slice
Old code that nobody uses still costs money and confuses new team members. Keep it available for at least one full business cycle, such as a month-end close or a peak sales week, then remove it.
Remove the routing rule, the old code for the function, the data sync and the old tables that only this function used. Then return to Step 1 and pick the next slice.
Done when: the old code and data for the slice are removed, and the monolith is smaller than it was before the slice started.
Case Study: Moving Millions of Users to a New Identity Platform at MasterControl
Challenge. MasterControl, a provider of cloud quality and manufacturing software for regulated industries, used Okta to sign users in. Costs grew with every new user and every login, rate limits slowed critical operations during traffic peaks, and the third-party platform limited custom compliance workflows. Every customer used the sign-in service every day, so it could not stop for a migration.
What Zoolatech did. A joint team of Zoolatech and MasterControl engineers built ADAPT ID, a company-owned identity platform on Keycloak. During early migrations the team kept Okta multi-factor authentication (MFA) connected to the new platform, so old and new systems worked side by side and users kept signing in without interruption. An automated migration utility moved users in stages, starting with lower-risk groups, and validation steps checked data accuracy across millions of records.
Result. About 20% of users moved within the first 90 days, and more than 60% moved within six months across several regions. Millions of users moved with no access issues, and by late 2025 all new customers went straight to ADAPT ID. Read the full MasterControl identity platform case study.
Final Word
A mission-critical monolith does not have to be replaced in one risky weekend. The strangler pattern breaks the work into slices, the parallel run proves each slice before users depend on it and the waves give the team a way back at every step.
Zoolatech describes how to choose between these and other approaches in its guide to legacy modernization strategy. If your team is planning to replace a critical system, that guide helps you decide which parts to move first.
Questions You May Have
What is the strangler fig pattern?
The strangler fig pattern replaces a legacy system gradually. A routing layer sends requests for each business function to the old system or to a new service, and the team moves functions one at a time until the old system can be switched off.
What is a parallel run in software migration?
A parallel run is a period when the old and new versions of a system process the same requests. The team compares the results and moves users to the new version only after the differences are explained.
How long should a parallel run last?
A parallel run should cover at least one full business cycle, including events like a month-end close or a peak sales day. Many teams also set a minimum such as 2 to 4 weeks of normal traffic with differences under the agreed limit.
Can you use a parallel run for functions that change data?
Yes, with extra care. The team blocks side effects in the new version during the comparison or uses reverse mode, where the new system answers users and the old system keeps processing copies for checking.
Is the strangler pattern better than a full rewrite?
For a mission-critical system, the strangler pattern is usually safer. Each slice delivers value independently, a problem affects only one function and the team can stop or change direction between slices.
What is the difference between the strangler pattern and a modular monolith?
The strangler pattern moves functions out of the monolith into new services. A modular monolith keeps one application and splits its code into separate modules with clear boundaries, which some teams use as a first step before extracting services.