CN-121984869-A - Capacity expansion method, device, equipment and medium for registry cluster
Abstract
The application discloses a capacity expansion method, device, equipment and medium of a registry cluster, and relates to the technical field of distribution. The method comprises the steps of obtaining operation state data of a registry cluster under the condition that a capacity expansion request of the registry cluster is triggered, determining a node deployment position of a new registry node based on topology awareness analysis operation state data, deploying the new registry node at the node deployment position, and synchronizing a registry for the new registry node. The technical scheme provided by the application can obviously enhance the running stability and service continuity of the system and automatically adjust the cluster scale based on the load demand.
Inventors
- LING CHEN
Assignees
- 中国工商银行股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260206
Claims (10)
- 1. A method for expanding a registry cluster, the method comprising: Acquiring the running state data of the registry cluster under the condition that the triggering of the capacity expansion request of the registry cluster is monitored; analyzing the running state data based on topology awareness, and determining a node deployment position of a new registry node; And deploying the new registry node at the node deployment position, and synchronizing a registry for the new registry node.
- 2. The method for expanding a registry cluster according to claim 1, wherein the analyzing the running state data based on topology awareness, determining a node deployment location of a new registry node, comprises: constructing a weight space model based on the running state data; constructing a node topological graph for existing nodes in the registry cluster based on triangulation; Generating a dynamic partition map of the registry cluster by taking the node topological graph as a dual graph, wherein the dynamic partition map comprises a plurality of service management and control areas taking the existing nodes as generating elements; Determining an overload service area from a plurality of service management and control areas based on density weights in the weight space model; And selecting the node deployment position meeting the topological communication performance constraint in the overload service area.
- 3. The method of claim 2, wherein the topology communication performance constraints include at least one of: In a triangle topology formed by new registry nodes deployed at the node deployment positions and adjacent nodes, the synchronous hop count of a registry between any two nodes does not exceed a preset quantity threshold, and the preset quantity threshold is determined by the node scale of the registry cluster; And the average network delay of the new registry node and the registry node in a first service area is not more than a first preset duration, wherein the first service area is a service area except the overload service area in a plurality of service management and control areas.
- 4. The method of claim 1, wherein synchronizing the registry to the new registry node comprises: Acquiring a service fingerprint list of all service instances in the registry cluster; Screening out a hot service instance from the service fingerprint list, and synchronizing a registry of the hot service instance with the new registry node; and in the case that the cold service instance synchronization request is triggered, synchronizing a registry of the cold service instance to the new registry node, wherein the cold service instance is a service instance except the hot service instance in all the service instances.
- 5. The method for expanding a registry cluster according to claim 4, wherein the triggering condition of the cold service instance synchronization request comprises at least one of: the communication delay between the new registry node and the existing nodes in the registry cluster is lower than a second preset duration, and the retransmission rate of the data packet is lower than a first preset proportion; After the new registry node completes the registry synchronization of the hot service instance, the heartbeat success rate of the hot service instance reaches a second preset proportion; and the service call quantity of the registry cluster is in a preset low-peak interval.
- 6. The method of claim 1, wherein synchronizing the registry to the new registry node comprises: dividing all service instances in the registry cluster into data of preset partition quantity; synchronizing data of different partitions in the new registry node in parallel to a plurality of existing nodes in the registry cluster; In the data synchronization process, monitoring network characteristic data in real time; And adjusting a synchronization mode of the registry corresponding to the cold service instance based on the network characteristic data, wherein the synchronization mode comprises batch synchronization and incremental synchronization.
- 7. The method for expanding a registry cluster according to claim 1, wherein the triggering condition of the expansion request of the registry cluster at least comprises one of the following: Predicting forecast data for service registration for a future time period based on the historical service registration data; calculating service density values of all service control areas; calculating a service association matrix of the service control area based on a service call chain topology; Weighting the predicted data, the service density value and the service association degree matrix to calculate a load demand score; And triggering the capacity expansion request when the load demand score exceeds a preset score value.
- 8. A device for expanding a registry cluster, the device comprising: the data acquisition module is used for acquiring the running state data of the registry cluster under the condition that the capacity expansion request of the registry cluster is triggered; the position determining module is used for analyzing the running state data based on topology awareness and determining a node deployment position of a new registry node; the node deployment module is used for deploying the new registry node at the node deployment position and synchronizing a registry for the new registry node.
- 9. An electronic device, the electronic device comprising: And a memory communicatively coupled to the at least one processor; Wherein the memory stores a computer program for execution by the at least one processor to enable the at least one processor to perform the method of expanding a registry cluster of any one of claims 1 to 7.
- 10. A computer readable storage medium storing computer instructions for causing a processor to implement the method of expanding a registry cluster of any one of claims 1 to 7 when executed.
Description
Capacity expansion method, device, equipment and medium for registry cluster Technical Field The present application relates to the field of distributed technologies, and in particular, to a method, an apparatus, a device, and a medium for expanding a registry cluster. Background In a micro-service architecture, a registry serves as a core component for service registration and discovery. Along with the dynamic fluctuation of the service flow, the cluster scale is required to be adjusted through capacity expansion to match the load demand, so that the timeliness and reliability of service registration and discovery are ensured. At present, the capacity expansion of the registry cluster is mainly realized by manual operation, the network address of a new registry node needs to be manually configured, and the registry cluster is restarted to enable the configuration to be effective. The scheme has the following defects that firstly, configuration files (such as a registry) of the registry node are required to be manually modified every time of capacity expansion, the operation is complicated, configuration errors are easy to occur, short service is unavailable in the restarting process of the registry cluster, system stability is affected, and secondly, the cluster scale cannot be automatically adjusted according to the system load, so that the resource utilization rate is low. Therefore, there is a need to design a capacity expansion method that enhances system operation stability and service continuity and can dynamically adjust the cluster size according to the system load. Disclosure of Invention The application provides a capacity expansion method, device, equipment and medium for a registry cluster, which can remarkably enhance the running stability and service continuity of a system and automatically adjust the cluster scale based on load requirements. In a first aspect, the present application provides a method for expanding a registry cluster, where the method includes: Acquiring the running state data of the registry cluster under the condition that the triggering of the capacity expansion request of the registry cluster is monitored; analyzing the running state data based on topology awareness, and determining a node deployment position of a new registry node; And deploying the new registry node at the node deployment position, and synchronizing a registry for the new registry node. Further, the method comprises the steps of analyzing the running state data based on topology perception, determining node deployment positions of new registry nodes, constructing a weight space model based on the running state data, constructing a node topological graph for existing nodes in the registry cluster based on triangulation, generating a dynamic partition map of the registry cluster by taking the node topological graph as a dual graph, wherein the dynamic partition map comprises a plurality of service management areas taking the existing nodes as generation elements, determining an overload service area from the plurality of service management areas based on density weights in the weight space model, and selecting the node deployment positions meeting topological communication performance constraints in the overload service area. Further, the topology communication performance constraint at least comprises one of the following steps that in a triangle topology formed by a new registry node deployed at the node deployment position and an adjacent node, the synchronous hop count of a registry between any two nodes does not exceed a preset quantity threshold, the preset quantity threshold is determined by the node scale of the registry cluster, the average network delay of the new registry node and the registry node in a first service area does not exceed a first preset duration, and the first service area is a service area except the overload service area in a plurality of service management areas. Further, the method for synchronizing the registry of the new registry node comprises the steps of obtaining service fingerprint lists of all service instances in the registry cluster, screening hot service instances from the service fingerprint lists, synchronizing the registry of the hot service instance with the new registry node, and synchronizing the registry of the cold service instance with the new registry node under the condition that a cold service instance synchronization request is triggered, wherein the cold service instance is a service instance except the hot service instance in all the service instances. Further, the triggering condition of the cold service instance synchronization request at least comprises one of the following steps that communication delay between the new registry node and an existing node in the registry cluster is lower than a second preset duration, the retransmission rate of a data packet is lower than a first preset proportion, after the new registry node completes registry s