41
When it Pays to Choose Microservices
Hi everybody! My name is Victoria. Here at Typeable, I deal with the issues of application architecture, so I couldn't help asking the perennial question: To be or not to be? Specifically, is it worthwhile switching our solutions to microservices or not? To understand this, I've done small research of potential pros and cons. Here are my findings.
Microservices started gaining popularity in 2011-2014, smoothly replacing heavyweight SOA and monolithic solutions, where the architecture obstructed access to the rapidly growing market of cloud applications.
The approach itself evolved at the intersection of technologies out of the competitive need to bring the business to the next level instantaneously. Because of this, the solutions developed avalanche-like and quickly acquired add-ons, patterns, and CI/CD accessories. These reasons are still relevant for the business, and the interest in microservices has not declined over the last decade. At the same time, developing a microservice-based solution is a creative intellectual task for an IT team. It allows trying out state-of-the-art approaches and pinning down the conservatism dragons of previous solutions. That is, the challenge is quite noble.
However, the benefit of giving in to this magic is highly questionable.
Like any other fancy solution, microservices aren't always beneficial. Neither do they give a plaster for all sores.
Nevertheless, let's look into the matter.
The evolution of a typical IT solution can take the following path:
As a rule, the development team starts thinking about the microservices at the stage of startup or monstrous monolith. And maybe, this thought just jumps to the minds on the back of the microservice boom.
If:
then you probably need to think about developing a solution using microservices.
Note that almost in every case it's not the development team who drives the decision-making but the business, and this is important. If microservices don't solve the business tasks, this is a waste of time and money. If the development team or the business itself has no idea of the current and strategic paradigm of the product, this is also a waste of time and money.
For example, interesting findings are provided in the research conducted by Camunda in 2018 among 354 companies in different countries and industries. Though the research revealed that 63% of enterprises support the adoption of microservices or are already adopting them, only 45% explicitly document the business processes. It creates a certain problem for evaluating the influence of microservice architecture on the implementation of these processes. At the same time, companies report that the top reasons for adopting a microservices architecture are: improved scalability of applications (64%), shortened development cycle (60%), support of digital transformation trends and integration with next-generation applications (54%), greater autonomy for development teams (54%); improved application resilience (50%).
However, based on the data provided by O'Reilly that ran a similar survey in 2020 among 1052 companies, 77% of respondents are using microservices and about one-third of respondents have been using them for the last three years. Of course, these two pieces of research cannot be compared, but the increasing popularity of microservices is obvious. Here similar issues were also found: incorrect decomposition and complexity of both the solution itself and the microservices management. Nevertheless, the surveys figuratively show that corporate culture takes the center stage. However, when it comes to the adoption of microservices, it's also an inhibitive factor.
Besides, there are some constraints you should take into account:
Microservices are always associated with a degree of complexity, so if the business has no issues which could be resolved by microservices, don't add them, as the business will not appreciate this.
Alas, if the time to release hasn't been reduced, everything has gone wrong.
Most probably, you need to assess once again the potential sources of the problem:
However, a situation may occur when it seems that something is going wrong but you're not quite sure of this.
To save you the trouble of reading another long text, I'm just placing a picture here with a number of examples.

Here let me finish my post and make brief conclusions on this subject:
And finally. Most teams who have succeeded in using microservices had to rebuild their architecture on multiple occasions and followed the path of sequential monolith breakdown. So keep your head up.
As a final point, I would like to recommend several articles on this topic:
I found these materials interesting and worth noticing.
41