CN110753112A - Elastic expansion method and device of cloud service - Google Patents

Elastic expansion method and device of cloud service Download PDF

Info

Publication number
CN110753112A
CN110753112A CN201911011206.3A CN201911011206A CN110753112A CN 110753112 A CN110753112 A CN 110753112A CN 201911011206 A CN201911011206 A CN 201911011206A CN 110753112 A CN110753112 A CN 110753112A
Authority
CN
China
Prior art keywords
resources
expansion
capacity
preset
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911011206.3A
Other languages
Chinese (zh)
Inventor
黄桦
徐从洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911011206.3A priority Critical patent/CN110753112A/en
Publication of CN110753112A publication Critical patent/CN110753112A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The embodiment of the disclosure discloses an elastic scaling method and device for cloud services. One embodiment of the method comprises: acquiring monitoring information of at least one resource in a cloud service system; matching the monitoring information with a preset expansion rule; if the capacity expansion condition is met, selecting resources for capacity expansion from a preset expansion group according to an expansion rule; and mounting the resources for capacity expansion to the load balancing equipment or directly accessing to the public network IP according to a preset load balancing mode. The implementation mode realizes automatic adjustment of cloud service resources under various scenes.

Description

Elastic expansion method and device of cloud service
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to an elastic expansion method and device for cloud services.
Background
When a user uses a product on the cloud to provide service to the outside, the following scenes exist, and for the use scenes such as a website, the service flow is suddenly increased and decreased. For scenes such as offline computing operation and the like, batch tasks from message queues, Hadoop, Kubernetes and the like are processed, and the task amount is also changed in real time. In order to cope with these scenes, the user needs to manually adjust the resources, and when the traffic volume becomes large, the resources need to be increased to meet the traffic requirement. When the traffic becomes smaller, resources are reduced, and the cost is saved.
The existing method for adjusting the cloud service resources has low sensitivity and hysteresis. The supported product types are not enough, and only the virtual machine is supported at present.
Disclosure of Invention
The embodiment of the disclosure provides an elastic expansion method and device of cloud service.
In a first aspect, an embodiment of the present disclosure provides an elastic scaling method for cloud services, including: acquiring monitoring information of at least one resource in a cloud service system; matching the monitoring information with a preset expansion rule; if the capacity expansion condition is met, selecting resources for capacity expansion from a preset expansion group according to an expansion rule; and mounting the resources for capacity expansion to the load balancing equipment or directly accessing to the public network IP according to a preset load balancing mode.
In some embodiments, the method further comprises: if the capacity reduction condition is met, selecting resources for capacity reduction from a preset expansion group according to expansion rules; and unloading the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
In some embodiments, the method further comprises: the monitoring information comprises resource parameters and/or the state of a node where the resource is located, and the resource comprises at least one of the following: virtual machine, persistent database, cache database.
In some embodiments, the method further comprises: and if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
In some embodiments, the method further comprises: and if the capacity expansion or capacity reduction conditions are met, outputting alarm information according to a preset alarm strategy.
In some embodiments, the method further comprises: and in the preset cooling time after the capacity expansion or the capacity reduction is finished, the capacity expansion or the capacity reduction is not triggered, and the alarm information is not output.
In some embodiments, selecting a resource for capacity expansion from a predetermined scaling group according to a scaling rule includes: determining the quantity of resources to be increased according to the expansion rule and the configured single resource template; and if the sum of the number of the resources to be increased and the number of the used resources is greater than the preset maximum number of resources, selecting the resources with the maximum number of resources minus the number of the used resources for capacity expansion.
In some embodiments, selecting resources for capacity reduction from a predetermined set of scales according to scaling rules comprises: determining the quantity of resources to be deleted according to a telescopic rule; and if the difference between the number of the used resources and the number of the resources to be deleted is less than the preset minimum number of resources, selecting the resources of which the number of the used resources minus the minimum number of resources is used for deletion.
In some embodiments, the method further comprises: and recording the expansion or contraction log.
In a second aspect, an embodiment of the present disclosure provides an elastic expansion device for cloud services, including: an acquisition unit configured to acquire monitoring information of at least one resource in a cloud service system; the matching unit is configured to match the monitoring information with a preset expansion rule; the capacity expansion unit is configured to select resources for capacity expansion from a preset expansion group according to an expansion rule if a capacity expansion condition is met; and the mounting unit is configured to mount the resources for the capacity expansion to the load balancing equipment or directly access the public network IP according to a preset load balancing mode.
In some embodiments, the apparatus further comprises: a capacity reduction unit configured to select a resource for capacity reduction from a predetermined scalable group according to a scaling rule if a capacity reduction condition is satisfied; and the unloading unit is configured to unload the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
In some embodiments, the monitoring information includes resource parameters and/or a status of a node where the resource is located, and the resource includes at least one of: virtual machine, persistent database, cache database.
In some embodiments, the apparatus further comprises a timing unit configured to: and if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
In some embodiments, the apparatus further comprises an alert unit configured to: and if the capacity expansion or capacity reduction conditions are met, outputting alarm information according to a preset alarm strategy.
In some embodiments, the apparatus further comprises a cooling unit configured to: and in the preset cooling time after the capacity expansion or the capacity reduction is finished, the capacity expansion or the capacity reduction is not triggered, and the alarm information is not output.
In some embodiments, the flash unit is further configured to: determining the quantity of resources to be increased according to the expansion rule and the configured single resource template; and if the sum of the number of the resources to be increased and the number of the used resources is greater than the preset maximum number of resources, selecting the resources with the maximum number of resources minus the number of the used resources for capacity expansion.
In some embodiments, the capacity reduction unit is further configured to: determining the quantity of resources to be deleted according to a telescopic rule; and if the difference between the number of the used resources and the number of the resources to be deleted is less than the preset minimum number of resources, selecting the resources of which the number of the used resources minus the minimum number of resources is used for deletion.
In some embodiments, the apparatus further comprises a logging unit configured to: and recording the expansion or contraction log.
In a third aspect, an embodiment of the present disclosure provides an elastically stretchable electronic device for cloud services, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
In a fourth aspect, embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method of elastic scaling of cloud services according to the present disclosure;
FIG. 3 is a flow diagram of yet another embodiment of a method of elastic scaling of cloud services according to the present disclosure;
fig. 4a, 4b are schematic diagrams of application scenarios of the elastic scaling method of the cloud service according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of a resilient retractor of a cloud service according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the cloud service elastic scaling method or cloud service elastic scaling device of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include a load balancing device 101, a resilient elastic group 102, and a server 103. The load balancing device 101, the elastic telescopic group 102 and the server 103 are communicated through a network. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use a terminal device to interact with a VPC (virtual private cloud) through a public network IP to use a cloud service. The terminal device can be provided with various communication client applications, such as a web browser application, a shopping application, a searching application, an instant messaging tool, a mailbox client, social platform software and the like.
The data streams of the terminal devices may be distributed to different elastic stretching groups by the load balancing device 101. Each elastic scalability may provide a service such as mail, instant messaging, shopping, etc. Each elastic expansion group may include a plurality of available zones therein. Physical isolation between the available zones. Each available region may include at least one resource.
The server 103 may be a server providing various services, such as a background management server providing management of VPC resources. The background management server can be pre-configured with a flexible rule, a resource template, a flexible group and a load balancing strategy. And (4) monitoring and analyzing the VPC resources in real time, and then expanding and shrinking the capacity. And logging the scaling behavior in a log.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the cloud service elastic expansion and contraction method provided by the embodiment of the present disclosure is generally executed by the server 103, and accordingly, the cloud service elastic expansion and contraction device is generally disposed in the server 103.
It should be understood that the number of load balancing devices, scalability groups, resources and servers in fig. 1 are merely illustrative. There may be any number of load balancing devices, scalability groups, resources and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method of elastic scaling of cloud services according to the present disclosure is shown. The elastic expansion method of the cloud service comprises the following steps:
step 201, acquiring monitoring information of at least one resource in a cloud service system.
In this embodiment, an execution subject (for example, a server shown in fig. 1) of the elastic scaling method of the cloud service may acquire monitoring information of at least one resource in the cloud service system in a wired connection manner or a wireless connection manner. The monitoring information may include resource parameters and/or the status of the node in which the resource resides. The resources may include at least one of: virtual machines, persistent databases (e.g., MySQL), cache databases (e.g., redis). Resource parameters may include CPU usage, memory usage, number of host connections, database usage, and the like. The node state comprises survival and non-survival, and the node state can be detected by means of heartbeat detection.
Step 202, matching the monitoring information with a preset expansion rule.
In this embodiment, the scaling rule is used to control the expansion or the reduction of the cloud service system, including the expansion condition and the reduction condition. Scaling rules related to resource parameters, scaling rules related to the node state where the resource is located, may be configured. For example, the capacity expansion condition may be that 2 virtual machines are added when the CPU utilization is between 80% and 90%, and 3 virtual machines are added when the CPU utilization is higher than 90%. The capacity reduction condition can be that 2 virtual machines are reduced when the CPU utilization rate is between 40% and 50%, 3 virtual machines are reduced when the CPU utilization rate is between 20% and 30%, and the like. And when the node is in the non-survival state, removing all resources on the node from the system and not scheduling the resources by the load balancing equipment.
And step 203, if the capacity expansion condition is met, selecting the resources for capacity expansion from the preset expansion group according to the expansion rule.
In this embodiment, a scaling rule is configured in advance, for example, the CPU expands several resources by reaching a certain threshold. The resource template is configured in advance, and resources can be randomly selected according to the template. For example, the candidate resource pool has a plurality of a-parameter virtual machines and a plurality of B-parameter virtual machines. And if the template is configured with the A parameter, randomly selecting resources for capacity expansion from a plurality of A parameter virtual machines. But the final expansion result cannot exceed the set maximum number of resources. If the expansion according to the expansion rule can cause the maximum resource number to be exceeded, the quantity of the expanded resources is reduced, and finally the sum of the quantity of the expanded resources and the quantity of the used resources cannot exceed the maximum resource number.
In some optional implementation manners of the present embodiment, the alarm information is output according to a preset alarm policy. The alarm information may include prompt information such as time, expanded resource name, etc.
In some optional implementation manners of this embodiment, even if the condition of capacity expansion or capacity reduction is met within the predetermined cooling time after the last time of capacity expansion or capacity reduction is completed, the capacity expansion or capacity reduction is not temporarily triggered, and no alarm information is output. And after the cooling time is over, judging that the condition of capacity expansion or capacity reduction is met according to the monitoring information, and then performing capacity expansion or capacity reduction.
And step 204, mounting the resources for capacity expansion to the load balancing equipment or directly accessing to the public network IP according to a preset load balancing mode.
In this embodiment, if load balancing is configured, the extended resources are mounted to the load balancing device, the load balancing device distributes load traffic, and the resources (virtual machines and the like) in the scalable group are mounted behind the load balancing device, so that the traffic can be adjusted and distributed to the changed resources by the load balancing device regardless of the extension. If the load balancing mode is not set, the public network IP is directly accessed, and then the traffic regulation is not executed.
And step 205, if the capacity reduction condition is met, selecting resources for capacity reduction from a preset expansion and contraction group according to the expansion and contraction rule.
In this embodiment, a scaling rule is configured in advance, for example, a CPU scales several resources less than a certain threshold. The resource template is configured in advance, and resources can be randomly selected according to the template. For example, a plurality of A parameter virtual machines and a plurality of B parameter virtual machines are already adopted in the system. And if the template is configured with the A parameter, randomly selecting resources for capacity reduction from a plurality of A parameter virtual machines. But the final result of the reduction cannot be smaller than the set minimum number of resources. If the capacity reduction according to the expansion rule can result in less than the minimum resource number, the capacity reduction resource number can be reduced, and finally the capacity reduced resource number cannot be less than the minimum resource number. For the condition that the capacity reduction is determined through node state detection, if the number of the resources after the capacity reduction calculated according to the expansion rule is smaller than the minimum number of the resources, the resources on the nodes which do not survive can be removed, and then the resources are selected from the candidate resource pool to be supplemented, so that the number of the finally used resources is not smaller than the minimum number of the resources.
And step 206, unloading the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
In this embodiment, if load balancing is configured, the capacity-reduced resources are unloaded from the load balancing device, otherwise, from the public network IP.
The method provided by the embodiment of the disclosure enables the user to adjust the resource usage amount in time according to the service change of the user, and more flexibly uses the resources on the cloud.
With further reference to fig. 3, a flow 300 of yet another embodiment of a method of elastic scaling of cloud services is illustrated. The process 300 of the elastic expansion method of the cloud service includes the following steps:
step 301, acquiring monitoring information of at least one resource in the cloud service system.
And 302, matching the monitoring information with a preset expansion rule.
And 303, if the capacity expansion condition is met, selecting the resources for capacity expansion from a preset expansion group according to the expansion rule.
And 304, mounting the resources for capacity expansion to a load balancing device or directly accessing to a public network IP according to a preset load balancing mode.
And 305, if the capacity reduction condition is met, selecting resources for capacity reduction from a preset expansion and contraction group according to the expansion and contraction rule.
And step 306, unloading the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
Step 301-.
And 307, if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
In this embodiment, a timing task may be set, where the timing task includes a timing capacity expansion task and a timing capacity reduction task. The timing tasks include timing conditions, operations, and number of resources. For example, 12 capacity reduction 2 resources at night and 7 capacity expansion 2 resources at morning. If the current time meets the set timing condition of the timing task, the timing capacity expansion task or the timing capacity reduction task can be triggered. The timing task is executed to meet the boundary conditions (maximum value and minimum value of resources) of the system.
Optionally, the priority of the timing task and the monitoring mode may be configured, and the timing task may also be executed preferentially. The execution sequence of the timing task and the monitoring mode for capacity expansion and capacity reduction is not limited herein.
In some optional implementations of this embodiment, the method further includes: and recording the expansion or contraction log. So as to update the scaling rule according to the performance change caused by the capacity expansion and capacity reduction operation in the log.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the process 300 of elastic scaling of cloud services in this embodiment embodies a step of performing resource scaling at regular time, and thus, the scheme described in this embodiment can introduce more resource scaling schemes, thereby implementing more comprehensive automatic resource adjustment.
With continuing reference to fig. 4a and 4b, fig. 4a and 4b are schematic diagrams of application scenarios of the elastic scaling method of the cloud service according to the present embodiment. In the application scenario of fig. 4a, the following is illustrated:
1, local-bcc: and for each service end, the node of the telescopic group goes to the position to acquire the node state of the resource, and when the node state is abnormal, the telescopic group is triggered to recover.
2. And the monitoring data source stores the monitored resource parameters of each resource and is used for comparing with the expansion rule threshold value in the elastic expansion program to see whether expansion is to be triggered or not.
3. The boundary check is responsible for checking the maximum number and the minimum number of resources set by a user before, and preventing the extreme case that the expansion causes too much resources or the contraction causes too little resources.
4. When the expansion and contraction capacity is triggered, a task is created in the task module, and the task scheduling executor executes a specific expansion and contraction capacity logic of the task.
5. Cooling time: the expansion and contraction composition can enter the duration of a cooling state after expansion and contraction capacity is finished, the duration is used for waiting for the monitoring indexes of the expansion and contraction composition to return to normal, and the cooling time can prevent false triggering of an alarm task.
BLB load balancing, responsible for traffic distribution. Generally, resources (virtual machines and the like) in the scalable group are hung behind load balancing, so that no matter expansion capacity is adopted, traffic can be adjusted and distributed to changed resources through load balancing.
7. Delete/create scalable groups: scalable groups may be created/deleted according to service type, and each scalable group may include at least one available region therein. The available zones are physically separated from each other, and each available zone may include at least one resource.
In the application scenario of fig. 4b, the expansion and contraction may be triggered by health checking whether the state of the node where the resource is located is alive, monitoring whether the resource parameter satisfies the contraction, expansion threshold, and timing task. And if the expansion and the contraction are judged, the expansion and contraction configuration is read and then the expansion and contraction program is executed. And adding the nodes of the expanded resources into the telescopic group. And deleting the scaled resources from the scaling group. After one expansion, the monitoring information can be updated after the cooling time to execute the next expansion again.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of an elastic expansion device for cloud services, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be applied to various electronic devices.
As shown in fig. 5, the elastic expansion device 500 of the cloud service of the present embodiment includes: an obtaining unit 501, a matching unit 502, a capacity expansion unit 503, and a mounting unit 504. The acquiring unit 501 is configured to acquire monitoring information of at least one resource in the cloud service system; a matching unit 502 configured to match the monitoring information with a preset scaling rule; a capacity expansion unit 503 configured to select a resource for capacity expansion from a predetermined expansion group according to an expansion rule if a capacity expansion condition is satisfied; a mounting unit 504 configured to mount resources for capacity expansion to a load balancing device or directly access to a public network IP according to a preset load balancing mode.
In this embodiment, for specific processing of the acquiring unit 501, the matching unit 502, the capacity expanding unit 503, and the mounting unit 504 of the elastic expansion device 500 of the cloud service, reference may be made to step 201, step 202, step 203, and step 204 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the apparatus 500 further includes: a capacity reduction unit 505 configured to select a resource for capacity reduction from a predetermined scalable group according to a scaling rule if a capacity reduction condition is satisfied; and the unloading unit 506 is configured to unload the resources for the capacity reduction from the load balancing device or the public network IP according to a preset load balancing mode.
In some optional implementation manners of this embodiment, the monitoring information includes a resource parameter and/or a state of a node where the resource is located, and the resource includes at least one of the following: virtual machine, persistent database, cache database.
In some optional implementations of this embodiment, the apparatus 500 further comprises a timing unit (not shown in the drawings) configured to: and if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
In some optional implementations of this embodiment, the apparatus 500 further comprises an alert unit (not shown in the drawings) configured to: and if the capacity expansion or capacity reduction conditions are met, outputting alarm information according to a preset alarm strategy.
In some optional implementations of the present embodiment, the apparatus 500 further comprises a cooling unit (not shown in the drawings) configured to: and in the preset cooling time after the capacity expansion or the capacity reduction is finished, the capacity expansion or the capacity reduction is not triggered, and the alarm information is not output.
In some optional implementations of this embodiment, the capacity expansion unit is further configured to: determining the quantity of resources to be increased according to the expansion rule and the configured single resource template; and if the sum of the number of the resources to be increased and the number of the used resources is greater than the preset maximum number of resources, selecting the resources with the maximum number of resources minus the number of the used resources for capacity expansion.
In some optional implementations of this embodiment, the capacity reduction unit is further configured to: determining the quantity of resources to be deleted according to a telescopic rule; and if the difference between the number of the used resources and the number of the resources to be deleted is less than the preset minimum number of resources, selecting the resources of which the number of the used resources minus the minimum number of resources is used for deletion.
In some optional implementations of this embodiment, the apparatus 500 further comprises a logging unit configured to: and recording the expansion or contraction log.
Referring now to FIG. 6, a schematic diagram of an electronic device (e.g., the server of FIG. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring monitoring information of at least one resource in a cloud service system; matching the monitoring information with a preset expansion rule; if the capacity expansion condition is met, selecting resources for capacity expansion from a preset expansion group according to an expansion rule; and mounting the resources for capacity expansion to the load balancing equipment or directly accessing to the public network IP according to a preset load balancing mode.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor comprises an acquisition unit, a matching unit, a capacity expansion unit and a mounting unit. The names of the units do not form a limitation on the units themselves in some cases, for example, the acquiring unit may also be described as a "unit that acquires monitoring information of at least one resource in the cloud service system".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (20)

1. A method of elastic scaling of cloud services, comprising:
acquiring monitoring information of at least one resource in a cloud service system;
matching the monitoring information with a preset expansion rule;
if the capacity expansion condition is met, selecting resources for capacity expansion from a preset expansion group according to the expansion rule;
and mounting the resources for capacity expansion to load balancing equipment or directly accessing to a public network IP according to a preset load balancing mode.
2. The method of claim 1, wherein the method further comprises:
if the capacity reduction condition is met, selecting resources for capacity reduction from a preset expansion group according to the expansion rule;
and unloading the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
3. The method according to claim 1 or 2, wherein the monitoring information includes resource parameters and/or a state of a node where the resource is located, and the resource includes at least one of: virtual machine, persistent database, cache database.
4. The method of claim 1, wherein the method further comprises:
and if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
5. The method according to claim 1 or 2, wherein the method further comprises:
and if the capacity expansion or capacity reduction conditions are met, outputting alarm information according to a preset alarm strategy.
6. The method of claim 5, wherein the method further comprises:
and in the preset cooling time after the capacity expansion or the capacity reduction is finished, the capacity expansion or the capacity reduction is not triggered, and the alarm information is not output.
7. The method of claim 1, wherein selecting resources for capacity expansion from a predetermined scaling group according to the scaling rule comprises:
determining the quantity of resources to be increased according to the expansion rule and the configured single resource template;
and if the sum of the number of the resources to be increased and the number of the used resources is greater than the preset maximum number of resources, selecting the resources with the maximum number of resources minus the number of the used resources for capacity expansion.
8. The method of claim 2, wherein the selecting resources for the scaling from a predetermined set of scalings according to the scaling rules comprises:
determining the quantity of resources to be deleted according to the expansion rule;
and if the difference between the number of the used resources and the number of the resources to be deleted is less than the preset minimum number of resources, selecting the resources of which the number of the used resources minus the minimum number of resources is used for deletion.
9. The method according to one of claims 1-4, wherein the method further comprises:
and recording the expansion or contraction log.
10. A cloud-serviced elastic retractor, comprising:
an acquisition unit configured to acquire monitoring information of at least one resource in a cloud service system;
a matching unit configured to match the monitoring information with a preset scaling rule;
the capacity expansion unit is configured to select resources for capacity expansion from a preset expansion group according to the expansion rule if a capacity expansion condition is met;
and the mounting unit is configured to mount the resources for capacity expansion to the load balancing equipment or directly access to the public network IP according to a preset load balancing mode.
11. The apparatus of claim 10, wherein the apparatus further comprises:
the capacity reducing unit is configured to select resources for capacity reduction from a preset expansion and contraction group according to the expansion and contraction rule if capacity reducing conditions are met;
and the unloading unit is configured to unload the resources for capacity reduction from the load balancing equipment or the public network IP according to a preset load balancing mode.
12. The apparatus of claim 10, wherein the monitoring information includes resource parameters and/or a status of a node where the resource is located, and the resource includes at least one of: virtual machine, persistent database, cache database.
13. The apparatus of claim 10, wherein the apparatus further comprises a timing unit configured to:
and if the current time meets the timing condition, triggering a timing capacity expansion task or a timing capacity reduction task.
14. The apparatus according to claim 10 or 11, wherein the apparatus further comprises an alert unit configured to:
and if the capacity expansion or capacity reduction conditions are met, outputting alarm information according to a preset alarm strategy.
15. The apparatus of claim 14, wherein the apparatus further comprises a cooling unit configured to:
and in the preset cooling time after the capacity expansion or the capacity reduction is finished, the capacity expansion or the capacity reduction is not triggered, and the alarm information is not output.
16. The apparatus of claim 10, wherein the flash unit is further configured to:
determining the quantity of resources to be increased according to the expansion rule and the configured single resource template;
and if the sum of the number of the resources to be increased and the number of the used resources is greater than the preset maximum number of resources, selecting the resources with the maximum number of resources minus the number of the used resources for capacity expansion.
17. The apparatus of claim 11, wherein the capacity reduction unit is further configured to:
determining the quantity of resources to be deleted according to the expansion rule;
and if the difference between the number of the used resources and the number of the resources to be deleted is less than the preset minimum number of resources, selecting the resources of which the number of the used resources minus the minimum number of resources is used for deletion.
18. The apparatus according to one of claims 10-13, wherein the apparatus further comprises a logging unit configured to:
and recording the expansion or contraction log.
19. A resilient, telescoping electronic device for cloud services, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
20. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-9.
CN201911011206.3A 2019-10-23 2019-10-23 Elastic expansion method and device of cloud service Pending CN110753112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911011206.3A CN110753112A (en) 2019-10-23 2019-10-23 Elastic expansion method and device of cloud service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911011206.3A CN110753112A (en) 2019-10-23 2019-10-23 Elastic expansion method and device of cloud service

Publications (1)

Publication Number Publication Date
CN110753112A true CN110753112A (en) 2020-02-04

Family

ID=69279447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911011206.3A Pending CN110753112A (en) 2019-10-23 2019-10-23 Elastic expansion method and device of cloud service

Country Status (1)

Country Link
CN (1) CN110753112A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314461A (en) * 2020-02-14 2020-06-19 北京百度网讯科技有限公司 IP mounting and data processing method and device
CN111314457A (en) * 2020-02-13 2020-06-19 北京百度网讯科技有限公司 Method and device for setting virtual private cloud
CN111371685A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Data processing and IPv6 mounting method and device
CN111651275A (en) * 2020-06-04 2020-09-11 山东汇贸电子口岸有限公司 MySQL cluster automatic deployment system and method
CN112181649A (en) * 2020-09-22 2021-01-05 广州品唯软件有限公司 Container resource adjusting method and device, computer equipment and storage medium
CN112363825A (en) * 2020-10-16 2021-02-12 北京五八信息技术有限公司 Elastic expansion method and device
CN112799854A (en) * 2021-04-15 2021-05-14 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and readable storage medium
CN112994949A (en) * 2021-04-02 2021-06-18 软通动力信息技术(集团)股份有限公司 Private network connection method, device, equipment and storage medium
CN114785793A (en) * 2022-03-15 2022-07-22 浪潮云信息技术股份公司 Elastic expansion load balancing method and system
CN115022173A (en) * 2022-05-10 2022-09-06 度小满科技(北京)有限公司 Service capacity expansion method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317638A (en) * 2014-10-17 2015-01-28 华为技术有限公司 Application stretching management method and device
CN107197053A (en) * 2017-07-31 2017-09-22 郑州云海信息技术有限公司 A kind of load-balancing method and device
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317638A (en) * 2014-10-17 2015-01-28 华为技术有限公司 Application stretching management method and device
CN107197053A (en) * 2017-07-31 2017-09-22 郑州云海信息技术有限公司 A kind of load-balancing method and device
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314457A (en) * 2020-02-13 2020-06-19 北京百度网讯科技有限公司 Method and device for setting virtual private cloud
CN114363346A (en) * 2020-02-14 2022-04-15 北京百度网讯科技有限公司 IP mounting and data processing method and device
CN111314461A (en) * 2020-02-14 2020-06-19 北京百度网讯科技有限公司 IP mounting and data processing method and device
CN111314461B (en) * 2020-02-14 2022-05-17 北京百度网讯科技有限公司 IP mounting and data processing method and device
CN111371685A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Data processing and IPv6 mounting method and device
CN111651275A (en) * 2020-06-04 2020-09-11 山东汇贸电子口岸有限公司 MySQL cluster automatic deployment system and method
CN112181649A (en) * 2020-09-22 2021-01-05 广州品唯软件有限公司 Container resource adjusting method and device, computer equipment and storage medium
CN112363825A (en) * 2020-10-16 2021-02-12 北京五八信息技术有限公司 Elastic expansion method and device
CN112994949A (en) * 2021-04-02 2021-06-18 软通动力信息技术(集团)股份有限公司 Private network connection method, device, equipment and storage medium
CN112799854A (en) * 2021-04-15 2021-05-14 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and readable storage medium
CN112799854B (en) * 2021-04-15 2021-07-13 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and readable storage medium
CN114785793A (en) * 2022-03-15 2022-07-22 浪潮云信息技术股份公司 Elastic expansion load balancing method and system
CN115022173A (en) * 2022-05-10 2022-09-06 度小满科技(北京)有限公司 Service capacity expansion method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110753112A (en) Elastic expansion method and device of cloud service
US10567220B2 (en) Distributed rules engine for processing events associated with internet of things devices
Ibe et al. M/M/1 multiple vacation queueing systems with differentiated vacations
CN109492013B (en) Data processing method, device and system applied to database cluster
US10523580B2 (en) Automatic cloud provisioning based on related internet news and social network trends
CN110650209B (en) Method and device for realizing load balancing
CN111988355A (en) Current limiting method and device, server and server cluster
CN111338834A (en) Data storage method and device
US10616317B2 (en) Method and system for affinity load balancing
CN108400884B (en) Method, system and device for improving stability of website service
CN111161072A (en) Block chain-based random number generation method, equipment and storage medium
CN113590447B (en) Buried point processing method and device
US11082484B2 (en) Load balancing system
CN111290873B (en) Fault processing method and device
CN114035861A (en) Cluster configuration method and device, electronic equipment and computer readable medium
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
CN113537893A (en) Order processing method, device, equipment and computer readable medium
CN109905443B (en) Data processing method, system, electronic device and computer readable medium
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN108173689B (en) Output system of load balancing data
CN110262756B (en) Method and device for caching data
CN110633324B (en) Method, apparatus, electronic device and computer readable medium for synchronizing data
CN116820354B (en) Data storage method, data storage device and data storage system
CN112667607B (en) Historical data management method and related equipment
CN112148551B (en) Method, apparatus and computer program product for determining a rate of change of usage of a storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication