From Monolithic Applications to Microservices: Five Benefits Driving the Shift

June 12, 2017

Microservices – the new rock star of IT – is actually not a recent introduction. The concept has been around for well over a decade, albeit limited to academia. This begs the question – so why the sudden spike in interest in microservices across technology pundits and business users – from CTOs to developers and software architects? The answer lies in the fact that microservices take off from where current integration approaches fail. Designed as a suite of small services, each catering to a particular function, microservices architecture has become an integral part of web, mobile, and internet-of-things (IoT) applications.

microservices

Here we explore the five key benefits that are propelling the move towards microservices.

#1 Accelerate turnaround:

Each microservice is designed to address a single concern. Moreover, the services are partitioned along functional boundaries and deployed inside containers. This means, developers have to deal with less complicated databases and significantly lower dependencies, resulting in higher agility and ease of deployment. Another advantage is that microservices are easier to tweak as well as update – by virtue of a smaller codebase and surface area, they are able to bypass the lengthy test and deployment pipeline.

#2 Improve fault isolation and resolution:

With microservices, developers know exactly where to look for problems. Failure of a single module can be easily isolated and resolved, without the larger applications being affected. In monolithic applications, failure of a single function or component can pull down the entire application. Imagine a mobile gaming application with separate functions handling tasks such as payment, login, player history, winnings amount, and others. If a particular function suddenly starts consuming more memory space and the game is built on monolithic architecture, the entire application will feel the pain, marring the overall customer experience. Even a single line code change in monolithic architectures would require redeployment of the whole application.

#3 Enable on-demand flexibility and scalability:

Consumer demands and preferences change at warp speed today. This means a business might be required to scale a particular service quickly where it sees increased uptake. Take new user registration and existing user login functionalities on an eCommerce portal, for instance. Due to a particularly successful marketing acquisition campaign, the portal may see a temporary surge in new user registrations. If the application is built on microservices architecture, it would be significantly easier for the company to scale that one functionality separately, without having to scale the entire application and waste time and resources. Being lightweight and free from extra features and code baggage, microservices resonate with the need for on-demand flexibility and scaling up or down – a critical business imperative today.

#4 Make change less expensive:  

Traditional service-oriented architectures are typically based on shared infrastructure –if developers have to change implementation details in one service/component, they have to consider the inadvertent side effects it will cause to other services.Shared resources design encapsulates a great deal of physical coupling, where each service shares a monolithic database, an object-relational mapping layer, and other implementation elements. Microservices, on the other hand, strive for integration coupling, without any physical coupling. The result is both – encapsulated behavior as well as ease of operational change. Another advantage is that microservices effectively facilitate use of modern tools and languages, eliminating tie-into a single technology stack. Instead of spending time and resources trying to understand and update code written with older, outdated technology, developers can experiment and replace it with a small, fresh piece of code using next-generation technologies. 

#5 Unleash innovation:

Because microservices make change less expensive, they enable innovation at the scale and agility needed to thrive amidst digital disruption. By enabling change at a granular level, microservices architecture can prove reliable when businesses look to support incremental and controlled change. Take, for instance, Netflix. The company has been leveraging microservices architecture since 2009 – much before it became fashionable. Consequently, it has been able to evolve from a traditional development model with a monolithic DVD-rental application to its current status where hundreds of microservices work in tandem to stream digital entertainment to millions of Netflix customers each day.     

Should every piece of software go the microservices way?

Business looking to identify ideal candidates for microservices should consider software that fails to deliver, rather than just consider the software’s age. If you have a monolithic application that despite being older is able to manage the entire load you throw at it without any hiccups, decomposing it into microservices isn’t likely to deliver any benefits. Assess application reliability and criticality, and then identify components within the application that are best suited to be decomposed into microservices. After all, you want to make the most of your investment and don’t want tens of thousands of microservices, running in a distributed environment.