Cluster, distributed, and microservice concept understanding and differences

1. Distributed and clustered

Cluster is a physical form, and distributed is a way of working.
  1. Distributed architecture: multiple subsystems can cooperate with each other to complete business processes, and communication between systems is required.
  2. Cluster: Deploy the same project to multiple servers.
  3.
  Advantages and disadvantages of distributed architecture: Advantages:
    1. Split the modules and use interface communication to reduce the coupling between modules.
    2. Split the project into several sub-projects, and different teams are responsible for different sub-projects.
    3. When adding functions, you only need to add another sub-item and call the interfaces of other systems.
    4. Distributed deployment can be carried out flexibly.
  Disadvantages:
    1. The interaction between systems requires remote communication, and interface development increases the workload.
    2. Each module has some common business logic that cannot be shared.
  Distributed is to split a system into multiple subsystems and distribute them to multiple servers.
  Distributed refers to the distribution of different businesses in different places, while cluster refers to the collection of several servers to achieve the same business . Each distributed node completes different services. Distributed is to shorten the execution time of a single task to improve efficiency, while clusters improve efficiency by increasing the number of tasks executed per unit of time .

2. Microservices and distributed

The concept of microservices is similar to distributed 微服务架构通常是分布式服务架构,反之则未必成立. Choosing microservices usually means solving various problems of distributed architecture.
  Microservice is an architectural style. A large complex software application is composed of one or more microservices. Each microservice in the system can be deployed independently, and each microservice is loosely coupled. Each microservice only focuses on completing one task and completing that task well. In all cases, each task represents a small business capability.
  微服务的意思也就是将模块拆分成一个独立的服务单元通过接口来实现数据的交互. Microservices are designed for 不因为某个模块的升级和BUG影响现有的系统业务. The architecture of distributed and microservices is very similar, but the way of deployment is different. The subtle difference between microservices and distributed is: the application of microservices is not necessarily scattered on multiple servers, it can also be the same server.

3. Microservices and SOA

The concept at the same level as microservices is SOA. SOA (Service Oriented Architecture) is also an architectural style, and both SOA and microservice architecture are a type of distributed architecture.
  SOA is a design method that includes multiple services, and services ultimately provide a series of functions through interdependence. A service usually exists in an operating system process in an independent form. The various services are called through the network.
  Service-oriented architecture (SOA) is a mechanism for integrating multiple larger components (usually applications), which will form a collaborative suite as a whole. Generally speaking, each component will execute a complete piece of business logic from beginning to end, usually including various specific tasks and functions required to complete the overall action. Components are generally loosely coupled, but this is not a requirement of the SOA architecture pattern.
  Microservice architecture is similar to SOA architecture, and microservice is a sublimation of SOA. A key point emphasized by the microservice architecture is "business needs to be completely componentized and service-oriented". The original single business system will be split into multiple small applications that can be independently developed, designed, and run. These small applications complete the interaction and integration through services.
  Summary: Microservice architecture = 80% SOA service architecture ideas + 100% componentized architecture ideas + 80% domain modeling ideas.
  The difference between
    microservices and SOA: 1. SOA:
       component size: large blocks of business logic, coarse-grained.
       Coupling: usually loosely coupled.
       Company structure: applicable to any type of company.
       Management: Focus on central management.
       Goal: to ensure that applications can interoperate.
     2. Microservices:
       component size: individual tasks or small pieces of business logic, fine-grained.
       Coupling: always loosely coupled.
       Company structure: suitable for small, cross-functional teams.
       Management: Focus on decentralized management.
       Goal: implement new functions and quickly expand the development team.

In layman's terms, if going to a big restaurant to eat is a complete business, the chef, the dishwashing aunt, and the waiter in the restaurant are distributed; the chef, the dishwashing aunt and the waiter are more than one person, this is a cluster; the distributed is microservice One form of expression, distributed is the deployment level, and microservices is the design level.

Guess you like

Origin blog.csdn.net/qianzhitu/article/details/108752741