Advantages, disadvantages, limitations of a Microservices architecture

Tram Ho

Over the last few years, Microservices architecture has been a very hot topic in the developer community. It is not difficult to find an article, a report or a presentation on this topic. So what is Microservices ? What are the advantages and disadvantages of Microservices architecture?

1: What is Microservices.

In English, micro means small, micro. So Microservice, as the name implies, is a division of a software block into smaller services, which can be deployed on different servers. Each service will handle each work piece and be connected to each other through different protocols, such as http, SOA, socket, Message queue (Active MQ, Kafka) … to transfer data.

Before Microservices appeared, applications often developed according to the model of Monolithic architecture. This means that all modules (view, business, database) are included in a project, an application developed according to the architecture model of a block usually divided into many modules. But when packaged and installed it becomes a monolithic. The benefit of a monolithic architecture model is that it is easy to develop and deploy. But it also has limitations such as difficulty in maintenance, flexibility and poor scalability, especially for large-scale enterprise applications. That is the reason for the birth of Microservices architecture.

The characteristics of microservice

  • Decoupling – Services in a system are largely separated. So the whole application can easily be built, changed and scaled.
  • Componentization – Microservices are considered independent components that can be easily replaced and upgraded.
  • Business Capabilities – each component of the microservice architecture is very simple and focused on a single task.
  • Autonomy – programmers or groups can work independently together during development.
  • Continous Deliver y – Allows software to be released regularly and continuously.
  • Responsibility .
  • Decentralized Governance – no standardized samples or any technology models. Be free to choose the best useful tools to be able to solve the problem.
  • Agility – microservice supports developing according to Agile model.

2: Advantages.

Microservices architecture was born to overcome the limitations of a block architecture.

  • Independent Development – All services can be easily developed based on individual functions of each service. Can be broken down for independent development.
  • Independent Deployment – Can be deployed individually in any application.
  • Fault Isolation – when an application’s service is not running, the system continues to operate.
  • Mixed Technology Stack – Different languages ​​and technologies can be used to build different services of the same application.
  • Granular Scaling

Microservices architecture helps to simplify the system, subdivide the system into many small services that are easier to manage and deploy in part compared to the monolithic architecture. Clear separation between small services. Allow each service to be developed independently. As well as allowing programmers to freely choose the technology stack for each service they develop. Each service can be deployed independently (Example: Each service can be packaged into a standalone container docker, greatly reducing deployment time). It also allows each service to be independently scaled. Scale can be done easily by increasing the number of instances per service and then loading it with the load balancer.

3: Limited.

Microservices architecture is a trend, but it also has its drawbacks. Microservice encourages small services, but when broken down will lead to small and difficult things to control. Moreover, it is the distributed nature that makes the programmer choose the appropriate communication method when handling requests between services.

Moreover, managing multiple databases, and transactions between services in a distributed system is also a big difficulty. Or when testing a service, you also need to test related services.

Deploying a microservice is also more complex than a single-architecture architecture application, requiring coordination between multiple services, which is not as simple as deploying WAR in a single-architecture architecture application.

In all, Micro-services is one of the hot keywords in the software architecture community and the transition to Micro-services has always been the topic that top software experts are most interested in until now. in.

Currently, applications are often very large and constantly updated, making the Monolith architecture no longer suitable because of the complicated and time-consuming upgrade process, including the huge data management systems and High requirements in management, especially in a field of Finance – Banking and a large bank like Techcombank, is even higher for Microservices in the overall picture of the IT system. On Saturday 19 October 2019 at D’Capitale (Hanoi) Team Techcom Securities will join you in learning about the application of Micro-services when building the Asset Management platform in Fintech at BANKING IN DIGITAL AGE . A challenging field that needs to be conquered in a software system, you are ready to learn with us, Keep a Slot to attend! (Events free of charge)

Viblo

Share the news now

Source : Techtalk