Re-writing monolithic applications to microservices needs very careful planning and execution. Rather going with a Big Bang approach, you must follow a piece meal approach.
You must use Strangler pattern as an over-arching strategy for Modernization. Cross-cutting modules are an ideal choice for initial Modernization, which could be achieved with minimal changes across connecting modules by following ‘Anti-Corruption Layer’.
Follow ‘Domain Driven Design’ to split microservices from monolith. This needs extensive discussion with the business experts and product owners to understand the atomicity of the functionality.
Follow any one of these patterns (‘SAGA’, ’CQRS’, ‘Schema based’ or ‘Database based’) on a scenario and case by case basis to perform Database segregation.
Parallel Run pattern helps us in reducing the turn-around time of Modernization by allowing the service to be executed real time and by comparing the results with the monolith module and deciding accordingly. Reverse Proxy helps in routing the requests between Monolith and Microservices, which can be updated real time.
DevSecOps processes with CI/CD implementation should be followed with test automation, security, and quality consideration at every step. Infrastructure needs to be setup for active monitoring of these services with autoscaling, fault-tolerance and auto-healing capabilities.
Presenting a use case about Modernization of pricing engine for one of the clients in airline domain. The pricing engine has sub-domains like fares, rules, ticketing, routing, journey, subscription, and taxes. The application follows a monolithic architecture and is hosted in-house. In order to improvise the application on factors of reducing turn-around time of feature implementation, increase developer productivity and reduce deployment time, it has been decided to migrate the application to microservices architecture along with DevOps.
The Modernization was planned in multiple phases implementing Strangler pattern. Services are segregated following Single Service Data pattern to scale the domain specific data along with the services, and the data was migrated from DB2 to Redis & Neo4J instances following a segregated database pattern. API Gateway has been implemented to redirect the incoming requests to the microservices which were migrated to the public cloud.
Log Aggregation and trace log of requests/queries is collected through Splunk which is used for observability.
Modernization of application from Monolithic architecture to Microservice architecture requires careful analysis and various considerations as it needs to be done with a piece meal approach to ensure continuity of serviceability. In order to ensure its serviceability, we must invoke multiple patterns on a case-by-case analysis based on their implementation ability.