<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Puneet Vyas on Medium]]></title>
        <description><![CDATA[Stories by Puneet Vyas on Medium]]></description>
        <link>https://medium.com/@puneet.vyas?source=rss-788ce10400a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pkGEOFtab-O4GzMt</url>
            <title>Stories by Puneet Vyas on Medium</title>
            <link>https://medium.com/@puneet.vyas?source=rss-788ce10400a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:27:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@puneet.vyas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How To Migrate From Monolithic To Microservices(Part-I)]]></title>
            <link>https://medium.com/@puneet.vyas/how-to-migrate-from-monolithic-to-microservices-part-i-bd0645a7c529?source=rss-788ce10400a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd0645a7c529</guid>
            <category><![CDATA[monolithic]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[migration]]></category>
            <dc:creator><![CDATA[Puneet Vyas]]></dc:creator>
            <pubDate>Thu, 23 Mar 2023 14:22:04 GMT</pubDate>
            <atom:updated>2023-04-03T07:30:23.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*bTmWGKlzxZWxDLv9gAZK6g.jpeg" /></figure><p>This is the first blog in the series of blogs I will write on how to migrate monolithic applications to microservices. I assume you have a basic understanding of Microservices, Monolithic Architecture, and the Cloud.</p><p>in this blog below points will be covered:</p><ol><li>Why Migrate from Monolithic to Microservices?</li><li>Monolithic Architecture</li><li>Microservices Architecture</li><li>When you should transition to microservices</li><li>Steps of Migration</li><li>Conclusion</li></ol><h3><strong>Why Migrate from Monolithic to Microservices?</strong></h3><p>Today’s requirements on modern web applications demand high availability and scalability for which a microservice architecture has shown to be a promising solution. However, building a microservice architecture from scratch is sometimes not possible when monolithic web applications are already in place and cannot be replaced by simply flipping the switch. Instead, it is required to break up this monolith step-by-step into <a href="https://en.wikipedia.org/wiki/Microservices">microservices</a> that represent self-contained components, have their own data management, and are developed, deployed, and maintained ideally by a single team. Consequently, these single services can upscale or downscale on demand and can evolve depending on changing requirements. Another advantage of decomposing the monolith into microservices is to move those new components to cloud environments to achieve the full advantage regarding availability and scalability. In theory, this task of breaking up a monolithic 3-tier application into its microservices sounds easy, but in fact, it is a challenge that various organizations are facing right now.</p><p>For instance, there is uncertainty about:</p><ul><li>how to run the monolith in parallel while developing the microservices.</li><li>the dependency structure within and outside the monolith.</li><li>how a single request walks through the code base.</li><li>possible candidates that could represent a microservice.</li><li>how the monolith would live without it.</li></ul><p>in the end, we want to walk you through the different stages of identifying and extracting a microservice, as well as strangling it around its origin — the monolith. For this purpose, in this blog series, I will provide step-by-step instructions showing the best practices we have identified for migrating a monolith to the microservices.</p><p>Whether you have your monolithic legacy application, or you have built a prototype in a monolithic manner to evaluate the market acceptance of a novel idea, there comes eventually a point where you must decide on a scalable and robust architecture in terms of microservices. Furthermore, to fully exploit the advantages of cloud environments such as auto-scaling and cost-efficiency, cloud-native application architecture is a prerequisite (as shown in the Figure below). Also, in terms of a fast go-to-market and short deployment cycles, monoliths have severe disadvantages compared to microservices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*060xrOpVghr8drLwjMIr-A.png" /></figure><p>Briefly summarized, the three main advantages of a microservice vs. a monolithic architecture are as follows:</p><ul><li><strong>Microservices scale sufficiently</strong>: Cloud platforms — where we finally want to run our microservices — can horizontally scale up or down in seconds and in an auto-scaling manner. This is performed without bothering the application developer about the underlying infrastructure.</li><li><strong>Microservices can be deployed and tested independently</strong>: A well-designed microservice architecture provides the freedom to the developers to deploy and test a new service release without impacting other teams (services).</li><li><strong>Microservices architectures fit with agile development environments</strong>: Breaking up a monolith into microservices often goes along with breaking up a silo-oriented team structure into self-organized and autonomous groups. This brings us back to <a href="https://www.melconway.com/Home/Conways_Law.html">Conway’s Law</a>, which states that: “any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure”.</li><li><strong>Easy to Maintain: </strong>it is easy to move small stones rather than big rocks; So microservices are easy to maintain as compared to big monolithic code.</li></ul><h3>Monolith Architecture</h3><p>Monolithic architecture is the traditional unified model for the design of a software program. Monolithic software is designed to be self-contained; components of the programs are interconnected and interdependent rather than loosely coupled as is the case with modular software programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*-a3uNSGXVUKjDg6INhVXYQ.jpeg" /><figcaption><strong>Monolithic Architecture</strong></figcaption></figure><p>In the monolith pattern, everything from the <strong>user interface, business codes, </strong>and <strong>database calls </strong>is included in the <strong>same codebase</strong>. All application concerns are contained in a <strong>single big deployment</strong>. Even the monolithic applications could be designed in different layers like <strong>presentation, business, </strong>and <strong>data layers </strong>and then deploy that codebase as a single jar/war file.</p><p>There are several benefits that monolith architecture brings. First of all, it’s very convenient to develop a simple application as everything’s in the same language and framework.</p><p>Second, they are easy to test. End-to-end testing can be performed by simply launching the entire application.</p><p>Finally, there’s only one application being released every time something new is added.</p><p>However, all these benefits carry their own difficulties. Deploying the entire application when you only need to make a small change is too complicated and unnecessary.</p><p>When there’s a small bug that only requires the change of only a few lines of code, you need to create a new build for the entire system and deploy it again. This can take days, sometimes even weeks.</p><p>Scaling is an even bigger issue. Scaling just a part of the system is impossible — you have to scale the entire system instead. This makes the creation of innovation much more difficult. Organizations struggle with becoming agile because every action takes too much time and effort.</p><h3>Microservices Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tL-GVqqY5KzF3Zoekr-ICQ.jpeg" /><figcaption><strong>Microservices Architecture</strong></figcaption></figure><p>Microservices is a specialization and implementation approach for service-oriented architectures (SOA) used to build flexible, independently deployable software systems.</p><p>the microservices approach designs applications as a set of small services. Every service is a separate application with its own framework, programming language, and database.</p><p>They are all developed and deployed separately from other services. They communicate through inter-process communication protocols like HTTP, AMQP, or a binary protocol like TCP.</p><p>Complex applications with a large number of components that need to scale require a microservices architecture. Amazon, Netflix, eBay, Uber, Groupon, and SoundCloud, are only some of the worldwide giants that have adopted microservices.</p><p><em>Here are the advantages you’ll get if you migrate to microservices:</em></p><p><strong>Scalability</strong></p><p>As the architecture of microservices is based on small components, scaling is so much easier than in a monolith architecture. This means that when big changes happen in a certain component, the others remain untouched and run correctly. This is a great approach for companies that work on a large number of devices and applications.</p><p><strong>Flexibility</strong></p><p>The microservices approach doesn’t limit developers in terms of tools and technologies. Each service can be built with a different framework and language. That simplifies the selection of the most suitable technology for your service’s specific needs. The fact that components are different doesn’t affect the work of other microservices or the communication between them by no means.</p><p>Moreover, some of the technology-related challenges are easier to solve in some technologies than in others. Microservices don’t limit you when it comes to technology use, unlike monolith architecture where you’re stuck with the same technology during the entire process.</p><p><strong>Increased productivity</strong></p><p>Microservices are easy to develop and this process doesn’t take up too much time. They allow several teams to work on different components of the same app without affecting the work of other services. There’s no need for waiting for one team to finish so that the other can start working.</p><p>Moreover, microservices can be easily moved and modified. This allows testers to test separate services individually and get more done in a shorter period of time, without having to wait for the entire application to be ready.</p><p><strong>Easier communication in distributed teams</strong></p><p>Remote teams can function much easier if they are working with microservices architecture. Developing a monolith system with team members all around the world can be a mission impossible. Microservices give developers the freedom to work independently without having to wait for the entire team to make every decision.</p><p><strong>Maintenance</strong></p><p>Debugging an application has finally become pain-free. Due to the smaller size of microservices, detecting an error and repairing it gets done in no time. Teams have more control over these small instances of code and the probability to deliver error-free applications is larger.</p><p>However, when you have a lot of building blocks, it can be tricky to discover exactly where the problem has arisen. That’s why it’s smart to use monitoring tools that will help you react to problems more efficiently.</p><h3>When should you transition to microservices?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*mWDN4-0b1QTRVT_T08CvRA.png" /><figcaption><strong>When to start the transition</strong></figcaption></figure><p>Once you have made up your mind to embrace microservices, the question is — when should you move to microservices? The right time to migrate a monolithic app to microservices is when your organization is growing and is facing productivity issues.</p><p>With the monolithic system, working on smaller projects is easier. However, larger projects require transitioning to microservices from the monolithic architecture. Also, when you face an issue of disrupted communication between different teams, it is the right time to make a move.</p><p>The most important point to consider is whether your organization is ready for microservices (i.e., ready for a transition from monolith to microservices architecture). Are all departments in your organization aligned as far as the shift to microservices is concerned? You should be able to answer these and other similar questions. Transitioning to microservices in an organization is a change. To bring about this change in an organization you need leadership buy-in. You need the leadership’s willingness to accept this change and embrace it.</p><p>If they are working with monolith architecture, they all have access to the same code base. In this case, the smallest change can disrupt the communication between teams and change the entire application. The need for frequent testing is bigger so that conflicts can be avoided and this slows down the entire release process, reducing the productivity of entire departments.</p><p>Microservices eliminate all these issues. They allow immediate releases, as CI/CD pipelines are easily integrated. Deployments can happen thousands of times a day. At the same time, the application is running as usual, as it consists of many different small components.</p><h3>Steps for Migrating Existing Applications to Microservices</h3><p>In a typical monolithic application, all of the data objects and actions are handled by a single, tightly-knit codebase. Data is typically stored in single database or filesystem. Functions and methods are developed to access the data directly from this storage mechanism, and all business logic is contained within the server codebase and the client application. It is possible to migrate several monolithic applications and/or platforms, each with its own data storage mechanisms, user interfaces, and data schema, into a unified set of microservices that perform the same functions as the original applications under a single user interface. Migrating these applications to microservices offers the following advantages:</p><ul><li>removing duplication of effort for manual entry.</li><li>reducing programmatic development risks.</li><li>providing a single, unified view of the data.</li><li>improving the control and synchronization of these systems.</li></ul><p>There are many strategies to migrate monolith apps to microservices. However, below is a compilation of some practical strategies:</p><ol><li>Make a good transition plan</li><li>Identify all logical modules and most independent modules.</li><li>Identify inter-system relationships.</li><li>Identify groups of modules.</li><li>Prepare an individual service-wise database.</li><li>Never allow migrated service code to again fall in the monolith app.</li><li>Migrate module groups to separate services and make separate deployments.</li><li>You can also break an existing microservice into smaller ones.</li><li>Make use of the event bus to communicate between microservices.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PwMUZ0heQNRzsD15Xf_Qvg.jpeg" /></figure><p>There are mainly two approaches for migrating monolithic apps into microservices.</p><ul><li>Implement new features or functionality in a separate microservice.</li><li>Extract the new microservice from the existing Monolithic code base.</li></ul><p>In this approach, if there is a single monolithic application, new features should be developed in a microservice that contains a separate database and functionality. In this process, if you want any data from the monolithic application, Relative APIs should be built inside the Monolithic App or a new standalone application should be created which will be responsible to just serving the monolithic application.</p><p>It is called glue, which will become a mediator between monolithic and microservices. After this, when the developer has time, they can move the modules from monolithic to the new microservices. After a certain period of time, one can have only microservices without any monolithic application.</p><p>Suppose there is one Food Order and Delivery Management Monolithic application and someone wants to strangle that application into a microservice by extracting some functionality into a microservice, the image below figure shows what a person needs to do when they have to extract some functionality from the monolithic app into microservices:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*Q172SgMTJlyq2WCn0j2eOA.png" /></figure><ol><li>First, Split the code within the Monolithic Application. Meaning, divide the code separately like Order Code and Delivery Code which will be loosely coupled code and reside in same monolithic application</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*JRjO-xtmpaOIUxG7X8VngQ.png" /></figure><p>2. Split the Database and separate the database of the extracted service. Here, one should have to add integration glue. This means that a developer has to create a plan to sync between two databases. It can be managed by Triggers or by Code or by Message Queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LhWpwS1Kw6HcMUFemPN3Vw.png" /></figure><p>3. Define the Separate Service for the Functionality that you want to separate. Here, it is Delivery Management. So, create a separate service for that module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ifPnopa3ZEoYabLBhpiGA.png" /></figure><p>4. Use Extracted Service as a standalone service. This can be achieved by API gateway. So, API gateway will be responsible to accept the required and divert that request to Monolithic app or newly extracted service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUJk-artyrDcxWdzZ-UUDw.png" /></figure><p>5. Now it’s time to remove the delivery management code from existing Monolithic Application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XfgEmcyh9_B5CMLnVHUNvw.png" /></figure><p>By following these steps, one can <strong>migrate a typical monolithic application into a microservice-based</strong> architecture. If you haven’t noticed, having an <strong>ideal monolithic to microservices migration strategy</strong> is crucial. Without it, the cloud migration process could be chaotic.</p><h3>Conclusion</h3><p>Microservices aren’t the perfect solution. Their choice depends on the project and the team structure. Migrating can be a very challenging task for the entire team, so it should be seriously discussed.</p><p>However, the benefits that this system can bring are much more significant on a long-term basis. It brings simplicity, robustness, increased productivity, and easier maintenance. Most importantly, it makes your developers happy and stress-free.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd0645a7c529" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>