Before we talk about microservices structures, we should see what a monolithic structure is.
First, the software design and development was performed with the maximum degree of coupling. What does it mean? All functional aspects of the software are structurally coupled, and they are subject to a single program. They are store all development on one server.
This development mode is known as monolithic architecture.
What does a monolithic application entail?
- They are solutions that don’t depend on anything to work (self-sufficient).
- All operations are performed from end to end.
- When they are installed or deployed, it is made as if they were a single piece of software.
The advantages are:
- Autonomy: They are solutions that are characterized as self-sufficient applications. They don’t depend on other applications.
- Performance: Since all performance is made in a local form, it is faster.
- Tests: Having all the same functionality in the same system allows the tests to be easier.
The disadvantages are:
- Tied to a single technology: Like the development is built as a whole under one technology, it doesn’t allow using another available technology.
- Scale: To scale a monolithic application would involve absolutely scaling the entire solution.
- Faults: In general, if it doesn’t have high availability, if the monolithic fails, all systems will fail.
Although the monolithic structures are very easy to create and the best option for desk applications, it is not the most recommended for back-end web applications due to this challenging scalability.
The best design bet for big application development is scalable at service slide (Backend); it’s the microservice’s architecture.
Figure 3: Microservices structure
Microservices is a technique that allows building a Backend application in a decoupled way. The microservice’s idea is that all functional aspects of a software development have a specific task. They are decoupled, and they have the possibility of communicating through the HTTP protocol. It allows each module of a web solution by the Backend side to be hosted on different servers.
It’s right to say that a Microservice is a service. Keep in mind that a service is not a server. What it means is that it is possible to create a solution. It is built by the microservices architecture and all services which can be working on the same server. It allows monitoring each server. If we need to evolve or modify a functionality, it would be in a single service without affecting the others. As well as being able to see, monitor the solution and detect if one or more services is consuming many server resources. If it is detected that a service is consuming a lot of server memory, this service could be moved independently to another server without affecting the solution.
The services are API (acronym of Application Programming Interface) of Web Services. They are application development interfaces that allow exchanging information between a server (software that gives access to a specific service through a URL) and an application.
Microservices advantages are:
- The necessary team for built a microservice is minimum.
- Each microservice (one service) can be built with an independent programming language. It can have its own base data and it can evolve independently without affecting other microservices. That means the services are not characterized by technology if they represent the input and output of information.
- The functionality is modular and independent.
- The developer has the freedom to develop and deploy independently.
- Containers can be used to deploy applications efficiently and quickly.
- Carry out specific tests.
One of the microservices disadvantages are:
- They can consume memory resources.
- The time necessary to define the functionalities and fragment them into services.
- Testing can be cumbersome.
Choosing between Monolithic architecture and Microservices depends on the solution need.
Monolithic architecture is generally for small solutions that contain a small number of users. On the contrary, if the solution is large and there is more than one client, and one or more functionalities serve more than one solution, the microservices architecture is recommended.
- Microservicios | ¿Qué son los microservicios?, Introducción a Microservicios