Scalable method, device and equipment of public cloud disaster recovery service cluster and storage medium
By monitoring service events and the expected number of compute nodes, the scale of the public cloud disaster recovery service cluster is dynamically adjusted, solving the problem of inflexible scaling of the public cloud disaster recovery service cluster and achieving efficient resource utilization and cost control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2026-04-10
AI Technical Summary
Existing public cloud disaster recovery service clusters are not flexible in scaling, leading to resource waste and increased costs.
By listening to service events, the system obtains service information and determines whether to execute a preset scaling strategy based on the information. It calculates the expected number of nodes, obtains the target number of nodes for comparison, and dynamically adjusts the scale of the public cloud disaster recovery service cluster.
It enables flexible scaling of public cloud disaster recovery service clusters, reducing resource waste and lowering costs.
Smart Images

Figure CN115237584B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a scaling method, device and equipment of a public cloud disaster recovery service cluster and a storage medium. BACKGROUND
[0002] Kubernetes container management platform (k8s container for short), is based on native kubernetes to provide high performance, scalable container management services with container as the core. It provides a series of complete functions such as rapid creation, efficient deployment, resource scheduling, service discovery, dynamic scaling and performance monitoring for containerized applications, so that development and operation focus on business systems themselves.
[0003] Before the peak of Kubernetes container, the peak capacity will be predicted, and the server will be purchased in advance to add to the original production resource pool to form a private cloud standby disaster recovery equipment. Specifically, when the application business peak period comes, the instance will be directly expanded on the production deployment unit of the private cloud standby disaster recovery equipment to realize load distribution and disperse node pressure, but after the peak period, because the expanded resources are mixed with the historical resources and cannot be recycled in time, etc., it leads to machine accumulation, resulting in resource waste and cost rise, so it is thought to deploy the container cluster to the public cloud cluster, but the use of the public cloud cluster needs to pay for the maintenance fee, how to flexibly control the scaling of the public cloud disaster recovery service cluster to reduce the waste of service resources has become a technical problem to be solved at present. SUMMARY
[0004] The present application provides a scaling method, device and equipment of a public cloud disaster recovery service cluster and a storage medium, aiming at solving the technical problem that the existing public cloud disaster recovery service cluster cannot be flexibly controlled to scale, resulting in waste of public cloud service resources.
[0005] In one aspect, the present application provides a scaling method of a public cloud disaster recovery service cluster, which comprises the following steps:
[0006] Listening to a service event, obtaining service information of the service event, and determining whether to execute a preset scaling strategy according to the service information;
[0007] If the preset scaling strategy is executed, the node quantity expected value is calculated according to the service information;
[0008] Obtaining the target node quantity corresponding to the service event, comparing the node quantity expected value with the target node quantity, and obtaining a comparison result;
[0009] According to the comparison result, the public cloud disaster recovery service cluster corresponding to the service information is scaled.
[0010] In some embodiments of the present application, before the step of monitoring the service event, obtaining service information of the service event, and determining whether to execute a preset scaling strategy according to the service information, the method comprises:
[0011] receiving a disaster recovery service creation request, obtaining production configuration information associated with the disaster recovery service creation request, and verifying service dependent resources according to the production configuration information;
[0012] If the service dependent resources pass the verification, the number of disaster recovery clusters required is determined according to the production configuration information;
[0013] Disaster recovery configuration information is configured according to the number of disaster recovery clusters required, and a public cloud disaster recovery service cluster is deployed in a pre-built public cloud bare metal resource pool based on the disaster recovery configuration information.
[0014] In some embodiments of the present application, the step of monitoring the service event, obtaining service information of the service event, and determining whether to execute a preset scaling strategy according to the service information comprises:
[0015] monitoring the service event, obtaining service information of the service event, and determining whether the service event is a deployment adjustment event according to the service information;
[0016] If the service event is a deployment adjustment event, it is determined whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event;
[0017] If the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, it is determined to execute a preset scaling strategy.
[0018] In some embodiments of the present application, after the step of determining whether the service event is a deployment adjustment event, and determining whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, the method comprises:
[0019] If the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, it is determined whether the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event;
[0020] If the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, the production service deployment item is adjusted according to the service information;
[0021] When it is detected that the production service deployment item adjustment is completed, the disaster recovery service deployment item corresponding to the production service deployment item is adjusted.
[0022] In some embodiments of the present application, the step of determining whether to execute the preset scaling strategy, and calculating a node quantity expected value according to the service information if the preset scaling strategy is executed, comprises:
[0023] If the preset scaling strategy is executed, a service service identifier in the service information is extracted;
[0024] A standard node quantity corresponding to the service service identifier is acquired, and a product of the standard node quantity and a preset adjustment coefficient is taken as a node quantity expectation value.
[0025] In some embodiments of the present application, the target node quantity corresponding to the service event is acquired, the node quantity expectation value is compared with the target node quantity, and a comparison result is obtained, including:
[0026] A service type in the service information is extracted, a node information pool corresponding to the service type is queried, a first node quantity with an active label is acquired, and a second node quantity with an application label is acquired;
[0027] The first node quantity and the second node quantity are taken as the target node quantity corresponding to the service event, and the node quantity expectation value is compared with the target node quantity, and a comparison result is obtained.
[0028] In some embodiments of the present application, the public cloud disaster recovery service cluster corresponding to the service information is scaled according to the comparison result, including:
[0029] If the comparison result is that the node quantity expectation value is greater than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is expanded according to the service information;
[0030] If the comparison result is that the node quantity expectation value is equal to the target node quantity, prompt information is outputted;
[0031] If the comparison result is that the node quantity expectation value is less than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is contracted according to the service information.
[0032] On the other hand, the present application also provides a scaling device of a public cloud disaster recovery service cluster, the scaling device of the public cloud disaster recovery service cluster including:
[0033] A listening acquisition module is configured to listen to a service event, acquire service information of the service event, and determine whether a preset scaling strategy is executed according to the service information;
[0034] An expectation calculation module is configured to calculate a node quantity expectation value according to the service information if the preset scaling strategy is executed;
[0035] An acquisition comparison module is configured to acquire a target node quantity corresponding to the service event, compare the node quantity expectation value with the target node quantity, and obtain a comparison result;
[0036] a cluster scaling module, configured to scale a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result.
[0037] In another aspect, the present application also provides a public cloud disaster recovery service cluster scaling device, which comprises:
[0038] one or more processors;
[0039] a memory; and
[0040] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the public cloud disaster recovery service cluster scaling method.
[0041] In another aspect, the present application also provides a storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the public cloud disaster recovery service cluster scaling method.
[0042] The public cloud disaster recovery service cluster scaling method provided by the present application comprises the following steps: listening to a service event, obtaining service information of the service event, determining whether to execute a preset scaling strategy according to the service information, calculating a node quantity expectation value according to the service information if the preset scaling strategy is executed, obtaining a target node quantity corresponding to the service event, comparing the node quantity expectation value with the target node quantity to obtain a comparison result, and scaling a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result. In the public cloud disaster recovery service cluster scaling method provided by the present application, the preset scaling strategy is determined by listening to a service event and according to service information corresponding to the service event. If the preset scaling strategy is executed, a node quantity expectation value is calculated, and a current target node quantity corresponding to the service information is obtained. The public cloud disaster recovery service cluster is scaled by comparing the node quantity expectation value with the target node quantity, so that the deployment of the public cloud disaster recovery service cluster is more in line with actual use requirements, the scaling of the public cloud disaster recovery service cluster is more flexible, and the waste of public cloud service resources is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] Figure 1 is a scene schematic diagram of the public cloud disaster recovery service cluster scaling provided by the present application.
[0045] Figure 2 Figure 1 is an embodiment flow diagram of a method for building a public cloud disaster recovery service cluster in the embodiment of the application;
[0046] Figure 3 Figure 2 is an embodiment flow diagram of a method for scaling a public cloud disaster recovery service cluster in the embodiment of the application;
[0047] Figure 4 Figure 3 is an embodiment flow diagram of determining to perform scaling of a public cloud disaster recovery service cluster in the embodiment of the method for scaling a public cloud disaster recovery service cluster in the embodiment of the application;
[0048] Figure 5 Figure 4 is an embodiment flow diagram of adjusting a disaster recovery service configuration item of a public cloud disaster recovery service cluster in the embodiment of the method for scaling a public cloud disaster recovery service cluster in the embodiment of the application;
[0049] Figure 6 Figure 5 is an embodiment flow diagram of calculating a node quantity expected value in the embodiment of the method for scaling a public cloud disaster recovery service cluster in the embodiment of the application;
[0050] Figure 7 Figure 6 is an embodiment structure diagram of a scaling device for a public cloud disaster recovery service cluster in the embodiment of the application;
[0051] Figure 8 Figure 7 is an embodiment structure diagram of a scaling device for a public cloud disaster recovery service cluster in the embodiment of the application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of the application.
[0053] In the description of the present application, it needs to be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first", "second" can be explicitly or implicitly included one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0054] In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration." Any implementation described as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, for purposes of explanation, specific details are set forth. It will be apparent to those skilled in the art that the present application can be practiced without the specific details. In other instances, well-known structures and processes are not elaborated in order not to obscure the description of the present application with unnecessary details. Thus, the present application is not intended to be limited by the embodiments shown, but is to be accorded with the widest scope consistent with the principles and features presented herein.
[0055] The present application provides a public cloud disaster recovery service cluster scaling method, device, equipment and storage medium, which are described in detail below.
[0056] The public cloud disaster recovery service cluster scaling method in the embodiments of the present application is applied to a public cloud disaster recovery service cluster scaling device, which is arranged in a public cloud disaster recovery service cluster scaling equipment. The public cloud disaster recovery service cluster scaling equipment is provided with one or more processors, a memory, and one or more application programs. The one or more application programs are stored in the memory and configured to be executed by the processor to realize the public cloud disaster recovery service cluster scaling method. The public cloud disaster recovery service cluster scaling equipment can be a terminal, such as a mobile phone or a tablet computer. The public cloud disaster recovery service cluster scaling equipment can also be a server or a service cluster composed of multiple servers.
[0057] As shown in Figure 1 , the public cloud disaster recovery service cluster scaling method comprises the following steps. Figure 1A scene diagram for the scalability of the public cloud disaster recovery service cluster is provided for the embodiments of the present application. The scalability scene of the public cloud disaster recovery service cluster in the embodiments of the present application includes a public cloud disaster recovery service cluster scalability device 100 (the public cloud disaster recovery service cluster scalability device 100 is integrated with a public cloud disaster recovery service cluster scalability apparatus) and a storage medium running the public cloud disaster recovery service cluster scalability corresponding to the public cloud disaster recovery service cluster scalability device 100, to perform the steps of the public cloud disaster recovery service cluster scalability.
[0058] It can be understood that, Figure 1 The public cloud disaster recovery service cluster scalability device in the illustrated public cloud disaster recovery service cluster scalability scene, or the apparatus included in the public cloud disaster recovery service cluster scalability device, does not constitute a limitation on the embodiments of the present application, that is, the number and types of devices included in the public cloud disaster recovery service cluster scalability scene, or the number and types of apparatuses included in each device, do not affect the overall implementation of the technical solutions in the embodiments of the present application, and can all be considered as equivalent replacements or derivatives of the technical solutions claimed in the embodiments of the present application.
[0059] The public cloud disaster recovery service cluster scalability device 100 in the embodiments of the present application is mainly used to listen to a service event, obtain service information of the service event, determine whether to execute a preset scalability strategy according to the service information, calculate a node quantity expectation value according to the service information if the preset scalability strategy is executed, obtain a target node quantity corresponding to the service event, compare the node quantity expectation value with the target node quantity, and obtain a comparison result, and scale a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result.
[0060] The public cloud disaster recovery service cluster scalability device 100 in the embodiments of the present application can be a standalone public cloud disaster recovery service cluster scalability device, or a public cloud disaster recovery service cluster scalability device network or a public cloud disaster recovery service cluster scalability device cluster composed of public cloud disaster recovery service cluster scalability devices. For example, the public cloud disaster recovery service cluster scalability device 100 described in the embodiments of the present application includes but is not limited to a computer, a network host, a single network public cloud disaster recovery service cluster scalability device, a plurality of network public cloud disaster recovery service cluster scalability devices, or a cloud public cloud disaster recovery service cluster scalability device composed of a plurality of public cloud disaster recovery service cluster scalability devices. The cloud public cloud disaster recovery service cluster scalability device is composed of a large number of computers or network public cloud disaster recovery service cluster scalability devices based on cloud computing.
[0061] Those skilled in the art can understand that, Figure 1The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The diagram shows more or fewer scaling devices for the public cloud disaster recovery service cluster, or the network connectivity of the scaling devices for the public cloud disaster recovery service cluster, for example... Figure 1 The diagram shows only one scaling device for a public cloud disaster recovery service cluster. It is understood that the scaling scenario for this public cloud disaster recovery service cluster may also include one or more scaling devices for other public cloud disaster recovery service clusters, which are not specifically limited here. The scaling device 100 of this public cloud disaster recovery service cluster may also include a storage device for storing data.
[0062] Furthermore, in the scaling scenario of the public cloud disaster recovery service cluster in this application, the scaling device 100 of the public cloud disaster recovery service cluster can be equipped with a display device, or the scaling device 100 can be connected to an external display device 200 without a display device. The display device 200 is used to output the results of the scaling method execution of the public cloud disaster recovery service cluster in the scaling device. The scaling device 100 of the public cloud disaster recovery service cluster can access the background database 300 (the background database can be located in the local storage of the scaling device, or it can be located in the cloud). The background database 300 stores information related to the scaling of the public cloud disaster recovery service cluster.
[0063] It should be noted that, Figure 1 The schematic diagram of the scaling scenario of the public cloud disaster recovery service cluster shown is merely an example. The scaling scenario of the public cloud disaster recovery service cluster described in this embodiment of the invention is to more clearly illustrate the technical solution of this embodiment of the invention and does not constitute a limitation on the technical solution provided by this embodiment of the invention.
[0064] Based on the aforementioned scaling scenarios for public cloud disaster recovery service clusters, an embodiment of a scaling method for public cloud disaster recovery service clusters is proposed. This embodiment includes the following scaling method for public cloud disaster recovery service clusters:
[0065] Listen for service events, obtain service information of the service events, and determine whether to execute a preset scaling strategy based on the service information;
[0066] If the preset scaling strategy is executed, the expected number of nodes is calculated based on the service information;
[0067] Obtain the target number of nodes corresponding to the service event, compare the expected number of nodes with the target number of nodes, and obtain the comparison result;
[0068] According to the comparison result, the public cloud disaster recovery service cluster corresponding to the service information is scaled.
[0069] The scaling method of the public cloud disaster recovery service cluster in the embodiment is applied to a scaling device of the public cloud disaster recovery service cluster, and the type of the scaling device of the public cloud disaster recovery service cluster is not specifically limited. The scaling device of the public cloud disaster recovery service cluster can be a server or a terminal.
[0070] The scaling device in the scaling method of the public cloud disaster recovery service cluster in the embodiment controls the public cloud disaster recovery service cluster deployed in the public cloud bare metal resource pool to be scaled. Before the scaling method of the public cloud disaster recovery service cluster in the embodiment is executed, the public cloud service cluster needs to be applied to the public cloud bare metal resource pool to build the public cloud disaster recovery service cluster. The public cloud bare metal resource pool refers to a resource pool of public physical servers, and the public servers in the public cloud bare metal resource pool can be some official business platforms.
[0071] As shown in Figure 2 , the scaling method of the public cloud disaster recovery service cluster in the embodiment is an embodiment process schematic diagram for building the public cloud disaster recovery service cluster. Figure 2
[0072] The steps of building the public cloud disaster recovery service cluster in the scaling method of the public cloud disaster recovery service cluster in the embodiment include 201-203.
[0073] 201, receiving a disaster recovery service creation request, obtaining production configuration information associated with the disaster recovery service creation request, and verifying service dependent resources according to the production configuration information.
[0074] The scaling device receives the disaster recovery service creation request, and the triggering mode of the disaster recovery service creation request is not specifically limited. That is, the disaster recovery service creation request can be triggered by the user, for example, the user inputs the key information of "disaster recovery creation" in the display interface of the scaling device to trigger the disaster recovery service creation request. In addition, the disaster recovery service creation request can also be triggered automatically by the scaling device, for example, the scaling device is pre-set to automatically trigger the disaster recovery service creation request when the production service is updated, and the scaling device automatically triggers the disaster recovery service creation request when the production service is detected to be updated.
[0075] After the scaling device receives the disaster recovery service creation request, the scaling device obtains production configuration information associated with the disaster recovery service creation request, wherein the production configuration information refers to information related to each business during the construction of the business system, for example, the production configuration information includes interface information, production service response information, etc., the scaling device verifies service dependent resources according to the production configuration information, that is, the scaling device extracts the name information of the production deployment unit, the configuration items and storage volumes associated with the production deployment unit according to the production configuration information, and the scaling device verifies the name information of the production deployment unit, the configuration items and storage volumes associated with the production deployment unit to verify the service dependent resources. If the name information of the production deployment unit, the configuration items and storage volumes associated with the production deployment unit do not completely conform to the preset standard name information, and the standard configuration items and standard storage volumes, the service dependent resource verification fails. If the service dependent resource verification fails, the scaling device outputs a prompt message. If the name information of the production deployment unit, the configuration items and storage volumes associated with the production deployment unit completely conform to the preset standard name information, and the standard configuration items and standard storage volumes, the service dependent resource verification passes.
[0076] 202. If the service dependent resource verification passes, the number of disaster recovery clusters required is determined according to the production configuration information.
[0077] If the service dependent resource verification passes, the scaling device determines the number of disaster recovery clusters required according to the production configuration information, that is, the cluster specification calculation module is pre-set in the scaling device, the cluster specification calculation module refers to a pre-set disaster recovery resource calculation module, and different calculation algorithms are included in the cluster specification calculation module. The scaling device inputs the number of production service clusters in the production configuration information into the cluster specification calculation module, and the cluster specification calculation module in the scaling device calculates the number of disaster recovery clusters required according to the production-disaster recovery ratio between the number of production service clusters and the number of disaster recovery clusters required.
[0078] 203. Disaster recovery configuration information is configured according to the number of disaster recovery clusters required, and a public cloud disaster recovery service cluster is deployed in a pre-built public cloud bare metal resource pool based on the disaster recovery configuration information.
[0079] The scaling device configures disaster recovery configuration information according to the number of disaster recovery clusters required, that is, the scaling device configures the disaster recovery cluster name, the configuration items and storage volumes corresponding to the disaster recovery cluster name, and other disaster recovery configuration information according to the number of disaster recovery clusters required. The scaling device deploys a public cloud disaster recovery service cluster in a pre-built public cloud bare metal resource pool based on the disaster recovery configuration information.
[0080] In this embodiment, a public cloud disaster recovery service cluster is pre-built, which reduces the deployment of a private cloud cluster and thus reduces costs. At the same time, the deployed cloud disaster recovery service cluster can be flexibly and automatically scaled according to actual application scenarios, specifically:
[0081] As shown in Figure 3 , Figure 3 is an embodiment flow diagram of the scaling method of the public cloud disaster recovery service cluster in the embodiments of the present application.
[0082] In some embodiments of the present application, the scaling method of the public cloud disaster recovery service cluster includes steps 301-304 as follows:
[0083] 301, listen to a service event, obtain service information of the service event, and determine whether to execute a preset scaling strategy according to the service information.
[0084] The scaling device listens to the service event, that is, a listening module is set in the scaling device, the service event types to be monitored are set in the listening module, the scaling device listens to the service event through the listening module, and the scaling device obtains the service information of the listened service event, wherein the service information includes service type, service name, etc.
[0085] The preset scaling strategy is set in the scaling device, wherein the preset scaling strategy refers to the preset scaling execution rule of the disaster recovery service cluster, and the scaling device determines whether to execute the preset scaling strategy according to the service information, that is, the scaling device obtains the service type in the service information, if the service type is a deployment adjustment type, the scaling device determines to execute the preset scaling strategy, and if the service type is not the deployment adjustment type, the scaling device determines not to execute the preset scaling strategy.
[0086] 302, if the preset scaling strategy is executed, the node quantity expected value is calculated according to the service information.
[0087] If the preset scaling strategy is executed, the scaling device calculates the node quantity expected value according to the service information, specifically including:
[0088] (1) if the preset scaling strategy is executed, the service business identifier in the service information is extracted;
[0089] (2) the standard node quantity corresponding to the service business identifier is obtained, and the product of the standard node quantity and the preset adjustment coefficient is taken as the node quantity expected value.
[0090] That is, if the preset scaling strategy is executed, the scaling device extracts a service service identifier in the service information, wherein the service service identifier refers to identifier information for uniquely identifying a service event; the scaling device obtains a standard node quantity corresponding to the service service identifier, and takes a product of the standard node quantity and a preset adjustment coefficient as a node quantity expectation value, wherein the standard node quantity refers to a node quantity required when a production service normally operates; the preset adjustment coefficient refers to a ratio between a normal service quantity and a service version switching, or a service peak, for example, the preset adjustment coefficient is set to 1.25.
[0091] 303, obtain a target node quantity corresponding to the service event, compare the node quantity expectation value with the target node quantity, and obtain a comparison result.
[0092] The scaling device obtains a target node quantity corresponding to the service event, wherein the target node quantity refers to a current node quantity of the service information corresponding to the service event, compares the node quantity expectation value with the target node quantity, and obtains a comparison result, wherein the comparison result includes: the node quantity expectation value is greater than the target node quantity, the node quantity expectation value is equal to the target node quantity, and the node quantity expectation value is less than the target node quantity.
[0093] 304, according to the comparison result, scale the public cloud disaster recovery service cluster corresponding to the service information.
[0094] The scaling device dynamically scales the public cloud disaster recovery service cluster corresponding to the service information according to the comparison result, and specifically includes:
[0095] (1) if the comparison result is that the node quantity expectation value is greater than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is expanded according to the service information;
[0096] (2) if the comparison result is that the node quantity expectation value is equal to the target node quantity, prompt information is outputted;
[0097] (3) if the comparison result is that the node quantity expectation value is less than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is contracted according to the service information.
[0098] That is, if the comparison result is that the node quantity expectation value is greater than the target node quantity, the scaling device determines that the expected node quantity is greater than the current running node quantity, and the scaling device expands the public cloud disaster recovery service cluster corresponding to the service event according to the service information; so that the expected node quantity is equal to the current running node quantity, to realize service disaster recovery; if the comparison result is that the node quantity expectation value is equal to the target node quantity, the scaling device determines that the expected node quantity is equal to the current running node quantity, and the scaling device outputs prompt information, without the need for node scaling adjustment; if the comparison result is that the node quantity expectation value is less than the target node quantity, the scaling device determines that the expected node quantity is less than the current running node quantity, and the scaling device shrinks the public cloud disaster recovery service cluster corresponding to the service event according to the service information, to reduce the waste of public cloud service resources.
[0099] The preset scaling strategy in the public cloud disaster recovery service cluster scaling method provided in the embodiments of the present application is determined by listening to a service event, determining whether to execute the preset scaling strategy according to service information corresponding to the service event, calculating a node quantity expectation value if the preset scaling strategy is executed, and obtaining a current target node quantity corresponding to the service information, and scaling the public cloud disaster recovery service cluster by comparing the node quantity expectation value and the target node quantity, so that the deployment of the public cloud disaster recovery service cluster is more in line with actual use requirements, the scaling of the public cloud disaster recovery service cluster is more flexible, and the waste of public cloud service resources is reduced.
[0100] Reference Figure 4 , Figure 4 is a flowchart of an embodiment of determining to execute scaling of a public cloud disaster recovery service cluster in the public cloud disaster recovery service cluster scaling method provided in the embodiments of the present application.
[0101] In some embodiments of the present application, it is specifically explained that the scaling device determining whether to execute the preset scaling strategy includes the following steps 401-403:
[0102] 401, listening to a service event, obtaining service information of the service event, and determining whether the service event is a deployment adjustment event according to the service information.
[0103] The scaling device listens to a service event, the scaling device obtains service information of the service event, and the scaling device determines whether the service event is a deployment adjustment event according to the service information, that is, the scaling device extracts a service type in the service information, and determines whether the service type is a deployment adjustment event.
[0104] 402, if the service event is a deployment adjustment event, determining whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event.
[0105] If the service event is a deployment adjustment event, the scaling device determines whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event. The deployment adjustment event can be a deployment adjustment event of a configuration item corresponding to a private cloud production service cluster, or a deployment adjustment event of a configuration item corresponding to a public cloud production service cluster, and the like.
[0106] 403, if the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, it is determined to execute a preset scaling strategy.
[0107] If the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, the scaling device determines to execute a preset scaling strategy. In this embodiment, the scaling device can determine whether to execute the preset scaling strategy according to the service information, so that the preset scaling strategy is executed more accurately.
[0108] Reference Figure 5 , Figure 5 is a flowchart of an embodiment of the adjustment of a disaster recovery service configuration item of a public cloud disaster recovery service cluster in the scaling method of the public cloud disaster recovery service cluster provided in the embodiments of the present application.
[0109] In some embodiments of the present application, it is specified that if the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, the preset scaling strategy is not executed, and the step 501-503 are further included.
[0110] 501, if the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, it is determined whether the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event.
[0111] If the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, the scaling device determines whether the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, that is, the scaling device extracts the service type in the service information, and determines whether the service type is a private cloud disaster recovery service cluster adjustment event.
[0112] 502, if the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, the production service deployment item is adjusted according to the service information.
[0113] If the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, the scaling device adjusts the production service deployment item according to the service information, that is, the scaling device adjusts the production service deployment item according to the production deployment information in the service information.
[0114] 503, when it is detected that the production service deployment item adjustment is completed, the disaster recovery service deployment item corresponding to the production service deployment item is adjusted.
[0115] When the adjustment of the production service deployment item is detected to be complete, the scaling device adjusts the disaster recovery service deployment item corresponding to the production service deployment item. That is, there is a corresponding relationship between the production service deployment item and the disaster recovery service deployment item. When the production service deployment item is updated, the disaster recovery service deployment item corresponding to the production service deployment item is adjusted to achieve synchronous updates of production services and disaster recovery services.
[0116] Reference Figure 6 , Figure 6 This is a flowchart illustrating an embodiment of the scaling method for a public cloud disaster recovery service cluster provided in this application, specifically the calculation of the expected number of nodes.
[0117] In some embodiments of this application, the calculation of the expected number of nodes is specifically described, including the following steps 601-602:
[0118] 601. Extract the service type from the service information, query the node information pool corresponding to the service type, obtain the number of first nodes with active tags, and obtain the number of second nodes with application tags.
[0119] The scaling device extracts the service type from the service information, queries the node information pool corresponding to the service type, the node information pool contains node information with different tags, the scaling device obtains the number of first nodes with the active tag, and obtains the number of second nodes with the application tag.
[0120] 602, take the first number of nodes and the second number of nodes as the target number of nodes corresponding to the service event, compare the expected value of the number of nodes with the target number of nodes, and obtain the comparison result.
[0121] The scaling device uses the first number of nodes and the second number of nodes as the target number of nodes corresponding to the service event. The scaling device compares the expected number of nodes with the target number of nodes to obtain the comparison result. In this embodiment, a node information pool is set up, containing node information with different tags. That is, the scaling device needs to spend a certain amount of time scaling nodes. In this embodiment, when expanding nodes, an application tag is added, which can avoid duplicate applications and make the node scaling control more intelligent and flexible.
[0122] like Figure 7 As shown, Figure 7 This is a schematic diagram of an embodiment of the scaling device for a public cloud disaster recovery service cluster.
[0123] In order to better implement the scaling method of the public cloud disaster recovery service cluster in the embodiments of the present application, on the basis of the scaling method of the public cloud disaster recovery service cluster, the embodiments of the present application further provide a scaling device of a public cloud disaster recovery service cluster, the scaling device of the public cloud disaster recovery service cluster comprises the following modules 701-704:
[0124] The listening and obtaining module 701 is configured to listen to a service event, obtain service information of the service event, and determine whether to execute a preset scaling strategy according to the service information.
[0125] The expectation calculating module 702 is configured to, if the preset scaling strategy is executed, calculate a node quantity expectation value according to the service information.
[0126] The obtaining and comparing module 703 is configured to obtain a target node quantity corresponding to the service event, compare the node quantity expectation value with the target node quantity, and obtain a comparison result.
[0127] The cluster scaling module 704 is configured to scale a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result.
[0128] In some embodiments of the present application, the scaling device of the public cloud disaster recovery service cluster comprises:
[0129] The receiving disaster recovery service creation request, obtaining the production configuration information associated with the disaster recovery service creation request, and verifying the service dependent resources according to the production configuration information.
[0130] If the service dependent resources pass the verification, the production configuration information is used to determine a disaster recovery cluster demand quantity.
[0131] The disaster recovery configuration information is configured according to the disaster recovery cluster demand quantity, and a public cloud disaster recovery service cluster is deployed in a pre-built public cloud bare metal resource pool based on the disaster recovery configuration information.
[0132] In some embodiments of the present application, the listening and obtaining module 701 comprises:
[0133] The listening and obtaining module 701 is configured to listen to a service event, obtain service information of the service event, and determine whether the service event is a deployment adjustment event according to the service information.
[0134] If the service event is a deployment adjustment event, it is determined whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event.
[0135] If the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, it is determined to execute a preset scaling strategy.
[0136] In some embodiments of the present application, the monitoring and acquisition module 701 comprises:
[0137] If the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, it is determined whether the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event;
[0138] If the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, the production service deployment item is adjusted according to the service information;
[0139] When it is detected that the production service deployment item adjustment is completed, the disaster recovery service deployment item corresponding to the production service deployment item is adjusted.
[0140] In some embodiments of the present application, the expected calculation module 702 comprises:
[0141] If the preset scaling strategy is executed, the service business identifier in the service information is extracted;
[0142] The standard node quantity corresponding to the service business identifier is acquired, and the product of the standard node quantity and a preset adjustment coefficient is taken as a node quantity expectation value.
[0143] In some embodiments of the present application, the acquisition and comparison module 703 comprises:
[0144] The service type in the service information is extracted, the node information pool corresponding to the service type is queried, the first node quantity with an active label is acquired, and the second node quantity with an application label is acquired;
[0145] The first node quantity and the second node quantity are taken as the target node quantity corresponding to the service event, and the node quantity expectation value and the target node quantity are compared to obtain a comparison result.
[0146] In some embodiments of the present application, the cluster scaling module 704 comprises:
[0147] If the comparison result is that the node quantity expectation value is greater than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is expanded according to the service information;
[0148] If the comparison result is that the node quantity expectation value is equal to the target node quantity, prompt information is outputted;
[0149] If the comparison result is that the node quantity expectation value is less than the target node quantity, the public cloud disaster recovery service cluster corresponding to the service event is contracted according to the service information.
[0150] The preset scaling strategy of the scaling device of the public cloud disaster recovery service cluster provided in the embodiments of the present application is used to determine whether to execute the preset scaling strategy according to service information corresponding to a service event by monitoring the service event, calculate a node quantity expected value if the preset scaling strategy is executed, and acquire a current target node quantity corresponding to the service information, so as to scale the public cloud disaster recovery service cluster by comparing the node quantity expected value and the target node quantity, so that the deployment of the public cloud disaster recovery service cluster is more in line with actual use requirements, the scaling of the public cloud disaster recovery service cluster is more flexible, and the waste of public cloud service resources is reduced.
[0151] The embodiments of the present application also provide a scaling device of a public cloud disaster recovery service cluster, as shown in Figure 8 Figure 8 An embodiment structure diagram of the scaling device of the public cloud disaster recovery service cluster provided in the embodiments of the present application is shown in the figure.
[0152] The scaling device of the public cloud disaster recovery service cluster integrates any of the scaling devices of the public cloud disaster recovery service cluster provided in the embodiments of the present application, and the scaling device of the public cloud disaster recovery service cluster comprises:
[0153] one or more processors;
[0154] a memory; and
[0155] one or more application programs, wherein the one or more application programs are stored in the memory and are configured to execute the steps of the scaling method of the public cloud disaster recovery service cluster in any of the scaling method embodiments of the public cloud disaster recovery service cluster provided above by the processor.
[0156] Specifically, the scaling device of the public cloud disaster recovery service cluster can include a processor 801 with one or more processing cores, a memory 802 with one or more storage media, a power supply 803, an input unit 804, and the like. Those skilled in the art can understand that Figure 8 The structure of the scaling device of the public cloud disaster recovery service cluster shown in the figure does not constitute a limitation on the scaling device of the public cloud disaster recovery service cluster, and can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements. Among them:
[0157] The processor 801 is a control center of the scalable device of the public cloud disaster recovery service cluster, connects various parts of the scalable device of the public cloud disaster recovery service cluster through various interfaces and lines, executes various functions of the scalable device of the public cloud disaster recovery service cluster and processes data by running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, so as to monitor the whole scalable device of the public cloud disaster recovery service cluster. Optionally, the processor 801 can include one or more processing cores; preferably, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface and an application program, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 801.
[0158] The memory 802 can be used to store software programs and modules, and the processor 801 executes various functions and data processing by running the software programs and modules stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, a training playing function, etc.), etc.; and the data storage area can store data created according to the use of the scalable device of the public cloud disaster recovery service cluster, etc. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 802 can also include a memory controller to provide the processor 801 with access to the memory 802.
[0159] The scalable device of the public cloud disaster recovery service cluster further includes a power supply 803 for supplying power to various components, and preferably, the power supply 803 can be logically connected with the processor 801 through a power management system, so as to realize functions such as charge management, discharge management and power consumption management through the power management system. The power supply 803 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator and any other components.
[0160] The scalable device of the public cloud disaster recovery service cluster can further include an input unit 804, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0161] Although not shown, the scaling device of the public cloud disaster recovery service cluster can also include a display unit and the like, which will not be described here. In particular, in the embodiment, the processor 801 in the scaling device of the public cloud disaster recovery service cluster loads one or more executable files corresponding to the processes of the application programs into the memory 802 according to the following instructions, and runs the application programs stored in the memory 802 by the processor 801, thereby realizing various functions, as follows:
[0162] listening to a service event, obtaining service information of the service event, determining whether to execute a preset scaling strategy according to the service information;
[0163] if the preset scaling strategy is executed, calculating a node quantity expectation value according to the service information;
[0164] obtaining a target node quantity corresponding to the service event, comparing the node quantity expectation value with the target node quantity, and obtaining a comparison result;
[0165] scaling a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result.
[0166] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by related hardware controlled by the instructions, which can be stored in a storage medium and loaded and executed by a processor.
[0167] To this end, the embodiment of the present application provides a storage medium, which can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. A computer program is stored on the storage medium, and the computer program is loaded by a processor to execute the steps in any scaling method of the public cloud disaster recovery service cluster provided by the embodiment of the present application. For example, the computer program loaded by the processor can execute the following steps:
[0168] listening to a service event, obtaining service information of the service event, determining whether to execute a preset scaling strategy according to the service information;
[0169] if the preset scaling strategy is executed, calculating a node quantity expectation value according to the service information;
[0170] obtaining a target node quantity corresponding to the service event, comparing the node quantity expectation value with the target node quantity, and obtaining a comparison result;
[0171] scaling a public cloud disaster recovery service cluster corresponding to the service information according to the comparison result.
[0172] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description of other embodiments above, which will not be repeated here.
[0173] In the implementation, the above units or structures can be implemented as independent entities, or combined as the same or several entities, and the specific implementation of the above units or structures can be referred to the method embodiments above, which will not be repeated here.
[0174] The specific implementation of the above operations can be referred to the above embodiments, which will not be repeated here.
[0175] The above has introduced in detail the scaling method of the public cloud disaster recovery service cluster provided by the embodiments of the present application, and the principle and implementation manner of the present application are described by applying specific examples; the above embodiment description is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description should not be understood as the limitation of the present application.
Claims
1. A method for scaling a public cloud disaster recovery service cluster, the method comprising: receiving a disaster recovery service creation request, obtaining production configuration information associated with the disaster recovery service creation request, the production configuration information comprising interface information and production service response information, extracting name information of a production deployment unit and configuration items and storage volumes associated with the production deployment unit from the production configuration information, and verifying the name information of the production deployment unit and the configuration items and storage volumes associated with the production deployment unit to verify service dependent resources; if the service dependent resources pass the verification, determining a production disaster recovery ratio between a production service cluster quantity and a disaster recovery cluster quantity required according to the production configuration information, and calculating the disaster recovery cluster quantity required; configuring disaster recovery configuration information including a disaster recovery cluster name and configuration items and storage volumes corresponding to the disaster recovery cluster name based on the disaster recovery cluster quantity required, and deploying a public cloud disaster recovery service cluster in a pre-built public cloud bare metal resource pool based on the disaster recovery configuration information; listening to a service event, obtaining service information of the service event, and determining whether to execute a preset scaling strategy according to the service information; if the preset scaling strategy is executed, calculating a node quantity expectation value according to the service information; extracting a service type in the service information, querying a node information pool corresponding to the service type, obtaining a first node quantity with an active label, and obtaining a second node quantity with an application label; taking the first node quantity and the second node quantity as a target node quantity corresponding to the service event, comparing the node quantity expectation value with the target node quantity, and obtaining a comparison result; and scaling the public cloud disaster recovery service cluster corresponding to the service information according to the comparison result, including: if the comparison result is that the node quantity expectation value is greater than the target node quantity, expanding the public cloud disaster recovery service cluster corresponding to the service event according to the service information; and if the comparison result is that the node quantity expectation value is less than the target node quantity, shrinking the public cloud disaster recovery service cluster corresponding to the service event according to the service information. 2.The method of claim 1, wherein the method further comprises: listening to a service event, obtaining service information of the service event, and determining whether to execute a preset scaling strategy according to the service information, including: listening to a service event, obtaining service information of the service event, and determining whether the service event is a deployment adjustment event according to the service information; if the service event is a deployment adjustment event, determining whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event; and if the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, determining to execute a preset scaling strategy. 3.The method of claim 2, wherein after determining whether the deployment adjustment event is a public cloud disaster recovery service cluster deployment adjustment event, the method further comprises: If the deployment adjustment event is not a public cloud disaster recovery service cluster deployment adjustment event, it is determined whether the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event; If the deployment adjustment event is a private cloud disaster recovery service cluster adjustment event, the production service deployment item is adjusted according to the service information; When it is detected that the production service deployment item adjustment is completed, the disaster recovery service deployment item corresponding to the production service deployment item is adjusted.
4. The method of claim 1, wherein if the preset scaling strategy is executed, the expected number of nodes is calculated according to the service information, and the method further comprises: If the preset scaling strategy is executed, a service business identifier in the service information is extracted; An expected number of nodes is calculated according to the service information.
5. The method of any one of claims 1-4, wherein the scaling the public cloud disaster recovery service cluster corresponding to the service information according to the comparison result further comprises: If the comparison result is that the expected number of nodes is equal to the target number of nodes, prompt information is output. The method of claim 1 is used to scale the public cloud disaster recovery service cluster. The scaling device of the public cloud disaster recovery service cluster comprises:
6. A scaling device of a public cloud disaster recovery service cluster, characterized in that, A listening and obtaining module is configured to listen to a service event, obtain service information of the service event, and determine whether a preset scaling strategy is executed according to the service information; An expected calculation module is configured to calculate an expected number of nodes according to the service information if the preset scaling strategy is executed; A comparison module is configured to obtain a target number of nodes corresponding to the service event, compare the expected number of nodes with the target number of nodes, and obtain a comparison result; A cluster scaling module is configured to scale the public cloud disaster recovery service cluster corresponding to the service information according to the comparison result, and the cluster scaling module comprises: If the comparison result is that the expected number of nodes is greater than the target number of nodes, the public cloud disaster recovery service cluster corresponding to the service event is expanded according to the service information; If the comparison result is that the expected number of nodes is less than the target number of nodes, the public cloud disaster recovery service cluster corresponding to the service event is contracted according to the service information.
7. A scaling device of a public cloud disaster recovery service cluster, comprising: The scaling device of the public cloud disaster recovery service cluster comprises: One or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the scaling method of the public cloud disaster recovery service cluster in any one of claims 1-5.
8. A storage medium, comprising: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the scaling method of the public cloud disaster recovery service cluster in any one of claims 1-5.
Citation Information
Patent Citations
Method for influencing the energy consumption of a motor
CN111148650A
Resource adjustment method and related equipment
CN111580977A