09 Mar 2023
by Sabyasachi (Saby) Roy

Microservices are usually the right choice, but not always

Authors:Saby Roy, Partner at EY, James Millen, Senior Manager at EY, Chaimaa Ibnoucheikh, Senior Consultant at EY

There is an increasingly noticeable drive for organisations to migrate their monolithic applications to a microservice based architecture. In many cases this makes sense, but not all cases, and in their rush to do this migration the necessary foundations are not being put in place, which usually leads to high levels of cost and low levels of agility, which are the very issues microservices are supposed to solve.

Monolithic applications are, for the most part, complicated, fragile and difficult to maintain. Nearly every business with applications like this see the risks they pose but, at the same time, these applications are quite often performing critical business functions, so there is an understandable level of fear with the idea of changing them. Leaving them alone leads to fragility and the longer these apps are left untouched, the more fragile they become.

Not every monolithic app is fragile, but there are plenty that are.

Why are Monolithic Apps problematic?

The very nature of them being monolithic means that they cover a lot of ground in terms of functionality, which usually involves a lot of code, all of which should be tested. Making sure all of the different choices, options and possible outcomes are tested is hard to do for a number of reasons.

Unstructured complexity is an unintended consequence of changes made to the source code over time. High levels of this in a code base make it almost impossible to make changes without adding more bugs and problems. Monolithic apps are much more susceptible to this phenomenon.

Introducing new technology can also be very problematic, potentially affecting many functional components, which introduces a lot of risk and expense.

One of the biggest benefits to using Cloud platforms is their ability to scale resources up and down. With monolithic apps, scaling is more of an all or nothing activity, losing a lot of the benefits scaling provides.

Why are Microservices better then Monolithic Applications?

A microservice app should have a small functional footprint which greatly reduces the testing needed, and also increases confidence in the test coverage.

With the focused scope of the functionality of a microservice, the scaling actions are applied only to the functionality that is under load.

The focused functionality of a microservice also reduces the risks associated with change, with other functional areas being part of separate applications.

With each service being independent, they can be written in different languages, leverage different dependent technologies, even different versions of the same technology without risk of conflict.

When Might Monolithic Architecture be the Right Choice?

Latency is an important aspect of many applications and reflects the time it takes for the app to complete tasks. With all the code in one executable, monolithic apps gain a speed advantage over the same functionality distributed across microservices

To successfully run a microservice estate requires a high level of maturity and knowledge across the whole organisation, not just IT. If this is not in place, running a small number of monolithic applications might be a much more realistic undertaking.

Getting the Most out of a Microservice Estate

There are several aspects that need to be in place to ensure the smooth running of any microservice estate. Things like service discovery, stable APIs, comprehensive alerting and monitoring, strong asset and configuration management, and CI/CD are all key to successfully running microservices at any sort of scale.

Following the Microservices architectural pattern brings a lot of benefits, but the right foundations have to be put in place to get maximum benefit

The organisational changes needed to do a good job of running microservices at any sort of scale go beyond just technical and architectural, they require commitment and time to achieve. This should be viewed as a journey, the scale of change needed isn’t something that can be done overnight.

Automation is the key to running microservices successfully. Leveraging automation on the required scale requires investment in tooling, and the skills to be able to use them.

Microservices are usually the right choice, but not always

For most organisations microservices are a good choice, especially if they are moving workloads to a cloud platform. Afterall, microservices enable the ability to leverage much more of the cloud platform’s capabilities.

However, there are situations where microservices are not the right choice, both technically and organisationally. It is important for organisations to carefully assess whether microservices are the right choice for their particular situation and not to assume that they are.

You can read the full article on LinkedIn: https://www.linkedin.com/feed/update/urn:li:activity:6996498818426896384

Authors

Sabyasachi (Saby) Roy

Sabyasachi (Saby) Roy

Partner, Advanced Engineering & Science, UK Financial Services, EY