Skip to content

The Architecture of Migration: Moving Systems Without Losing Trust

Migration is when systems are most vulnerable, so its architecture must protect trust as much as data. A strangler fig migration from a legacy monolith ran shadow traffic, dual writes with automated reconciliation, gradual traffic shifting, and a final source-of-truth cutover, backed by steady user communication.

01

What problem did this migration solve?

A long-lived monolithic system had reached its operational limits: slow average page loads, long deployment cycles, and a codebase where a change in billing could break user authentication.

The legacy system served a large active user base and processed substantial monthly transaction volume. It had been built by a team that no longer existed, documented in a wiki that had not been updated in years, and deployed through a lengthy manual process spanning multiple servers. The business needed to add new features (multi-currency support, API access for partners, mobile optimization), and the monolith made each of these features a long project because every change risked cascading failures across tightly coupled modules.

The migration was not optional. It was a survival decision. But migration is the moment when systems are most vulnerable. Data loss destroys trust. Downtime costs revenue. Feature regression frustrates users. I needed an architecture that could move the system piece by piece without ever giving users a reason to lose confidence.

02

How was the migration architecture designed?

The migration used the strangler fig pattern with dual-write data synchronization, allowing new and old systems to run simultaneously while traffic was shifted incrementally in phases.

The strangler fig pattern was the foundation. Rather than a big-bang cutover, I placed an API gateway in front of the monolith that could route requests to either the old system or the new services based on feature and user segment. Migration proceeded in phases:

Phase 1: Shadow Mode. New services received copies of production traffic but their responses were discarded. The monolith continued serving all users. This phase validated that the new services could handle production load patterns without risk. I compared response times, error rates, and data consistency between old and new systems during this phase. The new services showed faster response times and matched the monolith’s outputs for nearly all requests. The small discrepancy identified several data conversion bugs that were fixed before any user traffic was affected.

Phase 2: Dual-Write. Both systems received writes. The monolith remained the source of truth. A reconciliation service compared the state of both systems at regular intervals and flagged discrepancies. Over several weeks, the reconciliation service processed a large volume of comparisons and identified discrepancies, all of which were caused by timing differences in asynchronous processing rather than data loss. Each discrepancy was automatically resolved by replaying the event from the monolith’s transaction log.

Phase 3: Traffic Shifting. Production read traffic was gradually shifted from the monolith to the new services in stages, from a small share up to all of it. Each increment was held for a minimum soak period with continuous monitoring before advancing. At the halfway mark, I discovered a pagination bug in the new reporting service that returned duplicate records for a small share of paginated queries. Traffic was held at that level for an additional stretch while the bug was fixed and verified.

Phase 4: Source of Truth Cutover. The new system became the source of truth for writes. The monolith received read-only copies for backward compatibility. The reconciliation service continued running for a period after cutover as a safety net. Zero discrepancies were detected post-cutover.

03

What were the measurable outcomes?

Beyond the technical metrics, user trust was maintained throughout. Customer satisfaction scores (measured via in-app survey) remained close to baseline throughout the migration. Support tickets related to the migration were few, and all were resolved quickly. Zero users reported data loss or inconsistency. The communication plan (weekly status updates, advance notice of any user-visible changes, a dedicated migration FAQ page) contributed as much to the migration’s success as the technical architecture, as I explored in stakeholder communication as information design.

04

What would I change in hindsight?

I would have started the shadow mode phase earlier and invested more in automated rollback for the dual-write phase, which required manual intervention on occasion.

The shadow mode phase revealed bugs that would have been production incidents. More shadow mode time would have caught additional edge cases. I also underestimated the operational complexity of dual-write. When the reconciliation service detected a discrepancy, resolution required manual analysis to determine which system was correct. Automating this resolution (with clear rules for which system wins in each conflict scenario) would have saved a meaningful amount of manual work over the migration. The biggest lesson: migration architecture is not just about moving data. It is about maintaining trust while the ground shifts beneath users’ feet. Every technical decision should be evaluated against that trust criterion. According to the strangler fig pattern’s originator Martin Fowler, the pattern works because it allows incremental replacement without requiring a leap of faith. That incrementalism was the foundation of this migration’s success.