Cross-cloud capacity expansion method and related device
By monitoring the metric data of the private cloud and requesting instance creation from the public cloud when the expansion time is reached, the problem of resource waste in the private cloud is solved, and dynamic cross-cloud expansion and efficient load management are achieved.
Patent Information
- Application Number
- CN202411722793.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-28
AI Technical Summary
When idle node resources are reserved in the private cloud to deal with burst traffic, resource waste is high because the uncertainty of burst traffic causes idle node resources to be idle for most of the time.
By obtaining the metric monitoring data of the private cloud server, we can determine whether the preset expansion time has been reached. If the capacity expansion opportunity is reached, send an instance creation request to the public cloud server, create an application instance, and allocate traffic based on the number of application instances of the private and public clouds.
Dynamic cross-cloud expansion is achieved, effectively responding to peak loads, reducing resource waste and improving resource utilization.
Smart Images

Figure CN119603303A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud service technology, and in particular to a cross-cloud expansion method and related devices. Background Art
[0002] Kubernetes (K8s for short) can automate the deployment, expansion, and management of containers, making large-scale data processing (such as batch processing, stream processing, and machine learning) easier to deploy and manage. Therefore, enterprises build K8s clusters in private clouds to run applications.
[0003] At present, in order to cope with burst traffic of applications, it is necessary to reserve idle node resources in the private cloud. For example, physical machine resources can be built in advance. When burst traffic occurs, idle node resources can be used to build application instance pods to expand the K8s cluster. Due to the uncertainty of burst traffic, idle node resources are idle most of the time, resulting in a high waste of resources. Summary of the invention
[0004] In view of the above problems, this application provides a cross-cloud expansion method and related devices to achieve efficient dynamic expansion and cope with peak loads. The specific solution is as follows:
[0005] The first aspect of the present application provides a cross-cloud capacity expansion method, which is applied to a private cloud server, comprising:
[0006] Obtaining indicator monitoring data of a target server, and judging whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the target server includes the private cloud server, the indicator monitoring data includes a statistical value of at least one status indicator, and the expansion opportunity includes that a statistical value of at least one status indicator exceeds a preset statistical value threshold;
[0007] If the expansion opportunity is reached, an instance creation request is sent to the public cloud server, so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, an application instance is created and an instance creation success event is generated; the instance creation request is used to request the public cloud server to create at least one application instance;
[0008] If an instance creation success event of the public cloud server is monitored, a load parameter is calculated based on the load data of the private cloud server and the load data of the public cloud server, wherein the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud;
[0009] Based on the load parameters, traffic is allocated to each application instance of the private cloud server and the public cloud server.
[0010] In a possible implementation, the indicator monitoring data of the target server is obtained, including:
[0011] Acquire the state indicator sequence of the private cloud server through the private cloud monitoring system according to a preset statistical period, and acquire the state indicator sequence of the public cloud server through the public cloud server monitoring system, wherein the state indicator sequence includes the indicator values of each state indicator at each sampling moment in the statistical period arranged in time sequence;
[0012] Statistical analysis is performed on each of the state indicator sequences to obtain statistical values of each of the state indicators within the statistical period.
[0013] In a possible implementation, statistical analysis is performed on each of the state indicator sequences to obtain a statistical value of each of the state indicators within the statistical period, including:
[0014] For each of the state indicators, after removing the maximum value and the minimum value of the state indicator in the state indicator sequence, the arithmetic mean of the remaining indicator values of the state indicators is calculated to obtain the mean value of the state indicator; the statistical value includes the mean value.
[0015] In a possible implementation, if an instance creation success event of the public cloud server is monitored, a load parameter is calculated based on the load data of the private cloud server and the load data of the public cloud server, including:
[0016] The public cloud monitoring system monitors the public cloud logs. If a successful instance creation event of the public cloud server is monitored, the application instance status check task is started. If it is checked that the application instance is started successfully, the ratio of the number of application instances on the private cloud server to the number of application instances on the public cloud server is calculated, and the ratio is used as the load parameter.
[0017] In a possible implementation, the cross-cloud capacity expansion method further includes:
[0018] If an instance creation suspension event is monitored, a public cloud interface is called to create a virtual machine node in the public cloud server, so that the public cloud server creates an application instance in the virtual machine node and generates an instance creation success event.
[0019] A second aspect of the present application provides a cross-cloud capacity expansion system, including: a private cloud server and a public cloud server;
[0020] The private cloud server is used to: obtain the indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that the statistical value of at least one state indicator exceeds a preset statistical value threshold; if the expansion opportunity has been reached, send an instance creation request to the public cloud server; the instance creation request is used to request the public cloud server to create at least one application instance;
[0021] The public cloud server is used to: in response to the instance creation request, determine whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance, and if so, create the application instance and generate an instance creation success event;
[0022] The private cloud server is used to: if it monitors an event of successful instance creation of the public cloud server, calculate the load parameter based on the load data of the private cloud server and the load data of the public cloud server, the load data including the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud; allocate traffic to each application instance of the private cloud server and the public cloud server based on the load parameter.
[0023] A third aspect of the present application provides a cross-cloud capacity expansion device, including:
[0024] A data monitoring unit, used to obtain indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that a statistical value of at least one state indicator exceeds a preset statistical value threshold;
[0025] An instance request unit is used to send an instance creation request to a public cloud server if the expansion opportunity is reached, so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, an application instance is created and an instance creation success event is generated; the instance creation request is used to request the public cloud server to create at least one application instance;
[0026] A load calculation unit, configured to calculate a load parameter based on the load data of the private cloud server and the load data of the public cloud server if an instance creation success event of the public cloud server is monitored, wherein the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud;
[0027] The load balancing unit is used to distribute traffic to each application instance of the private cloud server and the public cloud server based on the load parameters.
[0028] The fourth aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the cross-cloud capacity expansion method of the above-mentioned first aspect or any implementation method of the first aspect.
[0029] A fifth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0030] The memory is used to store computer programs;
[0031] The processor is used to execute the computer program so that the electronic device can implement the cross-cloud capacity expansion method of the above-mentioned first aspect or any implementation method of the first aspect.
[0032] In a sixth aspect, the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the cross-cloud expansion method of the above-mentioned first aspect or any implementation method of the first aspect.
[0033] By means of the above technical scheme, the cross-cloud expansion method and related devices provided by the present application obtain the indicator monitoring data of the private cloud server, and determine whether the preset expansion time has been reached based on the indicator monitoring data. If the expansion time has been reached, an instance creation request is sent to the public cloud server. If a successful instance creation event of the public cloud is monitored, the load parameters are calculated based on the load data of the private cloud and the load data of the public cloud. Traffic is allocated to each application instance of the private cloud and the public cloud based on the load parameters. Among them, the indicator monitoring data includes the statistical value of at least one status indicator, and the expansion time includes the statistical value of at least one status indicator exceeding the preset statistical value threshold. That is, the present application automatically requests the public cloud to build an application instance when the statistical value of at least one status indicator exceeds the preset statistical value threshold, and allocates traffic based on the ratio of the number of application instances of the private cloud to the public cloud, so as to realize dynamic cross-cloud expansion and cope with peak loads. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0035] Figure 1 A schematic diagram of a private cloud cluster architecture deployment provided for this application;
[0036] Figure 2 A flowchart of a cross-cloud expansion method provided for this application;
[0037] Figure 3 A schematic diagram of the structure of a cross-cloud expansion system provided for this application;
[0038] Figure 4 A schematic diagram of a specific implementation process of a cross-cloud expansion method provided in this application;
[0039] Figure 5 A schematic diagram of a cross-cloud cluster architecture deployment provided for this application;
[0040] Figure 6 A schematic diagram of the structure of a cross-cloud expansion device provided in this application;
[0041] Figure 7 A schematic diagram of the structure of an electronic device provided in this application;
[0042] Figure 8 A schematic diagram of the structure of a cross-cloud capacity expansion system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0044] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0045] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0046] The cross-cloud expansion method provided in the embodiment of the present application is applied to a scenario where a private cloud server constructs an instance application by scheduling node resources of a public cloud to realize cross-cloud expansion. Figure 1The following is an example of a cluster architecture deployed on a private cloud server: Figure 1 As shown in the figure, the private cloud server is deployed in the local data center, and the Kubernetes cluster architecture is deployed in the local data center. The Kubernetes cluster architecture includes the elastic load balancer ELB (Elastic Load Balance) and the distributed node Node. A node includes the routing unit ingress and the distributed application instance, that is, the application Pod ( Figure 1 Take only three application pods as an example), where ELB provides traffic distribution control services, allocates traffic to each application instance based on the balancing configuration parameters to achieve load balancing, and ingress routes the traffic allocated by ELB to the corresponding application Pod.
[0047] based on Figure 1 In the architecture shown, a user initiates an access request for a domain name at the user end, and the user end uploads the access request to the private cloud server where the local data center is located. ELB automatically distributes the access request to the ingress in the node based on the current network status and resource conditions, and the ingress routes the access request to the corresponding application Pod, so that the user end can access the specific application service according to the domain name to achieve load balancing.
[0048] based on Figure 1 The architecture shown can automatically build new application instances in the local data center and perform load balancing through ELB to cope with burst traffic. However, due to the limited resources of the private cloud, it is difficult to cope with burst traffic, and there are still network congestion conditions such as excessive occupancy caused by burst traffic.
[0049] In order to solve the above problems, an embodiment of the present application provides a cross-cloud capacity expansion method. The present application can be applied to a private cloud server. The cross-cloud capacity expansion method of an embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0050] Reference Figure 2 , Figure 2 A schematic diagram of a cross-cloud expansion method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, a data processing method provided in an embodiment of the present application may include steps S201 to S203, and these steps are described in detail below.
[0051] S201. Obtain indicator monitoring data of the target server, and determine whether a preset capacity expansion opportunity has been reached based on the indicator monitoring data.
[0052] In this embodiment, the target monitoring end includes a private cloud server. The indicator monitoring data includes a statistical value of at least one state indicator.
[0053] In this embodiment, the capacity expansion opportunity includes when a statistical value of at least one state indicator exceeds a preset statistical value threshold.
[0054] In an optional embodiment, the target monitoring end also includes a public cloud service end, and the indicator monitoring data of the target service end includes the memory utilization rate and CPU utilization rate of the private cloud, and also includes the memory utilization rate and CPU utilization rate of the public cloud. If the statistical value of any one of the memory utilization rate and CPU utilization rate of the private cloud and the memory utilization rate and CPU utilization rate of the public cloud exceeds the corresponding statistical value threshold, it is determined that the time for capacity expansion has arrived. For example, the statistical value includes a mean, and the mean is obtained by averaging the status indicators within the statistical period. When the mean value of the memory utilization rate of the private cloud exceeds the utilization rate threshold, it indicates that there is a load peak, and it is determined that the time for capacity expansion has arrived.
[0055] S202: If the time for capacity expansion has arrived, send an instance creation request to the public cloud server.
[0056] In this embodiment, the instance creation request is used to request the public cloud server to create at least one application instance. The private cloud server sends the instance creation request to the public cloud server so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, the application instance is created and an instance creation success event is generated.
[0057] S203: If an instance creation success event of the public cloud server is monitored, the load parameters are calculated based on the load data of the private cloud server and the load data of the public cloud server.
[0058] In this embodiment, the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances on the private cloud server to the number of application instances on the public cloud server.
[0059] In an optional embodiment, the load parameter is equal to the ratio of the number of application instances on the private cloud service end to the number of application instances on the public cloud service end.
[0060] S204: Allocate traffic to each application instance of the private cloud server and the public cloud server based on the load parameters.
[0061] In an optional embodiment, the load parameter is equal to the ratio of the number of application instances on the private cloud server to the number of application instances on the public cloud server. Based on the ratio, traffic is allocated to each application instance on the private cloud server and the public cloud server.
[0062] It can be seen from the above technical scheme that a cross-cloud expansion method provided by an embodiment of the present application obtains the indicator monitoring data of the private cloud server, and determines whether the preset expansion opportunity has been reached based on the indicator monitoring data. If the expansion opportunity has been reached, an instance creation request is sent to the public cloud server. If the instance creation success event of the public cloud server is monitored, the load parameters are calculated based on the load data of the private cloud server and the load data of the public cloud server. Based on the load parameters, traffic is allocated to each application instance of the private cloud server and the public cloud server. Among them, the indicator monitoring data includes the statistical value of at least one state indicator, and the expansion opportunity includes the statistical value of at least one state indicator exceeding the preset statistical value threshold. That is, the present application automatically requests the public cloud server to build an application instance when the statistical value of at least one state indicator exceeds the preset statistical value threshold, and allocates traffic based on the proportion of the number of application instances of the private cloud server and the public cloud server, and adapts to changes in business needs through dynamic cross-cloud expansion to cope with peak loads.
[0063] In a possible implementation, the cross-cloud capacity expansion method provided in the embodiment of the present application is applied to a cross-cloud capacity expansion system. Figure 3 The following is a schematic diagram of the specific structure of a cross-cloud expansion system. Figure 3 As shown, the cross-cloud expansion system includes a workbench, a monitoring system and a cross-cloud load balancer deployed on a private cloud server, and a monitoring system deployed on a public cloud server, wherein a data aggregation module and an intelligent scheduling engine are deployed in the workbench.
[0064] based on Figure 3 The cross-cloud capacity expansion system shown in the figure, the embodiment of the present application provides a specific implementation method of the cross-cloud capacity expansion method, Figure 4 A specific implementation process of a cross-cloud expansion method provided in an embodiment of the present application is as follows: Figure 4 As shown, this method specifically includes:
[0065] S401. The data aggregation module obtains the status indicator sequence of the private cloud server through the private cloud server monitoring system according to the preset statistical period, and obtains the status indicator sequence of the public cloud server through the public cloud server monitoring system.
[0066] In this embodiment, the statistical period includes multiple sampling moments, and the state indicator sequence includes indicator values of each preset state indicator at each sampling moment in the statistical period arranged in time sequence, wherein the state indicator includes memory usage and / or CPU usage.
[0067] In this embodiment, the monitoring system collects the indicator values of various status indicators according to the preset collection frequency by embedding points on the corresponding cloud service end.
[0068] In this embodiment, the Prometheus monitoring system deployed in the private cloud server is embedded in the private cloud server to collect the CPU usage and memory usage of the private cloud server once a minute, with every 6 minutes as a statistical period. The data aggregation module obtains the CPU usage and memory usage of the private cloud server collected by the monitoring system at 6 collection times every 6 minutes, and arranges the CPU usage in the order of collection times to obtain the CPU usage sequence corresponding to the statistical period, and arranges the memory usage in the order of collection times to obtain the memory usage sequence corresponding to the statistical period.
[0069] In this embodiment, the Prometheus monitoring system deployed in the public cloud server is embedded in the public cloud server to collect the CPU usage and memory usage of the public cloud server once a minute, with every 6 minutes as a statistical period. The data aggregation module obtains the CPU usage and memory usage of the public cloud server collected by the monitoring system at 6 collection times every 6 minutes, and arranges the CPU usage in the order of collection times to obtain the CPU usage sequence corresponding to the statistical period, and arranges the memory usage in the order of collection times to obtain the memory usage sequence corresponding to the statistical period.
[0070] It should be noted that the data aggregation module obtains the monitoring data of the Prometheus monitoring system deployed in the public cloud server through a pre-built secure communication interface.
[0071] S402: The data aggregation module performs statistical analysis on each state indicator sequence to obtain multiple statistical values of each state indicator within a statistical period.
[0072] In this embodiment, the statistical values include mean, extreme value, and rate of change. The method for calculating the mean includes: after removing the maximum value and the minimum value, calculating the arithmetic mean of the remaining indicator values as the mean.
[0073] S403: The data aggregation module determines whether a preset expansion condition is triggered based on the statistical values of each status indicator.
[0074] In this embodiment, the expansion condition includes that the indicator value of any status indicator of the private cloud server exceeds the corresponding indicator threshold.
[0075] For example, when the average CPU usage of the private cloud server is greater than the preset average threshold, it means that the CPU usage of the private cloud server exceeds the limit during the statistical period, triggering the expansion condition.
[0076] S404: If the expansion condition is triggered, the data aggregation module sends an instance creation request to the public cloud server.
[0077] S405: The public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance.
[0078] S406: If yes, the public cloud server creates an application instance and generates an application instance creation success event.
[0079] S407. If not, the public cloud server generates an instance creation suspension event and starts timing, and restarts S405 when the creation time of the preset creation cycle is reached, until the application instance is successfully created, and generates an instance creation success event.
[0080] S408. The intelligent scheduling engine monitors the public cloud server log through the monitoring system of the public cloud server. If an instance creation suspension event is monitored, the public cloud interface is called to create a virtual machine node in the public cloud server, and the resources of the virtual machine node are added to the scheduling resource pool.
[0081] In this embodiment, the intelligent scheduling engine monitors the public cloud server log through the monitoring system of the public cloud server. If an instance creation suspension event is monitored, a node creation instruction is sent to the public cloud server, so that the public cloud server responds to the node creation instruction to create a virtual machine node and generates a node creation success event. After the intelligent scheduling engine monitors the node creation success event through the monitoring system of the public cloud server, the resources of the virtual machine node are added to the scheduling resource pool.
[0082] S409: After the intelligent scheduling engine monitors the instance creation success event, it starts the application instance status check task to check whether the application instance is started successfully.
[0083] S410. After determining that the application instance is successfully started, the intelligent scheduling engine calculates the load parameters based on at least the number of application instances deployed in the private cloud server and the number of application instances deployed in the shared cloud, and configures the load parameters to the public balancer ELB.
[0084] In this embodiment, the load parameter is equal to the ratio of the number of application instances deployed in the private cloud server to the number of application instances deployed in the shared cloud.
[0085] S411. The public balancer adjusts the traffic allocated to the application instance of the private cloud server and the application instance of the public cloud server based on the load parameters.
[0086] It can be seen from the above technical solutions that the cross-cloud expansion method provided by the embodiment of the present application deploys an intelligent scheduling engine in the workbench of the private cloud server to monitor the resource changes of the public cloud server based on event monitoring. The load parameter is generated by the ratio of the number of application instances of the private cloud server and the public cloud server, and based on the ratio indicated by the load parameter, the ratio of the traffic allocated to the private cloud server and the public cloud server is adjusted to realize the dynamic load of the traffic, so as to achieve the purpose of the application instance of the public cloud server sharing the traffic pressure of the application instance of the private cloud server.
[0087] Figure 4 This is only an optional specific implementation method of a cross-cloud expansion method provided in an embodiment of the present application. The present application can also be implemented through other specific implementation methods. In another optional embodiment, the method also includes: the data aggregation module monitors the load status of the public load balancer and each node load balancer through a private cloud server-side monitoring system, and obtains the load indicators of the public load balancer and each node load balancer according to the statistical period. The load indicators include response time, throughput, number of concurrent connections, etc. Then, the expansion condition also includes the absence of load imbalance. Specifically, Figure 5 A schematic diagram of a cross-cloud cluster architecture deployment provided for this application, such as Figure 5 As shown in the figure, the cross-cloud cluster architecture includes the following Figure 3 The cross-cloud expansion system and the cluster architecture built by the cross-cloud expansion system are shown. The cluster architecture includes the machine node Node (virtual machine node or physical machine node) created in the private cloud server and the corresponding node load balancer ELB, and also includes the virtual machine node Node expanded in the public cloud server and the corresponding node load balancer LB. Among them, two application Pods are deployed in the machine node Node created in the private cloud server.
[0088] Reference Figure 5 The process of implementing cluster architecture deployment based on the cross-cloud expansion method provided in the embodiment of the present application includes:
[0089] The Prometheus monitoring system deployed in the cloud server is embedded in the cloud to collect CPU usage and memory usage once a minute. The data aggregation module obtains the CPU usage and memory usage collected by each monitoring system at 6 collection times every 6 minutes, and arranges the CPU usage in the order of collection time to obtain the CPU usage sequence corresponding to the statistical period, and arranges the memory usage in the order of collection time to obtain the memory usage sequence corresponding to the statistical period.
[0090] The data aggregation module performs statistical analysis on the memory usage sequence, CPU usage sequence and load index of the public load balancer of the private cloud server, and obtains the mean of the memory usage sequence and the mean of the CPU usage within the statistical period. It is determined that the mean of the memory usage sequence exceeds the memory usage threshold and the load index of the public load balancer does not meet the load imbalance condition, and whether the expansion condition is triggered. The data aggregation module sends an instance creation request to the public cloud server. In response to the instance creation request, the public cloud server determines that the available remaining resources of each virtual machine node are not greater than the resources required to create the instance, and generates an instance creation suspension event. The intelligent scheduling engine monitors the public cloud server log through the public cloud server's monitoring system. When it monitors the instance creation suspension event, it calls the public cloud interface to create a virtual machine node in the public cloud server and adds the virtual machine resources to the scheduling resource pool. The public cloud server starts the instance creation task indicated by the instance creation suspension event according to the creation cycle. If it is determined that the available remaining resources of the virtual machine node are greater than the resources required to create the instance, an application instance is created in the virtual machine node Node, such as Figure 5 As shown, a virtual machine node Node is created in the public cloud server, and two application instances are created in the virtual machine node Node to achieve resource expansion to cope with traffic peaks.
[0091] The above introduces a cross-cloud capacity expansion method provided by an embodiment of the present application. The following will introduce a device for executing the above-mentioned cross-cloud capacity expansion method.
[0092] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a cross-cloud expansion device provided in an embodiment of the present application. Figure 6 As shown, the cross-cloud capacity expansion device 600 includes:
[0093] The data monitoring unit 601 is used to obtain the indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that the statistical value of at least one state indicator exceeds a preset statistical value threshold;
[0094] The instance request unit 602 is used to send an instance creation request to the public cloud server if the expansion opportunity is reached, so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, create an application instance and generate an instance creation success event; the instance creation request is used to request the public cloud server to create at least one application instance;
[0095] A load calculation unit 603 is used to calculate a load parameter based on the load data of the private cloud server and the load data of the public cloud server if an instance creation success event of the public cloud server is monitored, wherein the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud;
[0096] The load balancing unit 604 is used to distribute traffic to each application instance of the private cloud server and the public cloud server based on the load parameters.
[0097] In a possible implementation, when the data monitoring unit is used to obtain the indicator monitoring data of the target server, it is specifically used to:
[0098] Acquire the state indicator sequence of the private cloud server through the private cloud monitoring system according to a preset statistical period, and acquire the state indicator sequence of the public cloud server through the public cloud server monitoring system, wherein the state indicator sequence includes the indicator values of each state indicator at each sampling moment in the statistical period arranged in time sequence;
[0099] Statistical analysis is performed on each of the state indicator sequences to obtain statistical values of each of the state indicators within the statistical period.
[0100] In a possible implementation, the data monitoring unit is used to perform statistical analysis on each of the state indicator sequences respectively, and when obtaining the statistical value of each of the state indicators in the statistical period, specifically to:
[0101] For each of the state indicators, after removing the maximum value and the minimum value of the state indicator in the state indicator sequence, the arithmetic mean of the remaining indicator values of the state indicators is calculated to obtain the mean value of the state indicator; the statistical value includes the mean value.
[0102] In a possible implementation, the instance request unit is used to calculate the load parameter based on the load data of the private cloud server and the load data of the public cloud server if monitoring the instance creation success event of the public cloud server:
[0103] The public cloud monitoring system monitors the public cloud logs. If a successful instance creation event of the public cloud server is monitored, the application instance status check task is started. If it is checked that the application instance is started successfully, the ratio of the number of application instances on the private cloud server to the number of application instances on the public cloud server is calculated, and the ratio is used as the load parameter.
[0104] In a possible implementation, the cross-cloud capacity expansion device also includes a node request unit, which is used to: if an instance creation suspension event is monitored, call the public cloud interface to create a virtual machine node in the public cloud server, so that the public cloud server creates an application instance in the virtual machine node and generates an instance creation success event.
[0105] The present application also provides an electronic device in an embodiment. Figure 7 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to a server such as a single point cloud server or a server cluster. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0106] like Figure 7 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0107] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a memory card, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] The present application also provides a cross-cloud expansion system. Figure 8 A schematic diagram of the structure of a cross-cloud expansion system provided in an embodiment of the present application is shown in FIG. Figure 8As shown, the cross-cloud expansion system 800 includes: a private cloud server 801 and a public cloud server 802; wherein the private cloud server is used to: obtain the indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that a statistical value of at least one state indicator exceeds a preset statistical value threshold; if the expansion opportunity has been reached, an instance creation request is sent to the public cloud server; the instance creation request is used to request the public cloud server to create at least one application instance;
[0109] The public cloud server is used to: in response to the instance creation request, determine whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance, and if so, create the application instance and generate an instance creation success event;
[0110] The private cloud server is used to: if it monitors an event of successful instance creation of the public cloud server, calculate the load parameter based on the load data of the private cloud server and the load data of the public cloud server, the load data including the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud; allocate traffic to each application instance of the private cloud server and the public cloud server based on the load parameter.
[0111] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any cross-cloud capacity expansion method provided in the embodiment of the present application.
[0112] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any cross-cloud expansion method provided in an embodiment of the present application.
[0113] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0114] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0115] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0116] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A cross-cloud capacity expansion method, characterized in that: Applied to private cloud servers, including: Obtaining indicator monitoring data of a target server, and judging whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the target server includes the private cloud server, the indicator monitoring data includes a statistical value of at least one status indicator, and the expansion opportunity includes that a statistical value of at least one status indicator exceeds a preset statistical value threshold; If the expansion opportunity is reached, an instance creation request is sent to the public cloud server, so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, an application instance is created and an instance creation success event is generated; the instance creation request is used to request the public cloud server to create at least one application instance; If an instance creation success event of the public cloud server is monitored, a load parameter is calculated based on the load data of the private cloud server and the load data of the public cloud server, wherein the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud; Based on the load parameters, traffic is allocated to each application instance of the private cloud server and the public cloud server.
2. The cross-cloud capacity expansion method according to claim 1, characterized in that: Obtain the target server's indicator monitoring data, including: Acquire the state indicator sequence of the private cloud server through the private cloud monitoring system according to a preset statistical period, and acquire the state indicator sequence of the public cloud server through the public cloud server monitoring system, wherein the state indicator sequence includes the indicator values of each state indicator at each sampling moment in the statistical period arranged in time sequence; Statistical analysis is performed on each of the state indicator sequences to obtain statistical values of each of the state indicators within the statistical period.
3. The cross-cloud capacity expansion method according to claim 2, characterized in that: Performing statistical analysis on each of the state indicator sequences respectively to obtain statistical values of each of the state indicators within the statistical period includes: For each of the state indicators, after removing the maximum value and the minimum value of the state indicator in the state indicator sequence, the arithmetic mean of the remaining indicator values of the state indicators is calculated to obtain the mean value of the state indicator; the statistical value includes the mean value.
4. The cross-cloud capacity expansion method according to claim 1, characterized in that: If the instance creation success event of the public cloud server is monitored, the load parameter is calculated based on the load data of the private cloud server and the load data of the public cloud server, including: The public cloud monitoring system monitors the public cloud logs. If a successful instance creation event of the public cloud server is monitored, the application instance status check task is started. If it is checked that the application instance is started successfully, the ratio of the number of application instances on the private cloud server to the number of application instances on the public cloud server is calculated, and the ratio is used as the load parameter.
5. The cross-cloud capacity expansion method according to claim 1, characterized in that: The cross-cloud capacity expansion method further includes: If an instance creation suspension event is monitored, a public cloud interface is called to create a virtual machine node in the public cloud server, so that the public cloud server creates an application instance in the virtual machine node and generates an instance creation success event.
6. A cross-cloud capacity expansion system, characterized in that: include: Private cloud server and public cloud server; The private cloud server is used to: obtain the indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that the statistical value of at least one state indicator exceeds a preset statistical value threshold; if the expansion opportunity has been reached, send an instance creation request to the public cloud server; The instance creation request is used to request the public cloud server to create at least one application instance; The public cloud server is used to: in response to the instance creation request, determine whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance, and if so, create the application instance and generate an instance creation success event; The private cloud server is used to: if it monitors an event of successful instance creation of the public cloud server, calculate the load parameter based on the load data of the private cloud server and the load data of the public cloud server, the load data including the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud; allocate traffic to each application instance of the private cloud server and the public cloud server based on the load parameter.
7. A cross-cloud capacity expansion device, characterized in that: Applied to private cloud servers, including: A data monitoring unit, used to obtain indicator monitoring data of the target server, and determine whether a preset expansion opportunity has been reached based on the indicator monitoring data, wherein the indicator monitoring data includes a statistical value of at least one state indicator, and the expansion opportunity includes that a statistical value of at least one state indicator exceeds a preset statistical value threshold; An instance request unit is used to send an instance creation request to a public cloud server if the expansion opportunity is reached, so that the public cloud server responds to the instance creation request and determines whether the available remaining resources of each virtual machine node are greater than the resources required to create the instance. If so, an application instance is created and an instance creation success event is generated; the instance creation request is used to request the public cloud server to create at least one application instance; A load calculation unit, configured to calculate a load parameter based on the load data of the private cloud server and the load data of the public cloud server if an instance creation success event of the public cloud server is monitored, wherein the load data includes the number of application instances, and the load parameter is positively correlated with the ratio of the number of application instances of the private cloud to the number of application instances of the public cloud; A load balancing unit is used to distribute traffic to each application instance of the private cloud server and the public cloud server based on the load parameters.
8. A computer program product, characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the cross-cloud capacity expansion method as described in any one of claims 1 to 5.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the cross-cloud capacity expansion method as described in any one of claims 1 to 5.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the cross-cloud capacity expansion method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
System and method for automatically and elastically expanding and contracting resources, and cloud platform
CN111796908A
Elastic expansion and contraction method, device and equipment in multi-cloud environment and medium
CN113760516A
Hybrid cloud elastic scaling method and device, equipment and storage medium
CN115208891A
Multi-cluster system and elastic scaling method therefor, computing device cluster, and medium
WO2024169786A1
Cited By
Intelligent shift switching method and system for after-class service
CN120474917A
Elastic capacity expansion method and system for private cloud platform of industrial control software
CN121979691A