In this article, we continue our exploration of a broad topic of Migration. Before diving deeply into details, lets first start with an overview of the main strategy options available to us.
When transitioning from a legacy platform to a new stack, there are two main migration strategies to consider: Greenfield and the Strangler Pattern. Here’s a summary:
Strangler Pattern
Gradually dismantle your platform into microservices, replacing them incrementally with individual components. Over time, the monolithic structure will gradually diminish and eventually be phased out.
The strangler pattern is a widely used method for gradually transitioning from a monolithic application to microservices, replacing functionalities piece by piece. In digital commerce, this approach has gained popularity because it minimizes the risk of system disruptions while allowing businesses to benefit from new applications without waiting for the entire solution to be completed.
Beyond just migrating from a monolithic application to microservices, the strangler pattern simplifies complexity with an automated CI/CD (continuous integration and continuous delivery) pipeline for each microservice. This enables faster delivery of business features.
These are the main phases to effectively transition from a legacy monolith platform to microservices:
Development
Transform the application by developing new versions of existing services: Test the new components against the current legacy code.
Co-existence
Allow the new application to co-exist with the old one: Both the legacy and new components should operate in parallel.
Replacement
Eliminate the old components once the new services fully replace the old system.
Once the migration is complete, each microservice will have its own data store and CI/CD pipeline.
Increasingly, businesses are opting for the strangler pattern over the greenfield approach when upgrading their commerce stack. This incremental migration of components reduces risk and establishes a cycle of release, win, learn, and iterate. Additionally, creating minimum viable products (MVPs) helps lay the foundation for the rest of the commerce solution, which can be optimized over time.
Advantages
- Faster delivery of business value, driven by implementation of a particular component.
- High level of control on each step of the migration process, lower disruptions and downtime.
- Flexibility to experiment with different components.
- Enables more flexible specification and planning.
- Reduced risk: If one phase encounters issues, only that phase needs to be rolled back and addressed.
Challenges
- Migration might take longer or face delays due to shifting business priorities.
- Requires the source system to be decoupled so that the new system can gradually take over functionalities.
- Potential for extra effort at each migration stage.
Greenfield
The Greenfield approach is a traditional method of system migration that involves transitioning from the current system to a new one at a single point in time, often referred to as the go-live.
While the strangler pattern is usually recommended, the greenfield approach may be advantageous when dealing with systems that are difficult to break down into smaller components, such as Salesforce or SAP Commerce Cloud. In such cases, building the new system from scratch and then making the switch can be more effective. A common reason for choosing a greenfield approach is when a new initiative cannot be reasonably implemented within the existing stack. Examples include introducing a new product category, pricing strategy, or bundling capability that would be inefficient to develop in systems that are being replaced. Pairing a soft launch of these new features with a select group of customers for final testing can enhance customer satisfaction and address business concerns related to the greenfield approach.
In B2B contexts, a variation of this approach involves launching a full site experience for anonymous customers while completing additional capabilities for existing or contract customers. This can provide benefits such as introducing new capabilities to newer customers, potentially increasing purchase frequency or converting them into contract customers.
Conclusions
Both approaches are valid. When deciding on how to implement your migration initiative, consider the following factors:
- How experienced is your team or your potential service provider with microservices?
- How easily can your current system be divided into smaller components?
- Would (POC) be a good way to proceed to test it with a segment of your buying journey?
To aid in your decision, explore the details of the strangler pattern and greenfield approaches, as well as take into account potential migration starting points.