Dynamic expansion or contraction method, device, equipment and medium

By collecting server load information and automatically sending scaling-up or scaling-down commands, the problem of inflexible scaling-up or scaling-down in Jenkins deployment methods is solved. This enables low-cost, easy-to-operate dynamic scaling-up or scaling-down, reducing operation and maintenance costs and improving operation and maintenance efficiency.

CN115632949BActive Publication Date: 2026-03-03SHENZHEN SHANJIAN INTELLIGENT SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211168073.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-03-03
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

In existing technologies, Jenkins deployment methods are inflexible in terms of scaling up or down, resulting in high operation and maintenance costs and complex management, especially when small businesses or large enterprises migrate to Kubernetes, which requires a lot of time and resources.

Method used

By collecting server load information and comparing it with preset load levels and frequency values, the system automatically sends expansion or contraction commands to the cloud server to configure the server to balance the load and achieve dynamic expansion or contraction.

Benefits of technology

It enables low-cost and easy-to-operate dynamic expansion or contraction, reducing maintenance workload, lowering maintenance costs, improving maintenance efficiency, and ensuring server load balancing and stable operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115632949B_ABST
    Figure CN115632949B_ABST
Patent Text Reader

Abstract

The application relates to the storage technical field and discloses a dynamic capacity expansion or reduction method, device, equipment and medium. The method comprises the following steps: collecting load information of a server processing data, comparing the load information with a preset load degree, obtaining a first comparison result, counting the first comparison result, obtaining a count value, comparing the count value with a preset number value, obtaining a second comparison result, sending a capacity expansion or reduction instruction to a preset cloud server according to the second comparison result and a preset configuration file, obtaining server information corresponding to capacity expansion or reduction, receiving the server information corresponding to capacity expansion or reduction, and configuring corresponding servers to balance the load, so that the load of the host server can be maintained in a balanced state, the operation and maintenance cost is reduced, and the operation and maintenance efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image transmission technology, and in particular to methods, apparatuses, devices and media for dynamic scaling up or down. Background Technology

[0002] Currently, many enterprises on the internet use the Jenkins third-party platform for deployment. As the demand for product iteration and the number of branches increase, a single Jenkins node is insufficient to support the rapid iteration and timely deployment of a large number of product branches and projects. Using Jenkins slave nodes to achieve something similar to load balancing can meet the goals of rapid iteration and timely deployment. However, if there is no need for iteration in the near future, some slave node servers will become idle. If there is a surge in demand in the near future, operations and maintenance personnel will need to manually intervene to expand the capacity, which increases their workload.

[0003] While existing Jenkins deployments using the K8S approach can achieve dynamic scaling and expansion, over 80% of enterprises still use the traditional Jenkins deployment method. If a small business wants to adopt K8S, it needs to invest in relatively high operation and maintenance costs. If a large enterprise wants to adopt K8S, it may already have a large number of projects integrated into Jenkins, and migration would take a lot of time. Summary of the Invention

[0004] The main objective of this invention is to provide a low-cost, easy-to-operate method that enables dynamic expansion or contraction.

[0005] The first aspect of this invention provides a method for dynamically expanding or shrinking capacity, comprising:

[0006] Collect load information of the server processing data as monitored;

[0007] Compare the load information with the preset load level to obtain a first comparison result, and count the results based on the first comparison result to obtain a count value.

[0008] The second comparison result is obtained by comparing the count value with the preset number of times.

[0009] Based on the second comparison result and the preset configuration file, an expansion or reduction instruction will be sent to the preset cloud server for execution, and the corresponding expansion or reduction server information will be obtained.

[0010] Receive the server information for expansion or reduction, and configure the corresponding server to balance the load.

[0011] Furthermore, in a second implementation of the first aspect of the present invention, comparing the load information with a preset load level to obtain a first comparison result, and counting on the first comparison result to obtain a count value, includes:

[0012] Determine whether the load information is greater than the preset load level;

[0013] If so, mark the memory list data in the load information with a True flag, and count the True flags to obtain the expansion count value;

[0014] If not, mark the memory list data in the load information with a False flag, and count the False flags to obtain the count value of the shrinkage.

[0015] Furthermore, in a third implementation of the first aspect of the present invention, if the statement is true, then a True identifier is marked in the memory list data in the load information, and the True identifier is counted to obtain the expansion count value, including:

[0016] Determine if this is the first time it has been triggered;

[0017] If so, then the expansion information is obtained;

[0018] If not, mark the True flag in the memory list data of the load information and count the True flags.

[0019] Furthermore, in a fourth implementation of the first aspect of the present invention, the step of comparing the count value with a preset number of times to obtain a second comparison result includes:

[0020] Determine whether the count value of the expansion or the count value of the reduction is greater than a preset number of times;

[0021] If so, then information on expansion or reduction will be obtained;

[0022] If not, continue to mark the memory list data in the load information with a True or False flag.

[0023] Furthermore, in a fifth implementation of the first aspect of the present invention, the step of sending expansion or contraction instructions to a preset cloud server for execution based on the second comparison result and a preset configuration file, and obtaining the corresponding expansion or contraction server information, includes:

[0024] Read the user's AK / SK, image ID, and pre-configured configuration file, and call the pre-configured cloud server's SDK to create or destroy the connection to the corresponding server.

[0025] Furthermore, in a sixth implementation of the first aspect of the present invention, after receiving the server information for scaling up or down and configuring the corresponding server to balance the load, the method further includes:

[0026] The server information for scaling up or down is written into the configuration file to obtain a new configuration file.

[0027] Furthermore, in the seventh implementation of the first aspect of the present invention, the server information for expansion or reduction includes server IP, collected indicators, collection interval time, and verification information.

[0028] A second aspect of the present invention provides a dynamic expansion or reduction device, the dynamic expansion or reduction device comprising:

[0029] The data acquisition module is used to collect load information of the monitored server processing data;

[0030] The first comparison module is used to compare the load information with the preset load level to obtain a first comparison result, and to count the first comparison result to obtain a count value.

[0031] The second comparison module is used to compare the count value with the preset number of times to obtain a second comparison result;

[0032] The expansion or reduction module is used to send expansion or reduction instructions to the preset cloud server for execution based on the second comparison result and the preset configuration file, and obtain the corresponding expansion or reduction server information;

[0033] The execution module is used to receive the server information for expansion or reduction and configure the corresponding server to balance the load.

[0034] A third aspect of the present invention provides a dynamic expansion or reduction device, the dynamic expansion or reduction device comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected via a circuit;

[0035] The at least one processor invokes the instructions in the memory to cause the device to execute the above-described dynamic expansion or contraction method.

[0036] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described dynamic expansion or contraction method.

[0037] The beneficial effects of this invention are as follows: By collecting the load information of the monitored server data processing, comparing the load information with the preset load level, a first comparison result is obtained, and a count is performed on the first comparison result to obtain a count value. The count value is compared with the preset number of counts to obtain a second comparison result. Based on the second comparison result and the preset configuration file, an expansion or contraction command is sent to the preset cloud server for execution, obtaining the corresponding expansion or contraction server information. The expansion or contraction server information is received, and the corresponding server is configured to balance the load. This achieves automatic and dynamic expansion or contraction based on the load of the host server, ensuring that the load of the host server remains balanced. This effectively ensures the stable operation of the host server while reducing the effort and time of manual monitoring by maintenance personnel, reducing maintenance costs, and improving maintenance efficiency. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the first embodiment of the dynamic expansion or contraction method in this invention;

[0039] Figure 2 This is a schematic diagram of a second embodiment of the dynamic expansion or contraction method in this invention.

[0040] Figure 3 This is a schematic diagram of the third embodiment of the dynamic expansion or contraction method in this invention;

[0041] Figure 4 This is a schematic diagram of the fourth embodiment of the dynamic expansion or contraction method in this invention;

[0042] Figure 5 This is a schematic diagram of the fifth embodiment of the dynamic expansion or contraction method in this invention;

[0043] Figure 6 This is a schematic diagram of the first embodiment of the dynamic expansion or reduction device in this invention;

[0044] Figure 7 This is a schematic diagram of one embodiment of the dynamic expansion or reduction device in this invention. Detailed Implementation

[0045] This invention provides a method, system, device, equipment, and medium for dynamically expanding or shrinking capacity.

[0046] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0047] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1-5 One embodiment of the dynamic expansion or reduction method in this invention includes:

[0048] 101. Collect the load information of the server processing data as monitored;

[0049] In this embodiment, the load of the host server's CPU, memory, I / O, disk space, etc., is monitored and defined as indicators. The monitoring module monitors the nodes initially configured by the user as the master nodes and collects load information. The execution of server expansion and contraction is handled by Python. In this embodiment, the message delivery and reception between the monitoring module and Python is handled by an existing open-source third-party component message queue.

[0050] 102. Compare the load information with the preset load level to obtain a first comparison result, and count the results based on the first comparison result to obtain a count value;

[0051] In this embodiment, in order to perform expansion or reduction operations based on the current load of the host server, a corresponding expansion threshold needs to be preset, which is the load level in this embodiment. The load level can be customized according to user needs and the user's perception of the server status. In this embodiment, a load level of 80% is used as an example. The calculation of the load level is essentially the average load of the host server's CPU, memory, I / O, disk space, etc., reaching 80%.

[0052] Furthermore, in step 102, the following can also be performed:

[0053] 1021. Determine whether the load information is greater than the preset load level;

[0054] 1022. If so, mark the memory list data in the load information with a True identifier, and count the True identifiers to obtain the expansion count value;

[0055] 1023. If not, mark the memory list data in the load information with a False flag, and count the False flags to obtain the count value of the shrinkage.

[0056] In this embodiment, it is determined whether the average load of the current host server's CPU, memory, I / O, disk space, etc., exceeds 80%. If so, an expansion operation is required; otherwise, a reduction operation is required. However, before performing the expansion or reduction operation, the number of times the load exceeds or does not exceed the load threshold needs to be counted. This is because if the expansion or reduction operation is performed immediately after each judgment result, it will consume a large amount of server resources. The load is a dynamic process, and there are moments when the load exceeds 80% and then returns to the original load below 80%. If expansion is performed directly in this situation, the expanded server will be informed in the next stage of task execution that it needs to be reduced due to the load being below 80%, and the previously expanded server will be removed. This leads to the problem of unreasonable use of server resources. Therefore, it is necessary to count the occurrence of load conditions, add True / False flags to the memory list in the load information, and count the True / False flags.

[0057] Furthermore, step 1022 can also specifically include:

[0058] 10221. Determine if this is the first time it has been triggered;

[0059] 10222. If so, then the expansion information is obtained;

[0060] 10223. If not, mark the True flag in the memory list data of the load information and count the True flags.

[0061] In steps 10221-10223, since the data being processed by the host server is being provided for the first time, the user cannot directly determine the load this data will place on the host server. Therefore, when the host server executes the data for the first time and returns load information, if it determines that the load information does not exceed the load limit, no action is taken. If it determines that the load information exceeds the load limit, a scaling-up operation is required. It is important to note that the premise for directly scaling up here is that there has been no unrecovered scaling-up situation. That is, this is the very first time the load information is determined. Therefore, in order to ensure that the load limit can be stabilized at 80% or below in the future, scaling up is directly performed to share the load pressure on the host server.

[0062] 103. Compare the count value with the preset number of times to obtain a second comparison result;

[0063] In this embodiment, as mentioned above, the load situation is dynamic and varies from moment to moment. A high load situation may occur in an instant. Therefore, it is necessary to record and count the situations where the load is higher or lower than the load level. The number of times can be customized according to the user's own needs. In this embodiment, this value is preset to 5 times.

[0064] Furthermore, in step 103, the following can also be performed:

[0065] 1031. Determine whether the count value of the expansion or the count value of the reduction is greater than a preset number of times;

[0066] 1032. If so, then information on expansion or contraction will be obtained;

[0067] 1033. If not, continue to mark the memory list data in the load information with a True or False flag.

[0068] In this embodiment, the True / False flags recorded in the memory list are counted. If the True / False flags appear more than 5 times, an expansion or contraction operation is performed. Otherwise, the True or False flags are continuously marked in the memory list data in the load information. It should be noted that this counting can be continuous. For example, if the True / False flags appear 6 or more times consecutively in the memory list, an expansion or contraction operation is performed. If the memory list has 5 consecutive True flags, and the next time a False flag appears, an expansion operation cannot be performed. The same applies to the determination of the contraction operation.

[0069] 104. Based on the second comparison result and the preset configuration file, the expansion or reduction command will be sent to the preset cloud server for execution to obtain the corresponding expansion or reduction server information;

[0070] The pre-configured configuration file is essentially a YAML configuration file, which simply expresses data formats such as lists, hash tables, and scalars. Its use of whitespace indentation and heavy reliance on appearance makes it particularly suitable for expressing or editing data structures, various configuration files, debugging content, and file outlines. In this embodiment, the YAML configuration file pre-records the server information currently being processed by the host server. When scaling up or down commands are sent to the cloud server for execution, this YAML configuration file is used to determine which servers need to be scaled down and which servers have already been scaled up.

[0071] Furthermore, in step 104, the following can also be performed:

[0072] Read the user's AK / SK, image ID, and pre-configured configuration file, and call the pre-configured cloud server's SDK to create or destroy the connection to the corresponding server.

[0073] 105. Receive the server information for expansion or reduction, and configure the corresponding server to balance the load.

[0074] In steps 105-106, AK / SK authentication is encrypted verification information. The corresponding cloud server can be obtained quickly and securely through AK / SK authentication and image ID, and the SDK can be called. Based on the server information recorded in the configuration file, idle servers can be destroyed or servers not listed can be created for scaling down or scaling up.

[0075] Furthermore, after step 105, the following steps are also included:

[0076] 106. Write the server information for expansion or reduction into the configuration file to obtain a new configuration file.

[0077] In this embodiment, by collecting the load information of the monitored server data processing, comparing the load information with a preset load level, a first comparison result is obtained. A count is then performed on the first comparison result to obtain a count value. This count value is then compared with a preset count value to obtain a second comparison result. Based on the second comparison result and a preset configuration file, a scaling-up or scaling-down command is sent to a preset cloud server for execution, obtaining the corresponding server information for scaling up or scaling down. The server information for scaling up or scaling down is received, and the corresponding server is configured to balance the load. This achieves automatic and dynamic scaling up or down based on the host server's load, ensuring the host server's load remains balanced. This effectively ensures the stable operation of the host server while reducing the effort and time required for manual monitoring by maintenance personnel, lowering maintenance costs, and improving maintenance efficiency.

[0078] The above describes the dynamic expansion or contraction method in the embodiments of the present invention. The following describes the dynamic expansion or contraction device in the embodiments of the present invention. Please refer to [link / reference]. Figure 6 One embodiment of the dynamic expansion or contraction device in this invention includes:

[0079] The acquisition module 201 is used to acquire load information of the monitored server processing data;

[0080] The first comparison module 202 is used to compare the load information with the preset load level to obtain a first comparison result, and to count the first comparison result to obtain a count value.

[0081] The second comparison module 203 is used to compare the count value with the preset number of times to obtain a second comparison result;

[0082] The expansion or reduction module 204 is used to send expansion or reduction instructions to the preset cloud server for execution based on the second comparison result and the preset configuration file, so as to obtain the corresponding expansion or reduction server information.

[0083] The execution module 205 is used to receive the server information for expansion or reduction and configure the corresponding server to balance the load.

[0084] In another embodiment of the dynamic expansion or reduction device of the present invention, the dynamic expansion or reduction device includes:

[0085] The acquisition module 201 is used to acquire load information of the monitored server processing data;

[0086] The first comparison module 202 is used to compare the load information with the preset load level to obtain a first comparison result, and to count the first comparison result to obtain a count value.

[0087] The second comparison module 203 is used to compare the count value with the preset number of times to obtain a second comparison result;

[0088] The expansion or reduction module 204 is used to send expansion or reduction instructions to the preset cloud server for execution based on the second comparison result and the preset configuration file, so as to obtain the corresponding expansion or reduction server information.

[0089] The execution module 205 is used to receive the server information for expansion or reduction and configure the corresponding server to balance the load.

[0090] Specifically, the first comparison module 202 can also perform the following:

[0091] Determine whether the load information is greater than the preset load level;

[0092] If so, mark the memory list data in the load information with a True flag, and count the True flags to obtain the expansion count value;

[0093] If not, mark the memory list data in the load information with a False flag, and count the False flags to obtain the count value of the shrinkage.

[0094] Specifically, the statement "If so, mark the memory list data in the load information with a True flag and count the True flags to obtain the expansion count value" can also be executed as follows:

[0095] Determine if this is the first time it has been triggered;

[0096] If so, then the expansion information is obtained;

[0097] If not, mark the True flag in the memory list data of the load information and count the True flags.

[0098] Specifically, the second comparison module 203 can also perform the following:

[0099] Determine whether the count value of the expansion or the count value of the reduction is greater than a preset number of times;

[0100] If so, then information on expansion or reduction will be obtained;

[0101] If not, continue to mark the memory list data in the load information with a True or False flag.

[0102] Specifically, the expansion or reduction module 204 can also perform the following:

[0103] Read the user's AK / SK, image ID, and pre-configured configuration file, and call the pre-configured cloud server's SDK to create or destroy the connection to the corresponding server.

[0104] Prior to execution module 205, the following are also included:

[0105] The server information for scaling up or down is written into the configuration file to obtain a new configuration file. This server information includes the server IP address, the collected metrics, the collection interval, and verification information.

[0106] In this embodiment, by collecting the load information of the monitored server data processing, comparing the load information with a preset load level, a first comparison result is obtained. A count is then performed on the first comparison result to obtain a count value. This count value is then compared with a preset count value to obtain a second comparison result. Based on the second comparison result and a preset configuration file, a scaling-up or scaling-down command is sent to a preset cloud server for execution, obtaining the corresponding server information for scaling up or scaling down. The server information for scaling up or scaling down is received, and the corresponding server is configured to balance the load. This achieves automatic and dynamic scaling up or down based on the host server's load, ensuring the host server's load remains balanced. This effectively ensures the stable operation of the host server while reducing the effort and time required for manual monitoring by maintenance personnel, lowering maintenance costs, and improving maintenance efficiency.

[0107] The above is attached Figure 6 The dynamic expansion or reduction device in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The dynamic expansion or reduction device in the embodiments of the present invention will be described in detail from the perspective of hardware processing.

[0108] Appendix Figure 7 This is a schematic diagram of a dynamic expansion or reduction device 300 provided in an embodiment of the present invention. The dynamic expansion or reduction device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the dynamic expansion or reduction device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations on the storage media 330 on the dynamic expansion or reduction device 300.

[0109] The dynamic expansion or contraction device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and one or more operating systems 331, such as Windows Server, MacOSX, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 7 The illustrated structure of the dynamic expansion or reduction device does not constitute a limitation on the dynamic expansion or reduction device. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0110] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the dynamic expansion or contraction method and system.

[0111] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0112] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0113] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for dynamic expansion or contraction independent of K8S, characterized in that, The method comprises the following steps: collecting load information of a monitored server processing data; the load information comprises load conditions of CPU, memory, io and disk space, and the load information is collected by a monitoring module; comparing the load information with a preset load degree to obtain a first comparison result, and counting on the first comparison result to obtain a count value; the preset load degree is customized according to user demand and user state of a used server; the comparison of the load information with the preset load degree is a comparison of average load of the load conditions of CPU, memory, io and disk space of the server with the preset load degree; comparing the count value with a preset times value to obtain a second comparison result; sending a capacity expansion or capacity reduction instruction to a preset cloud server according to the second comparison result and a preset configuration file to obtain corresponding server information of capacity expansion or capacity reduction; receiving the server information of capacity expansion or capacity reduction, configuring corresponding servers to balance load, and processing the execution end of the capacity expansion and capacity reduction of the server by using a python language; message delivery and reception between the monitoring module and the python language adopt an existing open source third-party component message queue; the comparison of the load information with the preset load degree to obtain the first comparison result and the counting on the first comparison result to obtain the count value comprises: determining whether the load information is greater than the preset load degree; if yes, marking True in memory list data in the load information, and counting the True to obtain a count value of capacity expansion; if no, marking False in the memory list data in the load information, and counting the False to obtain a count value of capacity reduction; if yes, marking True in the memory list data in the load information, and counting the True to obtain the count value of capacity expansion comprises: determining whether it is the first time to trigger; if yes, obtaining capacity expansion information and performing capacity expansion operation; if no, marking True in the memory list data in the load information, and counting the True; the comparison of the count value with the preset times value to obtain the second comparison result comprises: determining whether the count value of capacity expansion or the count value of capacity reduction is greater than the preset times value; if yes, obtaining capacity expansion or capacity reduction information; if no, continuing to mark True or False in the memory list data in the load information; the sending of the capacity expansion or capacity reduction instruction to the preset cloud server according to the second comparison result and the preset configuration file to obtain the corresponding server information of capacity expansion or capacity reduction comprises: reading AK / SK, image id and a preset configuration file of a user, and calling an SDK of a preset cloud server to create or destroy a connection of a corresponding server. After receiving the expanded or contracted server information, the method further comprises: writing the expanded or contracted server information into the configuration file to obtain a new configuration file; the expanded or contracted server information comprises server IP, collected indicators, collection interval time, and verification information.

2. A device for dynamic expansion or contraction independent of K8S, characterized in that, The K8S-independent dynamic expansion or contraction device comprises: a collection module, configured to collect load information of a server processing data, the load information comprising load conditions of CPU, memory, io, and disk space, and the load information is collected by a monitoring module; a first comparison module, configured to compare the load information with a preset load degree to obtain a first comparison result, and count the first comparison result to obtain a count value, the preset load degree being customized according to user demand and a server state used by the user, and the comparison of the load information with the preset load degree is a comparison of average loads of the load conditions of CPU, memory, io, and disk space of the server with the preset load degree; a second comparison module, configured to compare the count value with a preset times value to obtain a second comparison result; an expansion or contraction module, configured to send an expansion or contraction instruction to a preset cloud server according to the second comparison result and a preset configuration file to obtain corresponding expanded or contracted server information; an execution module, configured to receive the expanded or contracted server information, and configure corresponding servers to balance loads, and the execution end of the expansion and contraction of the servers is processed by using a python language, and message delivery and reception between the monitoring module and the python language are performed by using an existing open-source third-party component message queue; the first comparison module can further perform: determining whether the load information is greater than the preset load degree; if yes, marking True in memory list data in the load information, and counting the True to obtain an expansion count value; if no, marking False in the memory list data in the load information, and counting the False to obtain a contraction count value; if yes, marking True in the memory list data in the load information, and counting the True to obtain an expansion count value, the first comparison module can further perform: determining whether the memory list in the load information is empty; if yes, obtaining expansion information and performing an expansion operation; if no, marking True in the memory list data in the load information, and counting the True; the second comparison module can further perform: determining whether the expansion count value or the contraction count value is greater than the preset times value; if yes, obtaining expansion or contraction information; if no, continuing to mark True or False in the memory list data in the load information; the expansion or contraction module can further perform: Read the AK / SK of the user, the mirror id and the preset configuration file, call the SDK of the preset cloud server to create or destroy the connection of the corresponding server; After receiving the server information of the capacity expansion or reduction, configuring the corresponding server to balance the load, further comprising: writing the server information of the capacity expansion or reduction into the configuration file to obtain a new configuration file; the server information of the capacity expansion or reduction includes server ip, collected indicators, collection interval time and verification information.

3. A dynamic scaling device, characterized by, The dynamic capacity expansion or reduction device comprises a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected through a circuit; The at least one processor calls the instructions in the memory to enable the dynamic capacity expansion or reduction device to perform the K8S-independent dynamic capacity expansion or reduction method of claim 1.

4. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to realize the K8S-independent dynamic capacity expansion or reduction method of claim 1.

Citation Information

Patent Citations

  • Node management method and device, monitoring node and storage medium

    CN114500538A

  • Method and device for controlling virtualized broadband remote access server (VBRAS), and communication system

    WO2018001030A1