The basic theory of distributed entry

What is distributed

  A distributed system is a system composed of a group of computing and nodes that communicate through the network and coordinate work in order to complete common tasks. The emergence of distributed systems is to use cheap, ordinary computers to complete calculation and storage tasks that a single computer cannot complete. The purpose is to use more machines to process more data.

  A distributed system is a software system built on the network. First of all, it needs to be clear that only when the processing capacity of a single node cannot meet the increasing computing and storage tasks, and the hardware improvement is not worth the loss, and the application cannot be further optimized, the distributed system will be considered.
  
  With the development of the Internet, the scale of website applications continues to expand, and conventional vertical application architectures can no longer cope with it. Distributed service architecture and mobile computing architecture are imperative. A governance system is urgently needed to ensure the orderly evolution of the architecture.
Insert picture description here
  

Single architecture

  When the website traffic is very small, only one application is needed, and all functions can be deployed together to reduce deployment nodes and costs. At this time, the data access framework used to simplify the workload of adding, deleting, checking and modifying is the key. It is suitable for small websites and small management systems. It is simple and easy to use to deploy all functions into one service.
Disadvantages
1. Performance expansion is more difficult
2. Collaboration Development problem
3. Not conducive to maintenance and upgrades
Insert picture description here

  

Vertical application architecture

  When the number of visits gradually increases, the acceleration caused by the increase of a single application by the machine becomes smaller and smaller, and the application is divided into several unrelated applications to improve efficiency. At this time, the web framework used to accelerate the development of front-end pages is The essential. Separate the business to realize the independent deployment of each module, which reduces the difficulty of maintenance and deployment. The team performs its own duties, which is easier to manage, and the performance expansion is more convenient and more targeted; but the public modules cannot be reused, and the development is wasteful.
Insert picture description here

Distributed service architecture

  When there are more and more vertical applications, the interaction between applications is inevitable. The core business is extracted as an independent service, and a stable service center is gradually formed, so that front-end applications can respond more quickly to changing market demands. At this time, the distributed service framework for improving business reuse and integration is the key
Insert picture description here

Mobile computing architecture

  When there are more and more services, problems such as capacity evaluation and the waste of small service resources gradually appear. At this time, a dispatch center needs to be added to manage the cluster capacity in real time based on access pressure to improve the utilization rate of the cluster. At this time, it is used to improve the machine Utilization of resource scheduling and governance center is the key
Insert picture description here

RPC
What is RPC

  RPC Remote Procedure Call refers to remote procedure call, which is a way of communication between processes. It is an idea rather than a specification. It allows the program to call a procedure or function in another address space without the programmer explicitly coding the details of this remote call. That is, whether programmers call local or remote functions, the calling code written is basically the same.
  Simply speaking, RPC, two servers A and B, one application is deployed on server A, and wants to call the function provided by the application on server B The method, because it is not in a memory space, cannot be called directly, it needs to express the semantics of the call and convey the data of the call through the network. Then why use RPC? It is a requirement that cannot be completed in a process or even a computer by means of local calls, such as communication between different systems, or even communication between different organizations, due to the horizontal expansion of computing power, it needs to be composed of multiple machines. For cluster deployment applications, RPC is to call remote functions like local functions.

RPC principle

Insert picture description here

Dubbo
What is Dubbo

  Apache Dubbo is a high-performance, lightweight, open-source Java RPC framework that provides three core capabilities: interface-oriented remote method invocation, intelligent fault tolerance and load balancing, automatic service registration and discovery of
Insert picture description here
service providers (Provide) : The service provider of the exposed service, when the service provider starts, register the service provided by the registry with the registration center.
Service consumer (Consumer) : call the service consumer of the remote service, and the service consumer subscribes to the registry when it starts. For the service, the service consumer selects a provider to call from the provider address list based on the soft load balancing algorithm. If the call fails, select another
registry : the registry returns to the service provider address list For consumers, if there is a change, the registry will push the change data to the consumer
monitoring center (Monitor) based on the long connection : service consumers and providers, accumulate the number of calls and call time in the memory, and send statistical data every minute at regular intervals To the monitoring center

Guess you like

Origin blog.csdn.net/weixin_45481406/article/details/109585285