Microservices, or microservices-based architecture, is a software development approach based on a set of modular components or services that communicate with each other to create a larger application. This article explains how microservices architecture works, its advantages and disadvantages, and how it facilitates IT Security management.
Cloud Computing has changed many things in the field of computing. Therefore, it has favored the proliferation of applications based on this microservices architecture. In contrast, monolithic architectures have been relegated to the background for certain applications. In the architecture, small services run in their process and communicate with lightweight mechanisms. The idea is that each of these independent modules is in charge of a specific task or a business objective.
How do microservices work?
Microservices are separate concrete functional units that work together to provide the overall functionality of an application. On the other side of the scale, the monolithic architecture produces applications with no separation between modules, which may be fine for some applications but rigid for many others.
In fact, the microservices can be updated without affecting the availability of the other units and the application as a whole. The operation of these microservices is easy to understand. In this type of architecture, an application is divided into services. As we said, each runs a unique process and, if necessary, manages its database.
A service can perform many tasks, typically generating alerts, managing user authentication, or supporting UI. The advantage of this paradigm for development teams is that each service can be manipulated independently of the others.
This means that development is decentralized and that a change in one service does not have to affect the others unless the mutual interaction is modified somehow. For example, suppose an application shows an incorrect behavior that is the responsibility of a specific service. In that case, it is possible to find the source of the error faster in the first place. Secondly, it is possible to fix that problem, test it and make the necessary modifications without affecting the rest of the services.
Advantages and disadvantages of microservices architecture
Every architecture or model has its advantages and disadvantages. Although microservices accumulate more pros than cons compared to monolithic architectures, it is convenient to be clear about what to expect. As advantages, we could summarize the following:
- Deploying microservices is quick and easy.
- Of course, services are generally less expensive in development time than the monolithic option.
- The independence between services allows changes to be made without anything being affected. Even the application could continue to function, except that the service was deactivated or under maintenance.
- The different services can be reused in other projects at no cost.
- Error handling and fault isolation are considerable, unlike in monolithic architecture.
- A key advantage is that they work well with containers.
On the less positive side, we can highlight the extra effort that must be put into the design phase for communication between services or requires a complex testing process.
Microservices and security
Microservices architecture can improve or solve some security issues with monolithic applications. Thus, security monitoring becomes simpler, on the one hand, because the different parts or modules of an application are isolated.
On the other hand, this monitoring can be complex because there are multiple points to monitor. What is important is that a security flaw can occur in a module that does not affect the operation of the rest of the project.
In this way, microservices architecture offers some resistance against distributed denial of service (DDoS) attacks when used with containers because they minimize the chance of an infrastructure being brought down by excessive server requests. However, there are several pending resolutions, such as:
- the presence of more areas of vulnerability in the network;
- less overall consistency between app updates;
- multiple possible points of attack between ports and APIs;
- The potential lack of control over third-party software.
Read also: avple