Who should consider migrating to microservices?

The microservice-based approach produces a type of architecture that has a more spread out and unit-focused philosophy than a traditional monolith. Favoring flexibility and scalability, microservices may be the perfect solution for companies that want to quickly bring their systems to the next level. Granted one size does not fit all, so it’s good to keep in mind the intended uses and limitations of any strategy.  If a microservices are a good fit, they can become key to a company’s growth when applied correctly.

 

Why you should care about microservices

 

When scaling up, it is crucial to consider how to incorporate additional functionalities into the pre-existing system. The key is to do it in a way that does not overhaul the monolith completely; this is increasingly difficult for more developed systems. With the microservice approach, services can easily be added and removed from the system depending on the current load. This enables more efficient resource allocation management and is a time-efficient solution since multiple teams can work simultaneously on a single software project without stepping on each other’s toes. This leads to faster development and higher overall scalability.

 

One great thing about the microservice architecture is that system migration can begin right away. New functionalities can be built outside the monolith, assuming a good architecture approach is taken so as not to create a distributed monolith in the process. When implemented correctly, microservices allow the addition of new functionalities without having to rebuild the entire system; this makes microservices a low entry barrier solution. Another approach, in lieu of adding new functionalities on top of the pre-existing system, is migrating the system chunk by chunk to microservices.  This approach decomposes the system gradually until it is no longer monolithic and is comprised entirely of separate units. Regardless of the approach selected, immediate benefits are gained such as lower maintenance costs and shorter release cycles.

Independence is the key feature here; each microservice is an autonomous unit and can be treated as a separate piece of software.  Each unit can implement a single domain model for a functional element such as notifications, cart, pricelist, and document generation.  While each microservice can be developed independently, there needs to be loose coupling between the microservices to ensure proper communication within the system. Loosely coupling individual elements enables easier system changes and prevents regression issues in other parts of the application (such as those that may be experienced in monolithic applications).

 

System architecture utilizing independent elements has many advantages.  Since each microservice can be developed and implemented separately, developers always have the option to use the best possible technology for the task at hand. Independence of elements also makes the entire system more resilient. If one function stops working, it doesn’t bring the entire system down with it. This cannot be achieved with traditional architecture.  Additionally, architecture with independent elements enables faster deliveries. Since the system is broken into small microservices, it is much easier to complete development and testing procedures before releasing a new version. This arrangement also makes it easier for multiple teams to work simultaneously to quickly deliver and implement new functionalities and bug fixes.

 

Start-ups scaling up their product – and business in the process

 

Rapidly scaling up their business is a top concern for many start-ups after developing the first version of their product. Scaling up typically requires development of a second version (V2) of their product or system. Choosing the right technology – and architecture – is often the main factor that determines success. Therefore, many companies choose microservices as the architecture base for moving a monolith to V2. A monolith architecture can be an easy way to develop the first version of a product. It requires less effort than other approaches and allows for shorter MVP time-to-market. After establishing that the product is viable in the market, scaling the product effectively and fast becomes critical. More advanced architecture solutions are typically required, and microservices are by far the most effective of them all. They enable more developments in shorter periods of time by allowing different functionalities to be developed separately from one another. Different teams can work concurrently and independently from each other to develop different solutions and add them to the pre-existing monolith. 

 

 A microservice-based system is especially valuable for performance-sensitive online products. When rapidly scaling up an online product, the amount of traffic the system can handle must be considered.  It is important to design the appropriate architecture from the very beginning. Since each microservice scales horizontally with ease, it is simple to increase capabilities for systems getting large traffic either on a regular basis or in spikes. Incorporating microservice-based architecture to extend the functionality of a system is a low entry barrier solution for scalability since it does not require redesign of the entire monolith from the ground up. New solutions can be added on top of existing code and immediate benefits can be gained from the improved performance of new functions. 

 

Business scalability is one of the main things investors look for in start-up companies. A well designed, highly scalable company with ideas based on detailed market research attracts investors and brings capital. A well-rounded product with well-designed scalability potential is a crucial part of every tech business model. At the core of every piece of software is its architecture, which should allow the product to reach its full potential in an easy and seamless way. In many cases, microservices are the best way for start-ups to achieve seamless scalability in their products and overall business models.

 

Mature companies bringing their system to the next level

 

When a company matures, its processes and products become more complex and it gets harder to incorporate new functionalities into existing systems.  This is especially true if the new functions need to be fully integrated with the rest of the system without extensive system downtime. Microservices allow implementation of new functionalities into pre-existing systems without the need for complete overhauls. As a result, customers can immediately benefit from new functionalities added to an old system. Many corporations rely heavily on microservices for their global systems, because millions of global users can immediately utilize new services that are seamlessly incorporated into the core system.

 

After adding new functionalities into an old system, a natural step forward is to migrate the system to microservice-based architecture. This ensures that the “new” system will be more flexible and able to easily incorporate changes as new functionalities and needs emerge. Typically a plan is established for how to migrate the system to microservices chunk by chunk. Part of this plan involves establishing which units need to be migrated first, which can be replaced with new services, and which do not need to be migrated. Before proceeding with migration, a comprehensive system architecture review is needed to make the system microservice-ready. There are some systems for which a full migration to microservices is not possible or desirable. This is especially true for very old systems that haven’t been modernized over the years and are not well understood. Systems with a limited user base are also poor candidates, because it likely does not make economic sense to invest in them. In these cases, it may be reasonable to remove the systems entirely and rebuild them using more modern architecture. However, these systems can still benefit from the addition of microservices to the existing or redesigned system. 

Microservices are versatile, unique, and able to improve almost any system.  They can be used to completely redesign old, bulky systems bit by bit. Alternatively, they can be used to add new units on top of a pre-existing monolith. This distinct set of features is what brought global organizations like Autodesk and Red Cross to use microservices as part of their international strategies. More information about that can be found here.

 

Moving from monolith to microservices – doing it the right way

 

Whenever companies, large or small, decide to move to a microservice-based architecture, there is prep work that needs to be done prior to migration. Before designing the system architecture, the domain needs to be mapped out and its boundaries and shortcomings understood. There is a good chance, especially if the system is overblown, that the system is not comprehensive enough in its current form; a well-performed mapping will make the structure easier to understand. Only after properly mapping the system should the new architecture be designed.  During design, it should be considered whether the monolith will coexist with microservices. If this is the case, the new architecture must be compatible with the monolith so that the two can effectively communicate. 

 

When diving into microservices, take one step at a time. Design a platform and infrastructure required to run the microservices, as they need a more advanced approach for deployment and monitoring. Typically microservices are deployed on container orchestrators like Kubernetes, Docker Swarm or Mesos, which provide flexibility in defining how the services are deployed, run, and monitored. Service mesh frameworks (e.g. Istio, Conduit) can also be used; they allow for configuration settings that are useful for microservice projects.

You can take one of the two paths when starting your microservice journey. 

One of two paths can be taken when starting a microservice journey. An existing monolith can be decomposed chunk by chunk until the entire thing has been migrated into separate microservices.  Alternatively, new functionalities can be added as new microservices on top of a pre-existing monolith. This approach keeps the old system intact and builds a new infrastructure around it. It is the best approach if the current system is bulky or old and not well understood. In such cases, it is desirable to build new functionalities around the monolith.

 

Regardless of which path is taken, it is crucial to establish a communication channel for information exchange between the old monolith and the new microservice system.  This is necessary to ensure the system works properly. The recommended way of doing this is to make the monolith microservice-aware and have it “play nicely” with the new entities. However, this is not always possible and depends on the monolith’s original structure. 

 

First steps are always the hardest, and it is important not to dive head-first when approaching this subject. Let engineering teams learn from their first microservice development, even if it means learning from their mistakes. Allocate additional time to monitor the code, and review the key decisions regarding system design and implementation. This will likely result in a better final system. Often when starting a new project it is necessary to spend more time on things that can be done more quickly in a mature environment. But that does not mean that time is wasted – just that lessons are learned.

Invested time beings to pay off once the architecture and development approach have been tested, validated, and optimized. Subsequent microservices can be built at a much faster pace by applying the established framework. To make the process even more efficient and cost-optimized, many companies decide to bring an external team on board. Often the entire process is offshored to remote/external teams to further optimize the transition. There are countless success stories of this approach for both start-ups and large corporations.