Going from monolith to microservices: deciding when and how

Posted in: Business Insights

As the migration of enterprise to the cloud accelerates, the monolithic approach to software development seems doomed to extinction. Cloud-based microservices are increasingly the preferred approach, and it’s easy to see why. Microservices break down large software projects into smaller, more independent units that communicate with each other through simple APIs. And because they’re independent units, microservices allow for more speed, quality and scalability than is possible when teams have to consider the whole of a monolithic architecture. The rise of microservices has empowered the DevOps philosophy, shortening cycle times and boosting innovation.

Yes, cloud-based microservices are here to stay. And sooner or later, it seems, you’ll have to refactor your applications to take advantage of them. But the last thing you want to do is over-engineer for a hypothetical future need. So, where do you go from here?

First, recognize that a great many applications still function quite well in a monolithic environment. But when they stop working so well for your business, you’ll see signals in three main areas:

  1. Velocity

As the demands on monolithic applications ramp up, the ability to deliver new software quickly takes a noticeable hit. Application performance falters and start-up times become longer and longer. Teams cannot develop independently which slows development and reduces efficiency. The complexity of a long-term monolith becomes costly and slows release cycles.

  1. Scaling

There are technical limits and cost efficiencies which, at some point, make scaling a monolithic app too complex and costly. This could be a sign that it’s time to break up the architecture. It might also be the case that one part of your business is growing in ways that call for independent scaling, and that need won’t be addressed easily by a legacy monolith.

  1. Deployment

In a growing enterprise, parts of the system often need to deploy independently of others. Doing so with a monolith application is too slow, restrictive and adds substantial risk.

 

If the above signs seem familiar, what’s your next step? If you’ve decided to break up your applications, you’ll probably be relieved to know that you don’t have to do it all at once. In fact, you shouldn’t. Building a new microservices-based application from scratch (the so-called big-bang rewrite) is risky, stressful and almost certain to fail. A smarter approach is to incrementally refactor each monolithic application, gradually adding functionality in the form of microservices. As you go, you can modify your monolithic app to match the functionality of the microservice. This approach gives you backup from the monolithic application until some future date when it might no longer be needed.

There are a number of tips for re-architecting a monolith. Here are three of the most useful:

  1. Don’t prop up a failing system

If you’re seriously considering microservices, you should avoid any action that will make your monolith bigger. If new functionality is needed, the code should be placed in a microservice instead of being added to the monolith.

  1. Split where it makes sense

You probably can’t eliminate your monolith in one fell swoop, but you can almost certainly reduce its role in your business. You might consider, for example, splitting the presentation layer of your application from its backend of business and data-access logic. This approach allows you to develop, deploy and scale the two components of the application separately, prioritizing rapid iterations on the user interface.

  1. Convert modules one by one

A large monolith might house hundreds of modules, and any of them might be suitable for extraction. Start by converting the easiest ones first. Once you’ve gained some confidence with the process, move on to the modules that promise to offer the most benefit to your business.

It’s been said that nobody starts with microservices. They are something you grow into. Indeed, the greatest success stories in microservices — including eBay, Netflix and Twitter — all began life as monoliths. But if you have the good fortune of needing to scale up for the demands of a growing business, moving to microservices will give you the flexibility and responsiveness to take full advantage of the potential of the cloud.

Are you ready to take advantage of cloud microservices?  Learn how Pythian can help make the move easy and efficient. 

email

Want to talk with a technical expert? Schedule a tech call with our team to get the conversation started.

About the Author

Marketing Product Manager
Krista is an experienced Portfolio Marketing Manager with a demonstrated history of working in the information technology and services industry and supports the Cloud Business Unit at Pythian.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *