Successful Migration to Microservices: Why, When, and How

Successful Migration to Microservices: Why, When, and HowArtem Bebik

N-iX

2017-12-18T00:00:00+00:002017-12-18T04:09:59+00:00

When a business application, and hence a development team, gets bigger and reaches a certain size, companies come up against serious management and cooperation bottlenecks. Moreover, if a software product is based on a massive monolith architecture, they face technological challenges as well. In suc...

By Artem Bebik
• December 18, 2017

When a business application, and hence a development team, gets bigger and reaches a certain size, companies come up against serious management and cooperation bottlenecks. Moreover, if a software product is based on a massive monolith architecture, they face technological challenges as well. In such cases, businesses require a solution to fix the workflow and enhance collaboration on the project.

A microservice architecture (MSA) is an answer to the problems associated with the traditional backend monolith, once its complexity calls for higher scalability.

Big tech companies like Netflix, Amazon, and Uber show how migration to microservices has impacted their business. Non-tech companies benefit too. The case of Walmart revitalizing their online presence with microservices may serve an example of the transformative potential of such architecture for traditional enterprises.

According to recent surveys, 80% of companies are counting on microservices and move towards fully microservice architecture. 9% already base their software mostly on the distributed structure, while 38% combine microservices with the traditional monoliths and 33% are planning to switch in the near future.

Source: leanIX

WHY? Microservices role in enterprise software development

Enterprise applications are usually born as monoliths, for example, MVCs. This usual practice seems reasonable since the support is less demanding and the system works for small scope well. So companies have no need to change anything if it’s working.

Microservices take their business-saving role once the system grows too large to be seamlessly maintained as a whole. A common practice is to break the monolith into small autonomous pieces, each deployed and sustained by an agile sub-team. This way you leave team collaboration issues behind.

Microservices benefits and difficulties

Microservices solve many technological and collaboration issues but they are not perfect. Indeed, enterprises adopt this architecture because of distinct advantages crucial for software performance. But the adopters must know what challenges they are going to meet while working with such a system.

Benefits:

Independence of elements. A system can work properly without one or several of its elements.

Scalability. Firstly, with microservice architecture, you can scale a team more easily. Secondly, higher scalability impacts the speed of development. Every sub-team has its own backlog and delivers independently, so they can move development 5 times faster.

Flexibility. If you need to apply or try out new technology, microservices will allow you to incorporate it more easily.

Lower entry barrier. Your development team is growing. So, you decide to switch to microservices to improve the workflow. The benefit works both ways: new specialists get into the microservice architecture faster.

Difficulties:

Distributed system. There are a lot of connections between multiple modules and databases. Therefore, requests, transactions, data management must be handled very carefully.

Testing. The monolith architecture uses the out-of-the-box WAR. A QA specialist just needs to launch the file to confirm the connection of the monolith with the underlying database. Instead, microservices require each service to be verified before starting a test.

WHEN? The right time to migrate to microservice architecture

Microservices were born to respond to the demands of the modern market. Businesses have to analyze their data, innovate, and launch new products and services better and faster than their competitors. They need to be flexible to meet the changing needs of their customers. Migration to microservice architecture enables them to do this more easily.

However, enterprises normally embrace this kind of solution only when the practical need occurs. In most cases, a development team with more than 25 members starts suffering from collaboration difficulties while maintaining the monolith. So the initiative to adopt microservices often comes from the development team or a software vendor.

Migration to microservices will probably be challenging. But it’s worth the effort in the long run.

HOW? Ways to migrate to microservices

How to integrate microservices into the monolith architecture? There are 2 fundamental approaches:

Split a core monolith into microservices.

This way is difficult and pricey. Full replatforming may take up to a year of exhaustive work. Such project will require talented and skillful specialists since microservices are not an ordinary architecture and MSA expertise is hard to come by.

Apparently, no enterprise should adopt such approach if there is no real need. Companies often decide to take such a radical step when the existing online system gets too bulky and doesn’t cope with the load. So they feel the urge to replatform the legacy, out-of-date software.

This is not an easy decision to make as it requires substantial investment and manpower. So if you feel like you need to break up your monolith and build a brand new platform with microservices, make sure you have experienced architects well-versed in the subject.

Keep the monolith and build microservices around it.

Once your initial architecture works just fine, why should you remove it?

When your team is getting too large to maintain the monolith and swiftly add new functionality, the possible way-out is to build new features as microservices. So, newcomers will work as subteams, while the core ~25 developers continue with the monolith. Thus the monolith becomes one big macroservice while you build as many microservices around it as you need.

Even if you are outsourcing software development, such approach is not going to disrupt the work of your team. As a rule, it is easier to hire and onboard new programmers with microservices. In addition, the flexibility of such architecture enhances collaboration and facilitates management of remote teams. For instance, your on-site engineers may work on the monolith and the business logic of your software product, while an outsourced team develops multiple microservices around it.

Nevertheless, the pitfall with this approach is that if you have to reformat your monolith in the future, the process will be a much bigger challenge than going fully microservices at the very beginning. It’s better to think twice and choose a long-term strategy before picking up this option.

Roundup

Real world situations always differ from theory, and the microservices case is not an exception. An enterprise should always consider its own business needs, industry threats, and possibilities before making a decision to migrate to microservices. These two approaches to implementing microservices are just landmarks to guide you through the process. Your business situation is unique and calls for an original solution. However, change is inevitable and you need to be ready to embrace it.

About N-iX

N-iX is an Eastern European provider of software development
services with 900+ expert software engineers onboard that power innovative technology businesses. Since
2002 we have formed strategic partnerships with a variety of global industry leaders
including OpenText, Novell, Lebara, Currency Cloud and over 50 other medium and
large-scale businesses. With delivery centers in Ukraine and Poland, we deliver
excellence in software engineering and deep expertise in a range of verticals
including finance, healthcare, hospitality, telecom, energy and enterprise content
management helping our clients to innovate and implement technology
transformations.