{"id":32472,"date":"2021-03-04T11:57:43","date_gmt":"2021-03-04T10:57:43","guid":{"rendered":"https:\/\/www.intellias.com\/?p=32472"},"modified":"2024-01-18T16:29:14","modified_gmt":"2024-01-18T15:29:14","slug":"platform-migration-strategy-decomposing-a-monolith-to-microservices","status":"publish","type":"post","link":"https:\/\/intellias.com\/refactoring-monolith-to-microservices\/","title":{"rendered":"Platform Migration Strategy: Decomposing a Monolith to Microservices"},"content":{"rendered":"

Business challenge<\/h2>\n

As our client, a European lending marketplace, was experiencing significant growth in demand for their loan brokering solution, they needed to modernize their legacy application to meet the growing business needs and push their product to a new level. Their goal was to refactor the system\u2019s architecture from monolith to microservices without affecting the existing functionality and business logic to ensure an uninterrupted customer service flow.<\/p>\n

As a proven FinTech provider<\/a>, Intellias was already helping this client with building and improving their solution. Naturally, they turned to Intellias for refactoring a monolith to microservices. Modernizing legacy systems and infrastructures for banks, financial institutions, and lending companies<\/a> has long been one of our core competencies at Intellias. Our client\u2019s need for code refactoring and new feature development has launched a new phase of cooperation between our two companies.<\/p>\n

\"Platform<\/p>\n

Solution delivered<\/h2>\n

To implement the monolith to microservices migration, we set up two flexible, cross-functional development teams proficient in refactoring techniques in Agile and working on two separate streams under the supervision of our client\u2019s CTO and chief architect. While our technology team was responsible for refactoring the legacy monolithic application, our business team was building new features in microservices and performing code refactoring according to business needs.<\/p>\n

In the course of our collaboration, Intellias engineers have become an integral part of our client\u2019s organization, making valuable contributions to many aspects of product development and providing on-demand expert consulting<\/a>. We have also built an efficient decision-making process where all stakeholders (tech leads, product owners, delivery and product managers, etc.) interact directly with each other and have a clear understanding of where the project is heading, what the next steps in refactoring monolith to microservices are, and how the project goals will be achieved.<\/p>\n

Within the past three years, our engineering team led by an Intellias delivery manager came up with a number of product and process improvements, including test automation, implementation of CI\/CD practices at the organization-wide level, and development of deliverable strategies for the whole software development lifecycle.<\/p>\n

Another notable improvement suggested and implemented by our team was a new two-step refactoring strategy that enabled painless, risk-free, and fast platform migration. Our first step was to stop adding any functionality to the monolith and develop all new features in microservices. Secondly, we started to gradually extract services from the monolith and migrate all business-critical domains to microservices with every new feature request.<\/p>\n

To efficiently break monolith to microservices, we identified vital areas of code that met 90% to 99% of business needs, verified the relevance of certain features for business processes, and prioritized the functionality to be built. By monitoring the impact of the code in production on our client\u2019s business and using advanced refactoring techniques in Java, one by one we decoupled connections and dependencies in the system and managed to implement new functionality as services in the new architecture. We also migrated business-related data from the old database of the monolith to microservices databases.<\/p>\n

From the technical perspective, we applied blue-green deployment and shadow testing in three phases:<\/p>\n

    \n
  1. Backing up all data and requests for both the monolithic app and microservices<\/li>\n
  2. Switching read and write operations between the monolithic app and microservices, tracking changes, and fixing bugs<\/li>\n
  3. Cleaning up unnecessary code from the monolithic app<\/li>\n<\/ol>\n

    This technique of transforming a monolithic application into microservices allowed our team to single out vital functionality, test it against business needs and requirements, smoothly separate mission-critical business domains, and place them into microservices. The combination of tight, two-way communication between the teams, timely feedback from the client, and well-coordinated work contributed to the overall success of the project.<\/p>\n

    Business outcome<\/h2>\n

    Our collaboration has greatly accelerated digital modernization<\/a> for our client\u2019s company, which was their most pressing need as a result of rapid business expansion. We helped our client move their entire business domain from a monolith to microservices in 1.5 years, resulting in a stable, maintainable, and scalable product. We also managed to keep the system 100% operational throughout the whole refactoring process, preserving business continuity and achieving the ROI cycle in one year.<\/p>\n

    Together with our client\u2019s product teams, we worked out the right operational workflows. This resulted in an optimized, transparent, and predictable development process that includes:<\/p>\n