Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the advantages and disadvantages of microservices?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the advantages and disadvantages of micro-service". The content of the explanation is simple and clear, and it is easy to learn and understand. Let's follow the editor's train of thought to study and learn "what are the advantages and disadvantages of micro-service".

One: single architecture framework

Usually the basic monolithic architecture is divided into three levels, that is, the MVC architecture, the famous SSM and SSH frameworks, which are typical MVC architectures.

Model: data access layer, represented as persistence layer plus database

View: view layer, web page, etc., that interact directly with the user

Controller: logic processing layer, usually an interface and a logic processing class

Shortcoming

Code: all the code is maintained in one project, and long-term development leads to heavy code.

Deployment: deployment is packed into war packages and placed in containers such as Tomcat or Jetty. The resources of a machine are limited, which in disguise limits the availability of the service.

Testing: the addition or modification of business may have an impact on other businesses. Bug occurs frequently, and the difficulty and workload of testing will become greater and greater.

Second: micro-service

In short, the development method of micro-service architecture style is to develop an independent application system by developing a set of small services. Each of these small services runs in its own process and often uses a lightweight mechanism such as HTTP resource API to communicate with each other. These services are built around business functions and can be deployed independently through a fully automated deployment mechanism. These microservices can be written in different languages and can use different data storage technologies. We only do minimal centralized management of these micro-services. "from Martin Fowler, the inventor of the term microservices, the above is a simple translation."

Advantages

Individual micro-services are divided by business

Micro services communicate through http

Microservices can use different storage technologies

Automated deployment of micro services

The registration and discovery of services are managed centrally.

Distributed deployment

Avalanche breaker, service degradation

Shortcoming

Increase development costs: the development of micro-services requires developers to pay more labor costs

Distributed transaction: CAP theoretical equilibrium of distributed transaction

Service division: there is usually a certain coupling between businesses. Reasonable division of services is the most important process before development.

Service deployment: as services increase, it becomes more and more difficult to deploy

Thank you for your reading. the above is the content of "what are the advantages and disadvantages of micro-services". After the study of this article, I believe you have a deeper understanding of the advantages and disadvantages of micro-services. the specific use situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report