The Starting Constraints
$15M annual GMV, 24/7 operation, two developers who held all institutional knowledge both planning to leave within 6 months. The platform could not be taken offline during a rebuild. Every architectural decision had to preserve business continuity throughout the migration.
The Strangler-Fig Strategy
An nginx proxy sits in front of the legacy system. Routes are served by either the old or new system, controlled entirely by configuration. We start with the simplest, most isolated functionality. The old system handles 100% of traffic on day one and 0% of traffic on the last day of the migration — with no single cutover event.
Migration Sequence
- Months 1–3: New infrastructure. Authentication, user profiles, and static content. Simple, low-risk, allows the team to learn the codebase before touching critical paths.
- Months 4–8: Catalogue and search. New Next.js product pages with Elasticsearch replacing a custom PHP search implementation.
- Months 9–14: Order processing. Six weeks of shadow mode — the new system processes every order in parallel but writes nothing to its database. Outputs compared daily until confidence is sufficient to cut over.
Results
14 months. Zero unplanned downtime incidents. The new system handles 2× previous peak load at 35% lower monthly infrastructure cost. Deployment time: from a 3-hour manual process to 8 minutes via a single CI/CD command.
