When do microservices help IT companies?
The architecture of the company influences all business processes. However, this influence is not always positive.
Maksym Prokhorov, founder and managing partner PM PARTNERS
There’s a lot of debate in our community right now about whether to stay on the monolith or go on to microservices, as giant retailers, media and other spheres did. So that you can make the right conclusions, let’s take a look at exactly when it is worth using microservices in IT.
Advantages and disadvantages of micro services
The benefits that microservices bring to the project are enough to start with them:
- Adaptation to project requirements is easier.
- It is possible to develop and test different directions separately, without damaging the general work, which gives more freedom.
- The product can be sold not in full, but in parts.
Individual microservices can be combined into one system and further developed. And in case one of the components fails, the whole system would probably not fall. In some way, it still works.
- You can use different programming languages and different types of protocols to communicate between them.
- Data decentralization.
- Simplification of the division of responsibilities and control of individual phases of the project.
At the same time, microservices have a number of disadvantages. In particular, the project entry threshold becomes higher and maintenance, configuration, and testing of the settings becomes more difficult. It is also more difficult to secure transactions, and there is a risk of inconsistency (which developers should remember).
If you have new team members, they’ll probably need more time to understand how microservices interact.
When should you start thinking about alternatives to monolith?
Here the solution depends on your situation — objectives, needs and stage of development of the project. It is easy to start with a monolith at the beginning, but as the number of tasks increases, it is likely that microservices will become a worthwhile and correct alternative.
I suggest that particular attention should be paid to such aspects as:
- in a monolithic project, the implementation of new function is more expensive than the benefits from it
- it is a very big project that employs many specialists.
The two criteria mentioned clearly indicate that it is time to move to micro services. And it is good if the customer agrees with you. Otherwise, it will be necessary to have a dispute about such a decision. However, you should not be deterred by it, for obvious reasons. These are the ones that need to be explained to the client. In this case, the simplification of the task will be facilitated by the features where the monolith should not be discarded.
Stage for the monolith
The first and very important factor when it is better to use monolith is the need to start a new project quickly. It allows the use of different tools that can be integrated to facilitate development.
Secondly, changes or updates can be deployed immediately rather than separately. Thirdly, at the beginning of the project the monolith can be easily and quickly scaled up, and more specialists can join the monolith development, even if they just arrived at the company.
The disadvantages of using monolith in the long-term development of the project are the following:
- Significant increase in cost when using additional resources.
- Obsolete technologies that are difficult and expensive to update, which can in the future significantly slow down or even stop development altogether.
So, the above arguments, I think, are enough to convince the client to accept your offer, whether it is in favour of monolith or microservices. The important thing is for you to determine exactly which will be the most optimal at this point in time.