A peer-to-peer network based microservice system

By leveraging a peer-to-peer network-based microservice system and employing consistent hashing and pub/sub service message distribution, the complex configuration of service governance servers and the challenges of load balancing in microservice systems are resolved, achieving simplified configuration and efficient load balancing management.

CN116708538BActive Publication Date: 2026-07-21BEIJING YUECHEN SEMICONDUCTOR TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING YUECHEN SEMICONDUCTOR TECHNOLOGY CO LTD
Filing Date
2023-05-25
Publication Date
2026-07-21

Smart Images

  • Figure CN116708538B_ABST
    Figure CN116708538B_ABST
Patent Text Reader

Abstract

The application discloses a kind of microservice systems based on peer-to-peer network, including microservice module, service governance module and system comprehensive management module.The system uses peer-to-peer network to organize the communication and perception between each node, and uses peer-to-peer network, the organization management, communication, storage of microservice are organized.Service governance node and microservice are joined in peer-to-peer network, using peer-to-peer network interface, the function of peer-to-peer network is called;Service governance node builds several virtual nodes on peer-to-peer network by consistent hash, and microserver is registered after registration by binding service governance node, when client accesses microservice, service query request is sent to service governance node through peer-to-peer network, and service governance node selects appropriate microserver for client according to current situation.The system of the application is based on peer-to-peer network, and service governance can be distributed in peer-to-peer network by consistent hash, and load balancing is easily realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a microservice system in the IT and Internet field that uses a peer-to-peer network to organize communication and awareness between nodes, specifically, to a microservice system based on a peer-to-peer network. Background Technology

[0002] Peer-to-peer (P2P) networking, or peer-to-peer computing network, is a distributed application architecture that distributes tasks and workloads among peers. It represents a network structure or form of peer-to-peer computing at the application layer. The word "peer" in English means "equal party," "partner," or "opposite party." Therefore, literally, P2P can be understood as peer-to-peer computing or peer-to-peer networking. Some domestic media translate P2P as "point-to-point" or "end-to-end," while academia uniformly refers to it as peer-to-peer networking or peer-to-peer computing. It can be defined as follows: network participants share a portion of their hardware resources (processing power, storage capacity, network connectivity, printers, etc.). These shared resources provide services and content through the network, which can be directly accessed by other peer nodes without intermediaries. Participants in this network are both providers (servers) and recipients (clients) of resources, services, and content. In a peer-to-peer (P2P) network environment, multiple interconnected computers are all on equal footing, possessing the same functions without a master-slave distinction. A computer can act as a server, sharing resources for other computers in the network, or as a workstation. Generally, the entire network does not rely on a dedicated centralized server, nor does it have dedicated workstations. Each computer in the network can act as a requester of network services and respond to requests from other computers, providing resources, services, and content. These resources and services typically include: information sharing and exchange, computing resources (such as shared CPU computing power), storage sharing (such as cache and disk space usage), network sharing, and printer sharing. Peer-to-peer networking is a network architecture concept. Its fundamental difference from the currently dominant client / server architecture (the architecture used by the WWW) is that there is no central node (or central server) in the entire network structure. In a P2P structure, each node (peer) typically simultaneously possesses the functions of an information consumer, an information provider, and an information communicator. In terms of computing models, P2P breaks the traditional Client / Server (C / S) model, where every node in the network is equal. Each node acts as a server, providing services to other nodes, while also enjoying the services provided by other nodes.

[0003] Microservices (or microservice architecture) is a cloud-native architectural approach where a single application consists of many loosely coupled and independently deployable smaller components or services. Microservices are a variant of Service-Oriented Architecture (SOA), a software development technique that advocates dividing a single application into a set of small services that coordinate and cooperate to deliver end-value to the user. Each service runs in its own independent process, communicating with each other using lightweight communication mechanisms (typically HTTP-based RESTful APIs). Each service is built around a specific business function and can be independently deployed to production, pre-production, etc. Furthermore, a unified, centralized service management mechanism should be avoided as much as possible; for a specific service, the appropriate language and tools should be chosen to build it based on the context.

[0004] Existing microservice systems use centralized service governance modules to organize and manage microservices. Multiple service governance modules form a management cluster for mutual backup and support for high-volume processing. However, configuring the service governance server in this model is cumbersome, microservices need to know the address of the service governance server in advance, the service governance server is difficult to make plug-and-play, and the load balancing of the service governance server itself needs to be considered separately. Summary of the Invention

[0005] The purpose of this invention is to provide a microservice system based on a peer-to-peer network, which improves upon existing microservice systems by using a peer-to-peer network to organize communication and awareness between nodes and achieve load balancing.

[0006] To achieve the above objectives, this invention provides a microservice system based on a peer-to-peer network. This system includes a microservice module, a service governance module, and a system management module. The microservice module supports the deployment and operation of microservices, and microservice callers can find microservice providers through the business logic of the service governance module. The microservice module contains several microserver nodes running microservices. The service governance module is responsible for the registration and discovery of microservices, and also schedules maintenance, achieving load balancing, proximity access, and traffic control characteristics for microservices. The service governance module contains several service governance nodes. The system management module monitors the operation of the entire service system and starts / stops relevant services in the nodes within the system. The system management module contains several system management nodes. The system uses a peer-to-peer network to organize communication and awareness between nodes, and also uses the peer-to-peer network to organize, manage, communicate, and store microservices.

[0007] In the aforementioned microservice system based on a peer-to-peer network, both the service governance node and the microservices join the peer-to-peer network, use the peer-to-peer network interface, and call the functions of the peer-to-peer network. The service governance node builds several virtual nodes on the peer-to-peer network through consistent hashing. After the microservices come online, they register through the bound service governance node. When a client accesses a microservice, it sends a service query request to the service governance node through the peer-to-peer network. The service governance node selects a suitable microservice for the client based on the current situation.

[0008] In the aforementioned microservice system based on a peer-to-peer network, each microservice publishes its startup status notification within a specific pub / sub group, facilitating awareness by the service governance node and the system management node. Each service governance node also publishes its startup status notification within a specific pub / sub group, enabling awareness by the service governance node, microservers, and the system management node. The system management module, based on the description information of the service governance node and microserver nodes, directly issues configuration and management requests via the peer-to-peer network.

[0009] The aforementioned microservice system based on a peer-to-peer network provides services including: sending messages to a specified ID, storing data in the peer-to-peer network, and implementing data structures on the peer-to-peer network. The data structure includes an implementation of (key, map), which locates a map on the peer-to-peer network using the key and operates on the map.

[0010] The aforementioned microservice system based on a peer-to-peer network utilizes consistent hashing for publishing. The service governance module provides microservice registration, lookup, and scheduling, as well as service status information for use by the upper-layer system management module. The service governance module is organized as follows: service governance nodes publish themselves to the peer-to-peer network using consistent hashing, constructing several virtual nodes. The keyword used in consistent hashing is the node's ID. Each service governance node constructs more than 10 but less than 1000 virtual nodes.

[0011] The aforementioned microservice system based on a peer-to-peer network utilizes a pub / sub service to distribute messages. Information about all service governance nodes, including virtual nodes, is stored in a key / value store within the peer-to-peer network. The key is set as needed, and the value represents all virtual node values ​​of the service governance node. A pub / sub group for service governance node information is established to notify service governance nodes of their entry and exit. All service governance nodes and microservices join this group and subscribe to messages. Once a service governance node joins or leaves the system, a notification is sent to this group. Upon receiving this notification, the microservice updates its service governance node information to facilitate subsequent matching with other service governance nodes and updating liveness notifications.

[0012] In the aforementioned microservice system based on a peer-to-peer network, microservices and service governance nodes are bound together. Each microservice is uniquely directed to the service governance node that manages it. The direction is as follows: the microservice uses its microservice ID and service type to create a hash value. The service governance node whose hash(microservice ID, service type) value is closest to the virtual service governance node ID value becomes the service governance node bound to this microservice.

[0013] In the aforementioned microservice system based on a peer-to-peer network, microservices utilize a peer-to-peer network registration and discovery model. Service registration occurs when a microservice starts up, obtaining its current service governance node information from the peer-to-peer network and then sending a registration request to its bound service governance node via the peer-to-peer network's message sending interface. The service governance node processes the microservice registration request, publishes the registration information to other service governance nodes, and saves the registration information to a unified storage. The system uses the peer-to-peer network as the unified storage. Service discovery occurs when a microservice client requests a microservice. First, the microservice's microserver sends a service search request to the service governance node with the closest hash (microservice ID, service type). The service governance node then sends information about available microservice microservers to the requester based on the requester's location information and the operational status of existing microservers for that service.

[0014] In the aforementioned microservice system based on a peer-to-peer network, when a microservice exits, if it exits normally, it sends an exit notification to the service governance node with the closest hash (microservice ID, service type). The service governance node then cleans up the service information in its local storage and unified storage. After a microservice starts, it sends a heartbeat to its bound service governance node. If it exits abnormally, the bound service governance node is notified and cleans up the node information of the microservice.

[0015] In the aforementioned microservice system based on a peer-to-peer network, the system's comprehensive management module controls the start and stop of service governance nodes and microserver nodes, and issues configuration information. For service governance nodes, their description information is uniformly stored in a key-value store. The comprehensive management service of the system's comprehensive management module accesses this data to obtain the description information of the service governance nodes in the system, and then communicates with these nodes. The system's comprehensive management module also joins the message distribution group of the service governance nodes, subscribes to their online and offline messages, and updates the status of the service governance nodes in a timely manner. For microserver nodes, their description information is stored in the (key, map) of the peer-to-peer network. The system's comprehensive management node, in the mode of managing service governance nodes, perceives their description information and online / offline status.

[0016] The microservice system based on a peer-to-peer network provided by this invention has the following advantages:

[0017] 1. By leveraging peer-to-peer network infrastructure, the configuration of service governance nodes can be simplified. Consistent hashing makes load balancing and node joining / leaving management easy.

[0018] 2. Peer-to-peer network storage can efficiently and easily save information. It can replace traditional databases and simplify development.

[0019] 3. It utilizes the pub / sub service organization of peer-to-peer networks for information distribution. This includes the distribution of service governance node description information and microserver node description information, simplifying the traditional node awareness model. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the functional architecture of the microservice system based on a peer-to-peer network according to the present invention.

[0021] The system comprises: 1. Microservice module; 2. Service governance module; 3. System comprehensive management module. Detailed Implementation

[0022] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0023] This invention provides a microservice system based on a peer-to-peer network, comprising a microservice module 1, a service governance module 2, and a system comprehensive management module 3. The microservice module 1 supports the deployment and operation of microservices, and microservice callers can find microservice providers through the business logic of the service governance module. The microservice module 1 contains several microserver nodes running microservices. The service governance module 2 is responsible for the registration and discovery of microservices, and also schedules maintenance, achieving load balancing, proximity access, and traffic control characteristics of microservices. The service governance module 2 contains several service governance nodes. The system comprehensive management module 3 monitors the operation of the entire service system and starts / stops related services in the nodes of the system. The system comprehensive management module 3 contains several system comprehensive management nodes. The system uses a peer-to-peer network to organize communication and awareness between nodes, and uses the peer-to-peer network to organize, manage, communicate, and store microservices.

[0024] In this system, both the service governance node and the microservices join the peer-to-peer network and use the peer-to-peer network interface to call the functions of the peer-to-peer network. The service governance node builds several virtual nodes on the peer-to-peer network through consistent hashing. After the microservices come online, they register through the bound service governance node. When a client accesses a microservice, it sends a service query request to the service governance node through the peer-to-peer network. The service governance node selects a suitable microservice for the client based on the current situation.

[0025] In this system, microservices publish their startup status notifications in a specific pub / sub group, making it easier for service governance nodes and system management nodes to perceive them; service governance nodes publish their startup status notifications in a specific pub / sub group, making it easier for service governance nodes, microservers, and system management nodes to perceive them; the system management module directly issues configuration and management requests based on the description information of service governance nodes and microserver nodes using a peer-to-peer network.

[0026] The services provided by the peer-to-peer network include: sending messages to a specified ID, storing data in the peer-to-peer network, and implementing data structures on the peer-to-peer network. The data structure includes implementing (key, map), locating a map on the peer-to-peer network using the key, and operating on the map.

[0027] The system uses consistent hashing for publishing; the service governance module provides microservice registration, lookup, and scheduling, as well as service status information for use by the upper-layer system management module; the service governance module is organized as follows: service governance nodes publish themselves to the peer network using consistent hashing, building several virtual nodes; the keyword used in consistent hashing is the node's ID; the number of virtual nodes built by each service governance node is greater than 10 and less than 1000.

[0028] The system uses a peer-to-peer network's pub / sub service to distribute messages. Information about all service governance nodes, including virtual nodes, is stored in a key / value store on the peer-to-peer network. The key is set as needed, and the value is the total virtual node value of the service governance node. A service governance node information pub / sub group is established to notify service governance nodes of their entry and exit. All service governance nodes and microservices join this group and subscribe to messages. Once a service governance node joins or leaves the system, a notification is sent to this group. Upon receiving this notification, the microservice updates its service governance node information to facilitate subsequent matching with other service governance nodes and updating liveness notifications.

[0029] The microservices and service governance nodes in this system are bound together. Each microservice is uniquely directed to the service governance node that manages it. The direction is as follows: the microservice uses the microservice ID and service type to create a hash value. The service governance node whose hash(microservice ID, service type) value is closest to the virtual service governance node ID value becomes the service governance node bound to this microservice.

[0030] The microservices in this system use a peer-to-peer network registration and discovery model. Service registration involves obtaining the current service governance node information from the peer-to-peer network when the microservice starts, and then sending a registration request to the bound service governance node through the peer-to-peer network's message sending interface. The service governance node processes the microservice registration request, publishes the registration information to other service governance nodes, and saves the registration information to a unified storage. The system uses the peer-to-peer network as the unified storage. Service discovery involves the microservice's microserver sending a service search request to the service governance node with the closest hash (microservice ID, service type) when a microservice client requests a microservice. The service governance node then sends the microserver information of available microservices to the requester based on the requester's location information and the operational status of existing microservers for that service.

[0031] In this system, when a microservice exits, if it is a normal exit, it sends an exit notification to the service governance node with the closest hash (microservice ID, service type). The service governance node then cleans up the service information in its local storage and unified storage. After a microservice starts, it sends a heartbeat to the bound service governance node. If it exits abnormally, the bound service governance node will be notified and clean up the node information of the microservice.

[0032] The system's integrated management module controls the start and stop of service governance nodes and microserver nodes, and issues configuration information. For service governance nodes, their description information is uniformly stored in a key-value store. The integrated management service of the system's integrated management module accesses this data to obtain the description information of service governance nodes in the system, and then communicates with these nodes. The system's integrated management module also joins the message distribution group of service governance nodes, subscribes to their online and offline messages, and updates the status of service governance nodes in a timely manner. For microserver nodes, their description information is stored in a (key, map) on the peer-to-peer network. The system's integrated management module perceives their description information and online / offline status in the mode of managing service governance nodes.

[0033] The microservice system based on a peer-to-peer network provided by the present invention will be further described below with reference to embodiments.

[0034] Example 1

[0035] A microservice system based on a peer-to-peer network includes a microservice module 1, a service governance module 2, and a system comprehensive management module 3. See also... Figure 1 As shown.

[0036] Microservice Module 1 supports the deployment and operation of microservices. Microservice callers can find microservice providers through the business logic of the service governance module. Basic calls to microservices can be implemented via RPC (Remote Procedure Call), and their internal communication protocols can be diverse. Microservice Module 1 contains several microserver nodes that run microservices; that is, service nodes.

[0037] Service governance module 2 is responsible for the registration and discovery of microservices, as well as scheduling their maintenance, enabling features such as load balancing, proximity access, and traffic control. In large systems, the service governance module is crucial. Service governance module 2 contains several service governance nodes.

[0038] The System Integrated Management Module 3 can monitor the operation of the entire service system in real time and start / stop related services at nodes within the system. The System Integrated Management Module 3 contains several system integrated management nodes.

[0039] The system uses a peer-to-peer network to organize communication and awareness between nodes, and uses the peer-to-peer network as a whole to organize the management, communication and storage of microservices.

[0040] The microservice system is divided into three parts: 1. Microservices; 2. Service governance; 3. System management.

[0041] In the implementation process of a microservice system, the first step is to establish a basic peer-to-peer network, such as a peer-to-peer network infrastructure like IPFS. This peer-to-peer network service needs to provide the following services:

[0042] 1. A service that sends messages to a specified ID;

[0043] 2. Services that store data in peer-to-peer networks;

[0044] 3. Implement data structures on peer-to-peer networks. Peer-to-peer networks typically provide basic key-value storage, on which more data structures can be implemented for efficient storage.

[0045] For example, implement a (key, map) key mapping, which means that a map can be located on a peer-to-peer network using the key, and the map can be manipulated.

[0046] Key / value storage, also known as key-value pair storage, organizes, indexes, and stores data in key-value pairs. Simply put, it uses keys as indexes to implement data storage, modification, querying, and deletion.

[0047] The system uses consistent hashing for publishing.

[0048] Consistent hashing, or consistent hashing algorithm, is a special type of hashing algorithm designed to solve distributed caching problems and is widely used in distributed systems. When removing or adding a server, this algorithm minimizes changes to the existing mapping between service requests and the servers processing those requests, thus satisfying the requirement of monotonicity as much as possible.

[0049] Service governance primarily provides microservice registration, lookup, and scheduling, as well as service status information for use by upper-level comprehensive management modules.

[0050] The service governance organization method is as follows: service governance nodes publish themselves to the peer network in a consistent hashing manner, and build several virtual nodes; the key used in consistent hashing is the node's ID, such as a 64-bit UUID (uuid, universally unique identifier).

[0051] The number of virtual nodes is based on the machine's performance, which mainly considers the number and frequency of the machine's CPUs, outbound bandwidth, and memory. The calculation of the basic unit number, CPU (Central Processing Unit), bandwidth, and memory involves a weighted calculation, with the CPU having a greater weight.

[0052] Each service governance node constructs a number of virtual nodes greater than 10 and less than 1000. That is, each node typically has anywhere from tens to hundreds of virtual nodes.

[0053] The system uses a peer-to-peer network pub / sub (publish and subscribe) service to distribute messages.

[0054] All service governance node information (including virtual nodes) is stored in a key / value store on the peer-to-peer network. The key can be "service_manager" (service manager), and the specific key can be set as needed. The value is the total number of virtual node values ​​for the service governance node. A pub / sub group for service governance node information is created to notify service governance nodes of their entry and exit. All service governance nodes and microservices join this group and subscribe to messages. Once a service governance node joins or leaves the system, a notification is sent to this group. After the microservices are notified, they update the service governance node information to facilitate subsequent search for service governance integration and update liveness notifications.

[0055] The microservices and service governance nodes in this system are bound together. Each microservice is uniquely directed to the service governance node that manages it. The direction is as follows: the microservice uses the microservice ID and service type to create a hash value. The governance node that is closest to the virtual service governance node ID value of the hash(microservice ID, service type) becomes the bound governance node.

[0056] The microservices in this system use a peer-to-peer network registration and discovery pattern.

[0057] Service registration:

[0058] When a microservice starts, it obtains the current service governance node information from the peer-to-peer network, and then sends a registration request to the bound service governance node through the message sending interface of the peer-to-peer network.

[0059] Generally, service governance nodes process microservice registration requests, publish the registration information to other service governance nodes, and save the registration information to a unified storage. This unified storage can be a database like MySQL or an in-memory database like Redis; preferably, it can be stored in peer-to-peer network storage.

[0060] In other words, the system uses a peer-to-peer network as unified storage. Since most of the nodes in this peer-to-peer network are server nodes, which are stable and reliable, the corresponding peer-to-peer network storage is also very stable and fast.

[0061] Service discovery:

[0062] When a microservice client requests a microservice, the microservice's microserver first sends a service lookup request to the service governance node whose hash (microservice ID, service type) is closest to the requester's. The service governance node then sends information about available microservice servers to the requester, based on the requester's location and the operational status of existing servers for that service.

[0063] Microservice exit:

[0064] If it is a normal exit, an exit notification needs to be sent to the service governance node with the closest hash (microservice ID, service type), and the service governance node will clean up the service information in its local and unified storage.

[0065] After a microservice starts, it sends a heartbeat to the bound service governance node. If it exits abnormally, the bound service governance node can detect this and clean up the node information of the microservice.

[0066] System Comprehensive Management:

[0067] In this system, the system's comprehensive management module controls the start and stop of service governance nodes and microserver nodes, as well as issues configuration information.

[0068] For service governance nodes, their descriptive information is uniformly stored in a key-value store, where the key is "service_manager" (see the description above). The integrated management service accesses this data to obtain the descriptive information of the service governance nodes in the system, and then communicates with these nodes. The integrated management module also joins the service governance message distribution group, subscribing to their online / offline messages to update the status of the governance nodes in a timely manner.

[0069] For microserver nodes (microservice nodes), their description information is stored in the (key, map) of the peer-to-peer network. The system's comprehensive management node perceives their description information and online / offline status in a manner similar to that of the management service governance node.

[0070] In summary, both the service governance node and the microservices in this system join the peer-to-peer network and use the peer-to-peer network interface to call the functions of the peer-to-peer network. The service governance node builds multiple virtual nodes on the peer-to-peer network through consistent hashing. After the microservices come online, they register through the bound service governance node. When a client accesses a microservice, it sends a service query request to the service governance node through the peer-to-peer network, and the service governance node selects a suitable microservice for the client based on the current situation.

[0071] Microservices publish their startup status notifications in a specific pub / sub group, making it easier for service governance nodes and system management nodes to perceive them; service governance nodes publish their startup status notifications in a specific pub / sub group, making it easier for service governance nodes, microservers, and system management nodes to perceive them; the comprehensive management module can directly issue configuration and management requests based on the description information of service governance nodes and microserver nodes, using a peer-to-peer network (directly locating by node ID as a parameter).

[0072] The microservice system based on a peer-to-peer network provided by this invention is a microservice system that uses a peer-to-peer network to organize communication and awareness among various nodes. Based on the peer-to-peer network, service governance services can join the network at any time, forming a cluster with existing service governance servers. Service governance servers can be distributed within the peer-to-peer network through consistent hashing, easily achieving load balancing.

[0073] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A microservice system based on a peer-to-peer network, characterized in that, The system includes a microservices module, a service governance module, and a comprehensive system management module; The microservice module supports the deployment and operation of microservices, and microservice callers can find microservice providers through the business logic of the service governance module. The microservice module contains several microserver nodes that run microservices; The service governance module is responsible for the registration and discovery of microservices, as well as the scheduling of maintenance, to achieve load balancing, proximity access, and traffic control for microservices. The service governance module contains several service governance nodes. In this system, consistent hashing is used for publishing. The service governance module provides microservice registration, lookup, and scheduling, and also provides service status information for use by the upper-layer system management module. The service governance module is organized as follows: service governance nodes publish themselves to the peer-to-peer network using consistent hashing, constructing several virtual nodes. The keyword used for consistent hashing is the node's ID. Each service governance node constructs more than 10 and less than 1000 virtual nodes. The system management module monitors the operation of the entire service system and starts / stops related services at nodes in the system. The system integrated management module includes several system integrated management nodes; The system uses a peer-to-peer network to organize communication and awareness between nodes, and uses the peer-to-peer network to organize, manage, communicate, and store microservices. The service governance node and microservices both join the peer-to-peer network and use the peer-to-peer network interface to call the functions of the peer-to-peer network. In the system described, messages are distributed using a pub / sub service on a peer-to-peer network; information about all service governance nodes, including virtual nodes, is stored in a key / value store on the peer-to-peer network, where the key is set as needed and the value is the total virtual node value of the service governance node.

2. The microservice system based on a peer-to-peer network as described in claim 1, characterized in that, After a microservice goes live, it registers with the bound service governance node. When a client accesses a microservice, it sends a service query request to the service governance node through a peer-to-peer network. The service governance node then selects a suitable microservice for the client based on the current situation.

3. The microservice system based on a peer-to-peer network as described in claim 2, characterized in that, The microservice publishes its startup status notification in a specific pub / sub group, making it easy for the service governance node and the system comprehensive management node to perceive it; the service governance node publishes its startup status notification in a specific pub / sub group, making it easy for the service governance node, microserver, and system comprehensive management node to perceive it; the system comprehensive management module directly issues configuration and management requests based on the description information of the service governance node and microserver node using the peer-to-peer network.

4. The microservice system based on a peer-to-peer network as described in claim 3, characterized in that, The peer-to-peer network provides services for sending messages based on node IDs, storing data in the peer-to-peer network, and implementing data structures on the peer-to-peer network. The data structure includes an implementation of (key, map), which locates a map on the peer-to-peer network using the key and operates on the map.

5. The microservice system based on a peer-to-peer network as described in claim 4, characterized in that, Establish a service governance node information pub / sub group to notify service governance nodes of their entry and exit status. All service governance nodes and microservices join this group and subscribe to messages. Once a service governance node joins or leaves the system, a notification is sent to this group. Upon receiving the notification, the microservice updates its service governance node information to facilitate subsequent search for service governance nodes to combine with and to update liveness notifications.

6. The microservice system based on a peer-to-peer network as described in claim 5, characterized in that, In the system described, microservices are bound to service governance nodes. Each microservice is uniquely directed to the service governance node that manages it. The direction is as follows: the microservice uses its microservice ID and service type to create a hash value. The service governance node whose hash (microservice ID, service type) value is closest to the virtual service governance node ID value becomes the service governance node bound to this microservice.

7. The microservice system based on a peer-to-peer network as described in claim 6, characterized in that, In the system described, microservices use a peer-to-peer network registration and discovery model. Service registration involves obtaining the current service governance node information from the peer-to-peer network when the microservice starts, and then sending a registration request to the bound service governance node through the peer-to-peer network's message sending interface. The service governance node processes the microservice registration request, publishes the registration information to other service governance nodes, and saves the registration information to a unified storage. The system uses a peer-to-peer network as unified storage; Service discovery occurs when a microservice client requests a microservice. First, the microservice's microserver sends a service lookup request to the service governance node whose hash (microservice ID, service type) is closest to the requester's. The service governance node then sends information about available microservice microservers to the requester based on the requester's location information and the operational status of existing microservers for that service.

8. The microservice system based on a peer-to-peer network as described in claim 7, characterized in that, In the system described, when a microservice exits, if it is a normal exit, it sends an exit notification to the service governance node with the closest hash (microservice ID, service type). The service governance node then cleans up the service information in its local storage and unified storage. After a microservice starts, it sends a heartbeat to the bound service governance node. If it exits abnormally, the bound service governance node will be notified and clean up the node information of the microservice.

9. The microservice system based on a peer-to-peer network as described in claim 1, characterized in that, The system's integrated management module controls the start and stop of service governance nodes and microserver nodes, and issues configuration information. For service governance nodes, their description information is uniformly stored in a key-value store. The integrated management service of the system's integrated management module accesses this data to obtain the description information of the service governance nodes in the system, and then communicates with these nodes. The system's integrated management module also joins the message distribution group of the service governance nodes, subscribes to their online and offline messages, and updates the status of the service governance nodes in a timely manner. For microserver nodes, their description information is stored in a (key, map) on the peer-to-peer network. The system's integrated management module perceives their description information and online / offline status in the mode of managing service governance nodes.