Capacity expansion method and device for cluster nodes, computer equipment and storage medium

By obtaining cluster logs and resource indicator data, and automatically compute and add appropriate nodes to the cluster, the problem of insufficient resources during peak business is solved, ensuring business stability and responsiveness.

CN119088564APending Publication Date: 2024-12-06SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213417.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the peak period of business, due to the surge in resource applications, the available resources in the cluster gradually decrease, resulting in the inability to schedule the Pod and the delay in application responses increased, which may cause business interruption.

Method used

By obtaining cluster logs and resource indicator data, determine the status information of the scheduling unit and the amount of used resources, calculate the number of nodes that need to be expanded, and add the corresponding number of nodes from the pre-set node pool to the cluster to meet resource requirements .

Benefits of technology

The automatic capacity expansion of cluster nodes is realized to ensure that the scheduling unit can be scheduled normally, reduce the risk of business interruption, shorten the expansion time, and reduce the impact on the business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088564A_ABST
    Figure CN119088564A_ABST
Patent Text Reader

Abstract

The invention relates to a cluster node capacity expansion method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a cluster log and resource index data in response to a cluster capacity expansion request; determining state information of a scheduling unit based on the cluster log, acquiring a resource request quantity of the scheduling unit which cannot be scheduled under the condition that the state information of the scheduling unit comprises scheduling incapability, and determining a first capacity expansion node quantity based on the resource request quantity; determining a used resource quantity based on the resource index data, and determining a second capacity expansion node quantity based on a resource quantity difference value between the used resource quantity and a resource use threshold value under the condition that the used resource quantity is greater than the resource use threshold value; and based on a preset node pool, the first capacity expansion node number and the second capacity expansion node number, adding the nodes which accord with the node number into a cluster. By adopting the method, normal operation of services can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a cluster node expansion method, device, computer equipment, and storage medium. Background Art

[0002] With the continuous growth of business scale and the development of technology, more and more enterprises are using Kubernetes (cluster) as a container orchestration platform to manage and deploy application services. Kubernetes can dynamically adjust the number of Pods (scheduling units) according to the actual load of the application, thereby optimizing resource utilization and improving the responsiveness of the application.

[0003] However, in actual applications, as the business grows, the available resources in the cluster gradually decrease. Especially during business peaks, due to the surge in resource applications, resources may be insufficient, which in turn causes a series of problems, such as Pod scheduling failure, increased application response delay, etc., leading to business interruption. Summary of the invention

[0004] Based on this, it is necessary to provide a cluster node expansion method, device, computer equipment, and storage medium to address the above technical issues.

[0005] In a first aspect, the present application provides a method for expanding the capacity of a cluster node. The method comprises:

[0006] Responding to cluster expansion requests, obtaining cluster logs and resource indicator data;

[0007] Determine the status information of the scheduling unit based on the cluster log, and when the status information of the scheduling unit includes that the scheduling unit cannot be scheduled, obtain the resource request amount of the scheduling unit that cannot be scheduled, and determine the number of first expansion nodes based on the resource request amount;

[0008] Determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than the resource usage threshold, determine the number of second expansion nodes based on the difference between the amount of used resources and the resource usage threshold;

[0009] Based on the preset node pool, the first expansion node quantity, and the second expansion node quantity, nodes that meet the node quantity are added to the cluster.

[0010] In one embodiment, determining the status information of the scheduling unit based on the cluster log includes:

[0011] The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

[0012] In one embodiment, determining the amount of used resources based on the resource indicator data includes:

[0013] Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes;

[0014] The used resource amount in the resource indicator data is obtained based on the query data interface.

[0015] In one embodiment, adding nodes that meet the number of nodes to the cluster includes:

[0016] Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes;

[0017] Determine resource configuration for new nodes;

[0018] Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

[0019] In one embodiment, the method further comprises:

[0020] Based on a pre-developed expansion interface, obtaining the number of new nodes;

[0021] A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

[0022] In a second aspect, the present application further provides a device for expanding a cluster node, the device comprising:

[0023] A response module is used to respond to cluster expansion requests and obtain cluster logs and resource indicator data;

[0024] A first determination module is configured to determine status information of a scheduling unit based on the cluster log, and when the status information of the scheduling unit includes that the scheduling unit cannot be scheduled, obtain a resource request amount of the scheduling unit that cannot be scheduled, and determine the number of first expansion nodes based on the resource request amount;

[0025] A second determination module is used to determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than the resource usage threshold, determine the number of second expansion nodes based on the difference between the amount of used resources and the resource usage threshold;

[0026] The expansion module is used to add nodes that meet the node number into the cluster based on a pre-set node pool, the first expansion node number, and the second expansion node number.

[0027] In one embodiment, determining the status information of the scheduling unit based on the cluster log includes:

[0028] The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

[0029] In one embodiment, determining the amount of used resources based on the resource indicator data includes:

[0030] Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes;

[0031] The used resource amount in the resource indicator data is obtained based on the query data interface.

[0032] In one embodiment, adding nodes that meet the number of nodes to the cluster includes:

[0033] Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes;

[0034] Determine resource configuration for new nodes;

[0035] Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

[0036] In one embodiment, the device further comprises:

[0037] Based on a pre-developed expansion interface, obtaining the number of new nodes;

[0038] A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

[0039] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the cluster node expansion method are implemented.

[0040] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the cluster node expansion method when the computer program is executed by a processor.

[0041] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the cluster node expansion method are implemented.

[0042] The above cluster node expansion method has at least the following beneficial effects:

[0043] The embodiment scheme provided by the present disclosure obtains the number of nodes that need to be expanded through cluster logs and resource indicator data. The automatic expansion of cluster nodes can ensure that the scheduling unit can be scheduled normally to a limited extent, ensuring business stability. Through a pre-set node pool, the corresponding nodes corresponding to the number of nodes that need to be expanded are added to the cluster, reducing the impact time on the business.

[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] FIG1 is an application environment diagram of a cluster node expansion method according to an embodiment;

[0047] Figure 2 A schematic diagram of a flow chart of a method for expanding the capacity of a cluster node in an embodiment;

[0048] Figure 3 is a schematic diagram of a method for expanding the capacity of a cluster node in an embodiment;

[0049] Figure 4 is a structural block diagram of a capacity expansion device for a cluster node in an embodiment;

[0050] FIG5 is a diagram showing the internal structure of a computer device in one embodiment;

[0051] FIG. 6 is a diagram showing the internal structure of a server in an embodiment. DETAILED DESCRIPTION

[0052] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0054] The embodiment of the present disclosure provides a method for expanding the capacity of a cluster node, which can be applied in an application environment as shown in FIG1 . Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0055] In some embodiments of the present disclosure, Figure 2 As shown, a method for expanding the capacity of a cluster node is provided, and the method is applied to the server in Figure 1 to process the cluster expansion request as an example for explanation. It can be understood that the method can be applied to the server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In a specific embodiment, the method can include the following steps:

[0056] S202: In response to the cluster expansion request, obtain cluster logs and resource indicator data.

[0057] A cluster expansion request can be submitted by a user through the front-end interface, or it can be automatically triggered by a large amount of system resource requests. Cluster logs can include activity records of each node in the cluster, such as resource usage, error messages, etc. Resource indicator data can be used to monitor cluster performance in real time, such as CPU (Central Processing Unit) usage, memory usage, etc.

[0058] S204: Determine status information of a scheduling unit based on the cluster log, and when the status information of the scheduling unit includes being unable to be scheduled, obtain a resource request amount of the scheduling unit that cannot be scheduled, and determine the first expansion node quantity based on the resource request amount.

[0059] Analyze which scheduling units cannot be scheduled or are evicted through cluster logs. When the available CPU or memory on a node is insufficient to meet the requirements of a new scheduling unit, the scheduling unit cannot be scheduled to the node. If the utilization rate of resources (such as CPU or memory) on a node is too high and exceeds the threshold, some scheduling units will be evicted to release resources. Obtain the resource request amount of the scheduling units that cannot be scheduled, calculate the total resource demand based on the resource request information of the scheduling units that cannot be scheduled, calculate the number of resources that need to be filled based on the usage of node resources, determine the resource configuration of the new node, such as CPU and memory configuration, and calculate the number of first expansion nodes required based on the total resource demand or the number of resources that need to be filled, as well as the resource configuration of the new node.

[0060] S206: Determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than a resource usage threshold, determine the number of second expansion nodes based on a resource amount difference between the amount of used resources and the resource usage threshold.

[0061] Based on the resource indicator data, the amount of used resources is determined, and a reasonable resource usage threshold is set according to the actual situation of the cluster, such as 80%. If the amount of used resources is greater than the resource usage threshold, the resource difference is calculated to determine the resource configuration of the new node, such as CPU and memory configuration. According to the resource difference and the resource configuration of the new node, the required number of second expansion nodes is calculated.

[0062] S208: Based on the pre-set node pool, the first expansion node quantity, and the second expansion node quantity, adding nodes that meet the node quantity to the cluster.

[0063] Add the number of nodes for the first expansion and the number of nodes for the second expansion to get the total number of nodes for expansion, select enough nodes from the node pool to meet the calculated number of nodes, and call the batch deployment node interface to install the node environment and join the cluster. Ensure that the cluster has enough resources to use the scheduling unit, reduce the need for manual operations, improve the degree of automation, and deploy nodes concurrently, which can greatly shorten the expansion time and reduce the impact on the business.

[0064] Figure 3 A schematic diagram of capacity expansion of a cluster node in an embodiment.

[0065] In the above-mentioned cluster node expansion method, the number of nodes that need to be expanded is obtained through cluster logs and resource indicator data. The automatic expansion of cluster nodes can ensure that the scheduling unit can be scheduled normally to a limited extent, ensuring business stability. Through the pre-set node pool, the corresponding nodes corresponding to the number of nodes that need to be expanded are added to the cluster, reducing the impact time on the business.

[0066] In some embodiments of the present disclosure, determining the status information of the scheduling unit based on the cluster log includes:

[0067] The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

[0068] Get cluster logs and push them to Kafka (message queue), write a program to periodically request the API Server (data interface) to get cluster logs, parse cluster logs and filter out events related to the scheduling unit, push the filtered log events to Kafka, consume the data in Kafka and determine the scheduling status of the scheduling unit.

[0069] In some embodiments of the present disclosure, determining the amount of used resources based on the resource indicator data includes:

[0070] Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes;

[0071] The used resource amount in the resource indicator data is obtained based on the query data interface.

[0072] Deploy Node Exporter (monitoring program) on each node to collect node-level monitoring indicators, and deploy Kube-state-metrics (monitoring program) to collect monitoring indicators of Pod (scheduling unit) and kubelet (node ​​component). Configure Prometheus monitoring (service monitoring system and time series database) to enable it to capture monitoring indicators exposed by Node Exporter and Kube-state-metrics. Configure VictoriaMetrics (distributed real-time monitoring database) to enable it to receive data from Prometheus and provide a query interface based on the VictoriaMetrics API (data interface) to obtain the CPU and memory usage of the node. Calculate the amount of used resources, compare the amount of used resources with the resource threshold, and determine whether there is insufficient CPU and memory.

[0073] In some embodiments of the present disclosure, adding nodes that meet the number of nodes to the cluster includes:

[0074] Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes;

[0075] Determine resource configuration for new nodes;

[0076] Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

[0077] A node pool is prepared in advance, which contains 10 spare nodes, each of which is configured with 4 CPU cores and 8 GB memory. Determine the number of nodes that need to be expanded. Assume that there are 5 Pods that cannot be scheduled, and a total of 3 CPU cores and 6 GB memory are required. The resource configuration of the new node is 4 CPU cores and 8 GB memory. At least 1 new node is required to meet the resource requirements.

[0078] In some embodiments of the present disclosure, the method further includes:

[0079] Based on a pre-developed expansion interface, obtaining the number of new nodes;

[0080] A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

[0081] Prepare a certain number of spare nodes in advance. These nodes can be idle physical servers or virtual machines. Make sure that these spare nodes have installed the Kubernetes node environment and have the ability to join the cluster. Put these spare nodes into a node pool. These nodes should be ready to join the cluster at any time. The logic can use multi-threading or multi-process technology to deploy multiple nodes concurrently. Each thread or process is responsible for deploying a node. Each thread or process is responsible for selecting a node from the node pool and executing the deployment logic. The deployment logic includes deploying the Kubernetes environment on the node, adding the node to the cluster, and adding the newly deployed node to the existing Kubernetes cluster.

[0082] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0083] Based on the same inventive concept, the embodiment of the present disclosure also provides a cluster node expansion device for implementing the above-mentioned cluster node expansion method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the cluster node expansion device embodiment provided below can refer to the above-mentioned limitations on the cluster node expansion method, which will not be repeated here.

[0084] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0085] In one embodiment, Figure 4 As shown, a device 400 for expanding the capacity of a cluster node is provided, and the device may be the aforementioned server, or a module, component, device, unit, etc. integrated in the server. The device 400 may include:

[0086] A response module 402 is used to obtain cluster logs and resource indicator data in response to a cluster expansion request;

[0087] A first determination module 404 is configured to determine status information of a scheduling unit based on the cluster log, and when the status information of the scheduling unit includes that the scheduling unit cannot be scheduled, obtain a resource request amount of the scheduling unit that cannot be scheduled, and determine the number of first expansion nodes based on the resource request amount;

[0088] A second determination module 406 is configured to determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than the resource usage threshold, determine the number of second expansion nodes based on the difference between the amount of used resources and the resource usage threshold;

[0089] The expansion module 408 is used to add nodes that meet the node number into the cluster based on the pre-set node pool, the first expansion node number, and the second expansion node number.

[0090] In one embodiment, determining the status information of the scheduling unit based on the cluster log includes:

[0091] The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

[0092] In one embodiment, determining the amount of used resources based on the resource indicator data includes:

[0093] Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes;

[0094] The used resource amount in the resource indicator data is obtained based on the query data interface.

[0095] In one embodiment, adding nodes that meet the number of nodes to the cluster includes:

[0096] Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes;

[0097] Determine resource configuration for new nodes;

[0098] Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

[0099] In one embodiment, the device further comprises:

[0100] Based on a pre-developed expansion interface, obtaining the number of new nodes;

[0101] A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

[0102] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0103] Each module in the above-mentioned device for expanding the capacity of cluster nodes can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0104] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5 . The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource quantities. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for expanding the capacity of a cluster node is implemented.

[0105] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for expanding the capacity of a cluster node is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, a trackball or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0106] Those skilled in the art will understand that the structures shown in FIG. 5 and FIG. 6 are merely block diagrams of partial structures related to the scheme of the present disclosure, and do not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

[0107] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0108] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.

[0109] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.

[0110] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A method for expanding the capacity of a cluster node, characterized in that: The method comprises: Responding to cluster expansion requests, obtaining cluster logs and resource indicator data; Determine the status information of the scheduling unit based on the cluster log, and when the status information of the scheduling unit includes that the scheduling unit cannot be scheduled, obtain the resource request amount of the scheduling unit that cannot be scheduled, and determine the number of first expansion nodes based on the resource request amount; Determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than the resource usage threshold, determine the number of second expansion nodes based on the difference between the amount of used resources and the resource usage threshold; Based on the preset node pool, the first expansion node quantity, and the second expansion node quantity, nodes that meet the node quantity are added to the cluster.

2. The method according to claim 1, characterized in that: The determining the status information of the scheduling unit based on the cluster log includes: The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

3. The method according to claim 1, characterized in that Determining the amount of used resources based on the resource indicator data includes: Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes; The used resource amount in the resource indicator data is obtained based on the query data interface.

4. The method according to claim 1, characterized in that: The adding of nodes that meet the number of nodes to the cluster includes: Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes; Determine resource configuration for new nodes; Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

5. The method according to claim 4, characterized in that The method further comprises: Based on a pre-developed expansion interface, obtaining the number of new nodes; A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

6. A device for expanding the capacity of a cluster node, characterized in that: The device comprises: A response module is used to respond to cluster expansion requests and obtain cluster logs and resource indicator data; A first determination module is configured to determine status information of a scheduling unit based on the cluster log, and when the status information of the scheduling unit includes that the scheduling unit cannot be scheduled, obtain a resource request amount of the scheduling unit that cannot be scheduled, and determine the number of first expansion nodes based on the resource request amount; A second determination module is used to determine the amount of used resources based on the resource indicator data, and when the amount of used resources is greater than the resource usage threshold, determine the number of second expansion nodes based on the difference between the amount of used resources and the resource usage threshold; The expansion module is used to add nodes that meet the node number into the cluster based on a pre-set node pool, the first expansion node number, and the second expansion node number.

7. The device according to claim 6, characterized in that The determining the status information of the scheduling unit based on the cluster log includes: The cluster log is pushed to a message queue, and based on the data in the cluster log consumed by the message queue, it is determined whether there is a scheduling unit that cannot be scheduled.

8. The device according to claim 6, characterized in that Determining the amount of used resources based on the resource indicator data includes: Deploy a monitoring program on each node, wherein the monitoring program is used to collect resource indicator data of the node, the scheduling unit, and the node component, and the cluster includes multiple nodes; The used resource amount in the resource indicator data is obtained based on the query data interface.

9. The device according to claim 6, characterized in that The adding of nodes that meet the number of nodes to the cluster includes: Calculate the number of resources that need to be filled based on the number of the first expansion nodes and the number of the second expansion nodes; Determine resource configuration for new nodes; Based on the number of resources that need to be filled and the resource configuration of the new node, the number of new nodes is obtained.

10. The device according to claim 9, characterized in that The device also includes: Based on a pre-developed expansion interface, obtaining the number of new nodes; A corresponding number of new nodes are obtained from the preset node pool, and the new nodes are added to the cluster based on multi-threading.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.