The strangler pattern in practice
The strangler fig pattern takes its name from the tropical plant that gradually envelops and eventually replaces its host tree. In software terms, it means:
- Build alongside: Create new functionality next to the existing system
- Redirect gradually: Route traffic to new components incrementally
- Monitor carefully: Watch for issues and be ready to revert
- Decommission safely: Only remove old code when confident in the replacement
This approach contrasts with "big bang" rewrites, which carry enormous risk. With the strangler pattern, each step is small enough to understand, test, and reverse if necessary.
Database as the integration point
A critical architectural decision was treating the existing database as the system of record throughout the migration. Rather than migrating data to a new structure (which would require complex data migration logic), we kept the database stable and changed only the application layer.
This meant:
- No risky data migrations
- Both old and new systems could coexist
- Gradual validation of new code against production data
- Simple rollback if any new component failed
Performance gains explained
The 50% improvement in page load times came from several factors:
- .NET Core efficiency: The runtime is fundamentally more performant
- Modern caching: Better caching strategies reduced database load
- Async improvements: Better use of asynchronous operations improved throughput
- Hosting optimisation: .NET Core's hosting model is more efficient
Lessons learned
The most important lesson from this migration: patience pays off. The temptation to "just rewrite it" is strong, but incremental migration is almost always safer for a live business system. The strangler pattern required more upfront planning, but delivered a smooth transition with minimal business risk.