WO2018188405A1 - 云应用资源的配置方法及装置 - Google Patents

云应用资源的配置方法及装置 Download PDF

Info

Publication number
WO2018188405A1
WO2018188405A1 PCT/CN2018/075286 CN2018075286W WO2018188405A1 WO 2018188405 A1 WO2018188405 A1 WO 2018188405A1 CN 2018075286 W CN2018075286 W CN 2018075286W WO 2018188405 A1 WO2018188405 A1 WO 2018188405A1
Authority
WO
WIPO (PCT)
Prior art keywords
application server
application
cloud
virtual machine
step size
Prior art date
Application number
PCT/CN2018/075286
Other languages
English (en)
French (fr)
Inventor
周志军
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018188405A1 publication Critical patent/WO2018188405A1/zh

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
    • 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]

Definitions

  • the present disclosure relates to the field of cloud computing, and in particular, to a method and an apparatus for configuring a cloud application resource.
  • Embodiments of the present disclosure provide a method and an apparatus for configuring a cloud application resource.
  • a method for configuring a cloud application resource includes: collecting current performance parameters of a cloud application, and a number of application server clusters of the cloud application; according to the performance parameter and the application server The number of clusters determines the step size adjustment parameter of the cloud application; and the number of application server virtual machines of the cloud application is configured according to the step size adjustment parameter and the number of application server clusters.
  • the performance parameter includes at least one of the following: an application server virtual machine to which the cloud application belongs: CPU usage, memory occupancy, storage load, number of concurrent users of the cloud application, and a transmission control protocol TCP.
  • determining the step size adjustment parameter of the cloud application according to the performance parameter and the number of application server clusters includes determining to increase the cloud when the performance parameter is greater than or equal to a first threshold. Applying the application server virtual machine, and determining a first step length according to a preset correspondence between the number of application server clusters and the scaling step; and determining to reduce the cloud application when the performance parameter is less than or equal to the second threshold. The application server virtual machine, and determining the second step number according to the correspondence relationship; wherein the step size adjustment parameter is used to describe: increasing or decreasing the application server virtual machine, the number of steps.
  • configuring the number of application server virtual machines of the cloud application according to the step size adjustment parameter and the number of application server clusters includes: when the step size scaling parameter indicates adding an application server virtual machine Determining whether the number of application server clusters reaches a maximum capacity threshold; when the number of application server clusters does not reach the maximum capacity threshold, adding the first number of application server virtual machines to the cloud application; or When the step size scaling parameter indicates that the application server virtual machine is reduced, determining whether the number of application server clusters reaches a minimum capacity threshold; and when the number of application server clusters does not reach the minimum capacity threshold, the cloud application is Reduce the number of application server virtual machines in the second step.
  • configuring the number of application server virtual machines of the cloud application according to the step size adjustment parameter and the number of application server clusters includes: adding, in the step size, a parameter to increase an application server virtual machine. If the number of the application server clusters reaches the maximum capacity threshold, when the number of the application server clusters reaches the maximum capacity threshold, the application server virtual machine is refused to be added to the cloud application; or, according to the step When the number of the application server virtual machines is reduced, the number of the application server clusters is determined to be the minimum capacity threshold; when the number of application server clusters reaches the minimum capacity threshold, the application server of the cloud application is kept virtual. Number of machines.
  • a device for configuring a cloud application resource includes: an acquisition module, configured to collect current performance parameters of a cloud application, and an application server cluster number of the cloud application; determining a module, setting Determining a step size adjustment parameter of the cloud application according to the performance parameter and the number of application server clusters; and configuring a module, configured to configure the cloud application according to the step size adjustment parameter and the number of application server clusters The number of application server virtual machines.
  • the performance parameter includes at least one of the following: an application server virtual machine to which the cloud application belongs: CPU usage, memory occupancy, storage load, number of concurrent users of the cloud application, and a transmission control protocol TCP.
  • the determining module further includes: a first determining unit, configured to: when the performance parameter is greater than or equal to the first threshold, determine to increase an application server virtual machine of the cloud application, and according to the preset Determining the first step of the number of the application server clusters and the scaling step; the second determining unit is configured to determine to reduce the application server virtual machine of the cloud application when the performance parameter is less than or equal to the second threshold And determining, according to the correspondence, the second step number; wherein the step size adjustment parameter is used to describe: increasing or decreasing the application server virtual machine, the number of steps.
  • the configuration module further includes: a first configuration unit, configured to determine, when the step size scaling parameter indicates that the application server virtual machine is added, whether the number of application server clusters reaches a maximum capacity threshold; When the number of application server clusters does not reach the maximum capacity threshold, the first step of the application server virtual machine is added to the cloud application; and the second configuration unit is configured to reduce the parameter of the step size in the step size.
  • a first configuration unit configured to determine, when the step size scaling parameter indicates that the application server virtual machine is added, whether the number of application server clusters reaches a maximum capacity threshold; When the number of application server clusters does not reach the maximum capacity threshold, the first step of the application server virtual machine is added to the cloud application; and the second configuration unit is configured to reduce the parameter of the step size in the step size.
  • the application server virtual machine it is determined whether the number of the application server clusters reaches a minimum capacity threshold; when the number of application server clusters does not reach the minimum capacity threshold, the second application of the second step is reduced for the cloud application. Server virtual
  • the configuration module is further configured to: determine, when the step size scaling parameter increases the number of application server virtual machines, whether the number of application server clusters reaches a maximum capacity threshold; When the number of clusters reaches the maximum capacity threshold, the application server virtual machine is refused to be added to the cloud application; when the number of application server virtual machines is determined according to the step size scaling parameter, it is determined whether the application server cluster number reaches a minimum. a capacity threshold; when the number of application server clusters reaches the minimum capacity threshold, the number of application server virtual machines of the cloud application is maintained.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the current performance parameter of the cloud application and the number of application server clusters of the cloud application are collected by the present disclosure; the step size adjustment parameter of the cloud application is determined according to the performance parameter and the number of application server clusters; Configuring the number of virtual machines of the application server of the cloud application by using the step size adjustment parameter and the number of application server clusters, and dynamically determining the number of virtual machines of the application server according to the current performance processing capability of the system, without occupying resources. Moreover, it can well meet the system performance processing capability required by the business, and solves the problem that the resource waste is easily caused when configuring the scaling step of the cloud application, and improves the reliability and availability of the application.
  • FIG. 1 is a schematic diagram of a cloud application dynamic scaling scheme
  • FIG. 2 is a flowchart of a method of configuring a cloud application resource according to an embodiment of the present disclosure
  • FIG. 3 is a structural block diagram of a configuration apparatus of a cloud application resource according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a cloud ring application dynamic scaling method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of a cloud application dynamic scaling increase structure according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a cloud application dynamic scaling reduction structure according to an embodiment of the present disclosure.
  • FIG. 7 is a flowchart of processing a cloud application dynamic scaling method according to an embodiment of the present disclosure
  • FIG. 8 is a schematic structural diagram of a cloud application dynamic extension system according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of a current cloud application dynamic scaling scheme, as shown in FIG. 1 , which mainly performs dynamic scaling through application performance monitoring and comparison with a dynamic scaling policy.
  • the dynamic scaling policy generally includes a performance parameter threshold and a scaling step (once). Dynamic scaling increases or decreases the number of application servers. If you want to add an application server, create an application server virtual machine (with a dynamic scaling step of 1. If the step size is 2, add 2 virtual machines at a time. , and so on, deploy the application, join the application cluster, and if it is determined to reduce the application server, remove an activated application server virtual machine from the application cluster, and then destroy the virtual machine. There is a problem with this.
  • the step size of dynamic scaling is fixed, such as 1 or 3.
  • the step size is configured to be small, such as 1, if the current system traffic is large, add one application server virtual machine at a time. Can not meet the performance processing capabilities of the current system, resulting in business loss, even in the case of serious system downtime; if the step size configuration is large, such as 3, the current system traffic is not too large, but just meet the dynamic scaling conditions, one time The three virtual machines of the application server are added, so that the current system performance processing capability is far greater than the performance processing capability required by the actual service, thereby causing waste of system resources.
  • the dynamic scaling technology and implementation scheme of the cloud application are fixed in the configuration of the dynamic scaling step, or the processing capability required for the current service cannot be handled well, resulting in loss of traffic or risk of system downtime, or This can result in a system performance processing capability that is much larger than that required by the current service, and consumes too many resources, resulting in wasted resources.
  • the present disclosure proposes a cloud application dynamic scaling method and system, which can satisfactorily meet the performance processing capability required by the service without occupying resources.
  • FIG. 2 is a flowchart of a method for configuring a cloud application resource according to an embodiment of the present disclosure. As shown in FIG. 2, the process includes the following steps:
  • Step S202 collecting current performance parameters of the cloud application, and the number of application server clusters of the cloud application;
  • Step S204 determining a step size adjustment parameter of the cloud application according to the performance parameter and the number of application server clusters;
  • Step S206 Configure the number of application server virtual machines of the cloud application according to the step size adjustment parameter and the number of application server clusters.
  • the current performance parameter of the cloud application and the number of application server clusters of the cloud application are collected through the foregoing steps, and the step size adjustment parameter of the cloud application is determined according to the performance parameter and the number of the application server clusters; Configuring the number of virtual machines of the application server of the cloud application by using the step size adjustment parameter and the number of application server clusters, and dynamically determining the number of virtual machines of the application server according to the current performance processing capability of the system, without occupying resources.
  • it can well meet the system performance processing capability required by the business, and solves the problem that the resource waste is easily caused when configuring the scaling step of the cloud application, and improves the reliability and availability of the application.
  • the execution body of the above steps may be a cloud application system, or a cloud application management system, etc., and may be a processor on a microscopic basis, but is not limited thereto.
  • the performance parameter in this example may include at least one of the following application server virtual machines to which the cloud application belongs: CPU usage, memory occupancy, storage load, number of concurrent users of the cloud application, number of transmission control protocol TCP connections, hypertext transmission The number of protocol HTTP connections and the number of database connections.
  • determining the step size adjustment parameter of the cloud application according to the performance parameter and the number of application server clusters includes:
  • the step size adjustment parameter is used to describe: increase or decrease the application server virtual machine, the number of steps.
  • configuring the number of application server virtual machines of the cloud application according to the step size adjustment parameter and the number of application server clusters includes the following specific scenarios:
  • step size expansion parameter indicates that the application server virtual machine is added, it is determined whether the number of application server clusters reaches the maximum capacity threshold; when the number of application server clusters does not reach the maximum capacity threshold, the first step of the application server virtual machine is added for the cloud application. ;
  • step size scaling parameter indicates that the application server virtual machine is reduced, it is determined whether the number of application server clusters reaches the minimum capacity threshold; when the number of application server clusters does not reach the minimum capacity threshold, the number of application server virtual machines in the second step is reduced for the cloud application. .
  • step size scaling parameter indicates that the number of application server virtual machines is increased, it is determined whether the number of application server clusters reaches the maximum capacity threshold; when the number of application server clusters reaches the maximum capacity threshold, the application server virtual machine is rejected for the cloud application; or
  • the number of application server virtual machines is reduced according to the step size scaling parameter, it is determined whether the number of application server clusters reaches a minimum capacity threshold; and when the number of application server clusters reaches a minimum capacity threshold, the number of application server virtual machines of the cloud application is maintained.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is Common implementations.
  • the solution of the present disclosure may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making one
  • the terminal device (which may be a cell phone, computer, server, or network device, etc.) performs the methods described in various embodiments of the present disclosure.
  • a configuration device of a cloud application resource is provided, which is used to implement the above examples and exemplary embodiments, and details are not described herein.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the devices described in the following embodiments are typically implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram of a configuration apparatus of a cloud application resource according to an embodiment of the present disclosure. As shown in FIG. 3, the apparatus includes:
  • the collecting module 30 is configured to collect current performance parameters of the cloud application and the number of application server clusters of the cloud application;
  • the determining module 32 is configured to determine a step size adjustment parameter of the cloud application according to the performance parameter and the number of application server clusters;
  • the configuration module 34 is configured to configure the number of application server virtual machines of the cloud application according to the step size adjustment parameter and the number of application server clusters.
  • the performance parameter may include at least one of the following application server virtual machines to which the cloud application belongs: CPU usage, memory occupancy, storage load, number of concurrent users of the cloud application, number of transmission control protocol TCP connections, number of hypertext transfer protocol HTTP connections , the number of database connections.
  • the determining module may further include: a first determining unit, configured to: when the performance parameter is greater than or equal to the first threshold, determine to increase the application server virtual machine of the cloud application, and according to the preset correspondence between the number of application server clusters and the scaling step Determining a first step length; the second determining unit is configured to: when the performance parameter is less than or equal to the second threshold, determine to reduce the application server virtual machine of the cloud application, and determine the second step number according to the correspondence relationship; wherein, the step size
  • the scaling adjustment parameter is used to describe: increase or decrease the number of steps in the application server virtual machine.
  • the configuration module may further include: a first configuration unit, configured to determine whether the number of application server clusters reaches a maximum capacity threshold when the step size scaling parameter indicates that the application server virtual machine is added; when the number of application server clusters does not reach the maximum capacity threshold, The cloud application adds a first number of application server virtual machines in a first step; the second configuration unit is configured to determine whether the number of application server clusters reaches a minimum capacity threshold when the step size scaling parameter indicates that the application server virtual machine is reduced; the number of application server clusters When the minimum capacity threshold is not reached, reduce the number of application server virtual machines in the second step for the cloud application.
  • the configuration module can also be configured to: determine whether the number of application server clusters reaches the maximum capacity threshold when the number of application server virtual machines is increased, and refuse to add applications to the cloud application when the number of application server clusters reaches the maximum capacity threshold.
  • the server virtual machine is configured to determine whether the number of application server clusters reaches a minimum capacity threshold when the number of application server virtual machines is reduced according to the step size scaling parameter; and the application server virtual machine of the cloud application is maintained when the number of application server clusters reaches a minimum capacity threshold Quantity.
  • the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the above modules are all located in the same processor; or, the above modules are respectively located in different combinations. In the processor.
  • a cloud application dynamic scaling method including:
  • a dynamic scaling policy is configured for each application server cluster.
  • the policy usually includes the correspondence between performance parameters, performance thresholds, and dynamic scaling steps.
  • the configuration is as follows: Table 1 is a dynamic scaling performance valve. The correspondence between the value and the dynamic scaling step.
  • the performance parameters include the CPU usage of the application server virtual machine, the memory occupancy and storage load, the number of concurrent users of the application system, the number of tcp connections, the number of http connections, and the number of database connections.
  • the dynamic scaling step size can be dynamically determined according to the current service situation, for example, according to the member size of the service processing cluster. For example, if the current number of cluster members is 1, the dynamic scaling step is 1, and the current cluster membership is 2 For 4 units, the dynamic scaling step size is 2. If the current number of cluster members is greater than 4, the dynamic scaling step size is 3. For example, the following table 2 is configured. Table 2 shows the correspondence between the number of cluster members and the dynamic scaling step.
  • the CPU occupancy interval configuration shown in Table 1 will be described below as an example.
  • the performance data of each application server in the application cluster is collected, and the application performance data is monitored according to the application dynamic scaling policy. If the performance detection meets the dynamic scaling condition, the relationship between the performance threshold and the dynamic scaling step is determined first. If the current CPU usage is greater than 70% and less than or equal to 90%, increase the application server VM and the corresponding dynamic scaling step is 2. Then create two application server VMs, deploy the application, and join. Application cluster. Conversely, if the current CPU occupancy is less than 15% and greater than or equal to 10%, the application server virtual machine is reduced, and the corresponding dynamic scaling step is 1; then, one activated application server virtual machine is removed from the application cluster. Then destroy the virtual machine.
  • a cloud application dynamic scaling system including:
  • the dynamic scaling policy configuration module configures the dynamic scaling policy of the application cluster, including the monitoring period, performance parameters, application cluster capacity, performance threshold, and dynamic scaling step correspondence list.
  • the performance parameters include the CPU usage of the application server virtual machine, the memory occupancy and storage load, the number of concurrent users of the application system, the number of tcp connections, the number of http connections, and the number of database connections.
  • the application cluster capacity includes the number of virtual machines of the application server minimum application server and the maximum number of virtual machines of the application server.
  • the corresponding relationship between the performance threshold and the dynamic scaling step is configured as shown in Table 1. If the current CPU occupancy is greater than 70% and less than or equal to 90%, the application server virtual machine is added, and the corresponding dynamics are added.
  • the scaling step is 2; otherwise, if the current CPU occupancy is less than 15% and greater than or equal to 10%, the application server virtual machine is reduced, and the corresponding dynamic scaling step is 1.
  • the performance data collection module collects performance parameters of each application server, and sends the collected performance parameters to the performance monitoring module.
  • the performance monitoring module analyzes the performance data of the application and compares it with the dynamic scaling policy to determine whether the dynamic scaling condition is met. If the dynamic scaling condition is met, first determine whether to increase or decrease, and determine the dynamic scaling step, and then send a message.
  • the dynamic scaling processing module is triggered to trigger the dynamic scaling process of the application.
  • the message includes information such as increasing or decreasing the virtual machine of the application server and the dynamic scaling step.
  • the dynamic scaling processing module processes the specific dynamic scaling process of the application. If the application server is added, first create a virtual machine with the number of dynamic scaling steps, deploy the application, and join the application cluster. If the application server is reduced, first select the active application server virtual machines of the dynamic scaling step number from the application server cluster, remove them from the application server cluster, and then destroy the application server virtual machines.
  • the cloud application dynamic scaling method and system according to the present disclosure are used to dynamically determine the dynamic scaling step according to the current performance processing capability of the system, and can be very It satisfies the system performance processing capabilities required by the business to improve the reliability and availability of the application.
  • the present disclosure provides a cloud application dynamic scaling method, and the method implementation is as follows:
  • FIG. 4 is a schematic flowchart of a cloud ring application dynamic scaling method according to an embodiment of the present disclosure, which includes the following four steps:
  • Step S102 Configure a dynamic scaling policy of the application cluster by using a dynamic scaling policy configuration module, including a monitoring period, a performance parameter, an application cluster capacity, a performance threshold, and a dynamic scaling step correspondence list.
  • a dynamic scaling policy configuration module including a monitoring period, a performance parameter, an application cluster capacity, a performance threshold, and a dynamic scaling step correspondence list.
  • Step S104 The performance data collection module collects performance data of each application and reports the performance data to the performance monitoring module.
  • Step S106 The performance monitoring module monitors the performance of the application and compares it with the dynamic scaling policy of the application. If the dynamic scaling policy condition is met, the dynamic scaling processing module is triggered to trigger the dynamic scaling processing process, and whether the message includes increasing or decreasing Application server virtual machine, and information such as this dynamic scaling step.
  • Step S108 The dynamic scaling processing module processes the specific dynamic scaling of the application. If the application server is added, the virtual machine of the dynamic scaling step number is first created, the application is deployed, and the application cluster is added. If the application server is reduced, first select the active application server virtual machines of the dynamic scaling step number from the application server cluster, remove them from the application server cluster, and then destroy the application server virtual machines.
  • FIG. 5 is a schematic diagram of a cloud application dynamic scaling increase structure according to an embodiment of the present disclosure.
  • the example application cluster is initially two active application servers.
  • the performance is monitored to meet the requirements of dynamic scaling to increase the virtual machine, first create a virtual machine with the number of dynamic scaling steps, deploy the application, and then join the application cluster.
  • the dynamic scaling step is dynamically determined based on the performance threshold and the dynamic scaling step relationship list. For example, the dynamic scaling step is 2.
  • FIG. 6 is a schematic diagram of a cloud application dynamic scaling reduction structure according to an embodiment of the present disclosure.
  • an application cluster initially is four activated application servers.
  • the dynamic scaling step is dynamically determined based on the performance threshold and the dynamic scaling step relationship list. For example, the dynamic scaling step is 2.
  • FIG. 7 is a flowchart of a cloud application dynamic scaling method process according to an embodiment of the present disclosure, including the following processing.
  • Step 1 Configure the dynamic scaling policy of the application cluster through the dynamic scaling policy configuration module, including the monitoring period, performance parameters, application cluster capacity, performance threshold, and dynamic scaling step correspondence list.
  • Step 2 Collect performance data of each application into an application performance database.
  • Step 3 Perform performance monitoring of the application according to the dynamic scaling policy of the application.
  • Step 4 If the threshold of dynamic expansion and contraction is reached, it is judged whether it is the upper limit threshold or the lower line threshold. If it is the upper threshold, increase the virtual machine, otherwise reduce the virtual machine. And the dynamic expansion step size is determined according to the correspondence between the performance threshold and the dynamic expansion step, for example, the dynamic expansion step is 2. If you are adding a virtual machine, go to the next step, otherwise go to step 6.
  • Step 5 Determine whether the current application server cluster reaches the maximum application cluster capacity. If the maximum capacity has been reached, do not perform any processing and go directly to step 2. If the maximum capacity has not been reached, create a virtual machine with the number of dynamic scaling steps, deploy the application, and join the application cluster. Then proceed to step 2. Pay special attention to this. If the total capacity of the application server virtual machine exceeds the maximum capacity of the application cluster after increasing the number of dynamic scaling steps, the maximum capacity of the application cluster minus the current application cluster capacity is taken as the dynamic scaling step. Ensure that the current application cluster capacity cannot be greater than the maximum capacity of the application cluster after this dynamic scaling.
  • Step 6 Determine whether the current application server cluster reaches the minimum application cluster capacity. If the application cluster minimum capacity has been reached, no processing is performed, and step 2 is directly performed. If the application cluster minimum capacity has not been reached, select the active application server virtual machine from the application server cluster, first remove the application cluster, and then destroy the virtual machines. Then proceed to step 2. It is important to note here that if the total capacity of the application server virtual machine after reducing the number of dynamic expansion steps is less than the minimum capacity of the application cluster, the current capacity of the application cluster minus the minimum capacity of the application cluster is taken as the dynamic expansion step. Ensure that the current application cluster capacity cannot be smaller than the minimum capacity of the application cluster after this dynamic scaling.
  • the present disclosure further provides a cloud application dynamic scaling system, and the system implementation is as follows:
  • FIG. 8 is a schematic structural diagram of a cloud application dynamic scaling system according to an embodiment of the present disclosure, including the following modules: a dynamic scaling policy configuration module, a performance data collection module, a performance monitoring module, and a dynamic scaling processing module, and the following templates for the system embodiments of the present disclosure are provided. Detailed instructions are given.
  • Dynamic scaling policy configuration module Configure the dynamic scaling policy of the application cluster, including the monitoring period, performance parameters, application cluster capacity, performance threshold, and dynamic scaling step correspondence list.
  • the performance parameters include the CPU usage of the application server virtual machine, the memory occupancy and storage load, the number of concurrent users of the application system, the number of tcp connections, the number of http connections, and the number of database connections.
  • the application cluster capacity includes the number of virtual machines of the application server minimum application server and the maximum number of virtual machines of the application server.
  • the corresponding relationship between the performance threshold and the dynamic scaling step is configured as shown in Table 1. If the current CPU occupancy is greater than 70% and less than or equal to 90%, the application server virtual machine is added, and the corresponding dynamics are added.
  • the scaling step is 2; otherwise, if the current CPU occupancy is less than 10% and greater than or equal to 5%, the application server virtual machine is reduced, and the corresponding dynamic scaling step is 2.
  • performance data acquisition module collect performance parameters of each application, including the CPU, memory and storage load of the application server virtual machine, the number of concurrent users of the application system, the number of tcp connections, the number of http requests, the number of database connections, etc., and The collected performance parameters are sent to the performance monitoring module.
  • Performance monitoring module analyze the performance data of each application and compare it with the dynamic scaling strategy to determine whether the application currently meets the dynamic scaling condition. If the dynamic scaling condition is met, first determine according to the performance threshold and the dynamic scaling step correspondence list. The dynamic scaling step is then sent to the dynamic scaling module to trigger the dynamic scaling process of the application.
  • the message includes information such as increasing or decreasing the virtual machine of the application server and the dynamic scaling step.
  • Dynamic scaling processing module Specifically processing the dynamic scaling of the application. If the application server is added, first create a virtual machine with the number of dynamic scaling steps, deploy the application, and join the application cluster. If the application server is reduced, first select the active application server virtual machines of the dynamic scaling step number from the application server cluster, remove them from the application server cluster, and then destroy the application server virtual machines.
  • the disclosure provides a cloud application dynamic scaling method and system, which can satisfactorily meet the performance processing capability required by the service and improve the reliability and availability of the application without occupying resources.
  • the problem to be solved in this embodiment is that the step size of overcoming the current dynamic expansion of the cloud application is fixedly configured, or the performance processing capability required for the current service cannot be handled well, resulting in loss of traffic or system downtime.
  • the risk will lead to a problem that is far greater than the system performance processing capability required by the current service, and the resources occupied are too large, resulting in waste of resources.
  • a cloud application dynamic scaling method and system are provided, which are dynamically determined according to the current performance processing capability of the system. This dynamic scaling step can meet the performance processing capabilities required by the service without occupying resources.
  • Embodiments of the present disclosure also provide a storage medium.
  • the above storage medium may be arranged to store program code for performing the following steps:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a medium that can store program code may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • the processor may perform to collect current performance parameters of the cloud application according to the stored program code in the storage medium, and the number of application server clusters of the cloud application;
  • the processor may perform step size scaling adjustment parameters for determining the cloud application according to the performance parameter and the number of application server clusters according to the stored program code in the storage medium;
  • the processor may execute the number of application server virtual machines configuring the cloud application according to the step size adjustment parameter and the number of application server clusters according to the stored program code in the storage medium.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the current performance parameter of the cloud application and the number of application server clusters of the cloud application are collected by the present disclosure; the step size adjustment parameter of the cloud application is determined according to the performance parameter and the number of application server clusters; Configuring the number of virtual machines of the application server of the cloud application by using the step size adjustment parameter and the number of application server clusters, and dynamically determining the number of virtual machines of the application server according to the current performance processing capability of the system, without occupying resources. Moreover, it can well meet the system performance processing capability required by the business, and solves the problem that the resource waste is easily caused when configuring the scaling step of the cloud application, and improves the reliability and availability of the application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)

Abstract

提供了一种云应用资源的配置方法及装置,其中,该方法包括:采集云应用当前的性能参数,以及云应用的应用服务器集群数;根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数;根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量。

Description

云应用资源的配置方法及装置 技术领域
本公开涉及云计算领域,具体而言,涉及一种云应用资源的配置方法及装置。
背景技术
随着云计算的推广和应用,越来越多的应用部署在云环境下,云计算具有动态调整资源的特点,因此很多应用,特别是基于负载均衡的集群应用,比如,web类应用,支持动态伸缩,即根据应用的负载情况,动态调整集群中的应用服务器,以提高应用的可靠性和可用性。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本公开实施例提供了一种云应用资源的配置方法及装置。
根据本公开的一个实施例,提供了一种云应用资源的配置方法,包括:采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量。
在示例性实施例中,所述性能参数包括所述云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
在示例性实施例中,根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数包括:在所述性能参数大于或等于第一阈值时,确定增加所述云应用的应用服务器虚机,以及根据预设的应用服务器集 群数和伸缩步长的对应关系确定第一步长数;在所述性能参数小于或等于第二阈值时,确定减少所述云应用的应用服务器虚机,以及根据所述对应关系确定第二步长数;其中,所述步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
在示例性实施例中,根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量包括:在所述步长伸缩参数指示增加应用服务器虚机时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数未达到所述最大容量阈值时,为所述云应用增加所述第一步长数个应用服务器虚机;或,在所述步长伸缩参数指示减少应用服务器虚机时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数未达到所述最小容量阈值时,为所述云应用减少所述第二步长数个应用服务器虚机。
在示例性实施例中,根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量包括:在所述步长伸缩参数指示增加应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数达到所述最大容量阈值时,拒绝为所述云应用增加应用服务器虚机;或,在根据所述步长伸缩参数确定减少应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数达到所述最小容量阈值时,保持所述云应用的应用服务器虚机数量。
根据本公开的另一个实施例,提供了一种云应用资源的配置装置,包括:采集模块,设置为采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;确定模块,设置为根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;配置模块,设置为根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量。
在示例性实施例中,所述性能参数包括所述云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
在示例性实施例中,所述确定模块还包括:第一确定单元,设置为在所述性能参数大于或等于第一阈值时,确定增加所述云应用的应用服务器虚机,以及根据预设的应用服务器集群数和伸缩步长的对应关系确定第一步长数;第二确定单元,设置为在所述性能参数小于或等于第二阈值时,确定减少所述云应用的应用服务器虚机,以及根据所述对应关系确定第二步长数;其中,所述步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
在示例性实施例中,所述配置模块还包括:第一配置单元,设置为在所述步长伸缩参数指示增加应用服务器虚机时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数未达到所述最大容量阈值时,为所述云应用增加所述第一步长数个应用服务器虚机;第二配置单元,设置为在所述步长伸缩参数指示减少应用服务器虚机时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数未达到所述最小容量阈值时,为所述云应用减少所述第二步长数个应用服务器虚机。
在示例性实施例中,所述配置模块还设置为:在所述步长伸缩参数指示增加应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数达到所述最大容量阈值时,拒绝为所述云应用增加应用服务器虚机;在根据所述步长伸缩参数确定减少应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数达到所述最小容量阈值时,保持所述云应用的应用服务器虚机数量。
根据本公开的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:
采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;
根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;
根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量。
通过本公开,采集云应用当前的性能参数,以及所述云应用的应用服务 器集群数;根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量,通过根据系统的当前性能处理能力动态确定应用服务器虚机的数量,在不多占用资源的条件下,又能够很好的满足业务所需的系统性能处理能力,解决了在配置云应用的伸缩步长时容易导致资源浪费的问题,提高了应用的可靠性和可用性。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
图1是云应用动态伸缩方案示意图;
图2是根据本公开实施例的云应用资源的配置方法的流程图;
图3是根据本公开实施例的云应用资源的配置装置的结构框图;
图4是本公开实施例的云环应用动态伸缩方法流程示意图;
图5是本公开实施例的云应用动态伸缩增加结构示意图;
图6是本公开实施例的云应用动态伸缩减少结构示意图;
图7是本公开实施例的云应用动态伸缩方法处理流程图;
图8是本公开实施例的云应用动态伸缩系统的结构示意图。
具体实施方式
图1是目前云应用动态伸缩方案示意图,如图1,主要是通过应用的性能监测,以及和动态伸缩策略对比来进行动态伸缩,动态伸缩策略里一般包括性能参数阀值、伸缩步长(一次动态伸缩增加或减少的应用服务器数量),如果判断要增加应用服务器时,创建一台应用服务器虚机(以动态伸缩步长为1来说明,如果步长是2,则一次增加2台虚机,以此类推,以下同),部署应用,加入应用集群,如果判断要减少应用服务器时,则从应用集群中移除一台激活的应用服务器虚机,然后销毁该虚机。这存在一个问题,动态伸缩的步长是固定的,比如1或3,这样的话,如果步长配置的较小,比如 1,当前系统业务量很大的话,一次性增加一台应用服务器虚机,不能满足当前系统的性能处理能力,导致业务丢失,严重时甚至会导致系统宕机;如果步长配置较大,比如3,当前系统业务量不太大,但是刚满足动态伸缩条件,一次性增加三台应用服务器虚机,使得当前系统性能处理能力远大于实际业务需要的性能处理能力,从而造成系统资源浪费。
目前云应用的动态伸缩技术和实现方案,对动态伸缩步长的配置是固定的,要么会导致不能很好的处理当前业务所需性能处理能力,导致业务量丢失或有系统宕机风险,要么会导致远大于当前业务所需的系统性能处理能力,占用的资源太多,导致资源浪费。针对这个问题,本公开提出一种云应用动态伸缩方法和系统,在不多占用资源的条件下,又能够很好的满足业务所需的性能处理能力。
针对上述问题,目前尚未发现有效的解决方案。
下文中将参考附图并结合实施例来详细说明本公开。
本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
示例1
在本示例中提供了一种云应用资源的配置方法,图2是根据本公开实施例的云应用资源的配置方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,采集云应用当前的性能参数,以及云应用的应用服务器集群数;
步骤S204,根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数;
步骤S206,根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量。
通过上述步骤,采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量,通过根据系统的当前性能处理能力 动态确定应用服务器虚机的数量,在不多占用资源的条件下,又能够很好的满足业务所需的系统性能处理能力,解决了在配置云应用的伸缩步长时容易导致资源浪费的问题,提高了应用的可靠性和可用性。
上述步骤的执行主体可以为云应用系统,或云应用管理系统等,微观上可以是处理器,但不限于此。
本示例中的性能参数可以包括云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
在根据本示例的示例性实施方式中,根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数包括:
在性能参数大于或等于第一阈值时,确定增加云应用的应用服务器虚机,以及根据预设的应用服务器集群数和伸缩步长的对应关系确定第一步长数;
在性能参数小于或等于第二阈值时,确定减少云应用的应用服务器虚机,以及根据对应关系确定第二步长数;
其中,步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
在根据本示例的示例性实施方式中,根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量包括以下具体的场景:
在步长伸缩参数指示增加应用服务器虚机时,判断应用服务器集群数是否达到最大容量阈值;在应用服务器集群数未达到最大容量阈值时,为云应用增加第一步长数个应用服务器虚机;
在步长伸缩参数指示减少应用服务器虚机时,判断应用服务器集群数是否达到最小容量阈值;在应用服务器集群数未达到最小容量阈值时,为云应用减少第二步长数个应用服务器虚机。
在步长伸缩参数指示增加应用服务器虚机的数量时,判断应用服务器集群数是否达到最大容量阈值;在应用服务器集群数达到最大容量阈值时,拒 绝为云应用增加应用服务器虚机;或,
在根据步长伸缩参数确定减少应用服务器虚机的数量时,判断应用服务器集群数是否达到最小容量阈值;在应用服务器集群数达到最小容量阈值时,保持云应用的应用服务器虚机数量。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是常用的实施方式。基于这样的理解,本公开的方案本质上可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
示例2
在本示例中提供了一种云应用资源的配置装置,该装置用于实现上述示例及示例性实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置通常以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本公开实施例的云应用资源的配置装置的结构框图,如图3所示,该装置包括:
采集模块30,设置为采集云应用当前的性能参数,以及云应用的应用服务器集群数;
确定模块32,设置为根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数;
配置模块34,设置为根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量。
性能参数可以包括云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
确定模块还可以包括:第一确定单元,设置为在性能参数大于或等于第一阈值时,确定增加云应用的应用服务器虚机,以及根据预设的应用服务器集群数和伸缩步长的对应关系确定第一步长数;第二确定单元,设置为在性能参数小于或等于第二阈值时,确定减少云应用的应用服务器虚机,以及根据对应关系确定第二步长数;其中,步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
配置模块还可以包括:第一配置单元,设置为在步长伸缩参数指示增加应用服务器虚机时,判断应用服务器集群数是否达到最大容量阈值;在应用服务器集群数未达到最大容量阈值时,为云应用增加第一步长数个应用服务器虚机;第二配置单元,设置为在步长伸缩参数指示减少应用服务器虚机时,判断应用服务器集群数是否达到最小容量阈值;在应用服务器集群数未达到最小容量阈值时,为云应用减少第二步长数个应用服务器虚机。
配置模块还可以设置为:在步长伸缩参数指示增加应用服务器虚机的数量时,判断应用服务器集群数是否达到最大容量阈值;在应用服务器集群数达到最大容量阈值时,拒绝为云应用增加应用服务器虚机;在根据步长伸缩参数确定减少应用服务器虚机的数量时,判断应用服务器集群数是否达到最小容量阈值;在应用服务器集群数达到最小容量阈值时,保持云应用的应用服务器虚机数量。
上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
示例3
本示例是根据本公开的示例性实施例,用于结合具体的实例对本公开进行详细说明:
根据本实施例的一个方面,提供了一种云应用动态伸缩方法,包括:
在应用服务器集群的基础上,为每个应用服务器集群配置动态伸缩策略,策略通常包括性能参数、性能阀值和动态伸缩步长的对应关系,举例配置如下表1,表1是动态伸缩性能阀值和动态伸缩步长的对应关系。
性能参数 性能阀值 动态伸缩步长
CPU占有率 >50%and<=70% 1
CPU占有率 >70%and<=90% 2
CPU占有率 >90% 3
CPU占有率 <15%and>=10% 1
CPU占有率 <10%and>=5% 2
CPU占有率 <5% 3
性能参数包括应用服务器虚机的CPU占用率、内存占有率和存储的负载、应用系统的并发用户数量、tcp连接数量、http连接数量、数据库连接数量等。
可以根据当前业务情况来动态确定动态伸缩步长,比如根据业务处理集群的成员规模来动态确定,例如:当前集群成员数是1台,则动态伸缩步长为1,当前集群成员数是2~4台,则动态伸缩步长为2,当前集群成员数大于4台,则动态伸缩步长为3。举例配置如下表2,表2是集群成员数和动态伸缩步长的对应关系。
性能参数 阀值 集群成员数 步长
CPU占有率 >70% 1 1
CPU占有率 >70% 2>=and<=4 2
CPU占有率 >70% >4 3
CPU占有率 <10% 1 1
CPU占有率 <10% 2>=and<=4 2
CPU占有率 <10% >4 3
下面以表1中所示的CPU占有率区间配置为例来说明。
采集应用集群里的各个应用服务器的性能数据,并根据应用动态伸缩策略监测应用性能数据,如果性能检测到满足动态伸缩的条件,首先根据性能阀值和动态伸缩步长的对应关系,确定本次动态伸缩步长,比如当前CPU占 有率大于70%,并且小于等于90%,则增加应用服务器虚机,而且对应的动态伸缩步长为2;然后创建2台应用服务器虚机,部署应用,加入应用集群。反之,比如当前CPU占有率小于15%,并且大于等于10%,则减少应用服务器虚机,而且对应的动态伸缩步长为1;然后从应用集群中移除1台激活的应用服务器虚机,然后销毁该虚机。
作为本方案的另一种实施方式,还提供一种云应用动态伸缩系统,包括:
动态伸缩策略配置模块,配置应用集群的动态伸缩策略,包括监测周期、性能参数、应用集群容量、性能阀值和动态伸缩步长的对应关系列表。其中,性能参数包括应用服务器虚机的CPU占用率、内存占有率和存储的负载、应用系统的并发用户数量、tcp连接数量、http连接数量、数据库连接数量等。其中应用集群容量,包括应用集群最小应用服务器虚机个数、最大应用服务器虚机数。其中性能阀值和动态伸缩步长的对应关系列表,以CPU负载为例配置如表1,如果当前CPU占有率大于70%,并且小于等于90%,则增加应用服务器虚机,而且对应的动态伸缩步长为2;反之,如果当前CPU占有率小于15%,并且大于等于10%,则减少应用服务器虚机,而且对应的动态伸缩步长为1。
性能数据采集模块,采集各个应用服务器的性能参数,并将所采集的性能参数发送给性能监测模块。
性能监测模块,分析应用的性能数据,并和动态伸缩策略进行比较来判断是否满足动态伸缩条件,如果满足动态伸缩条件,首先确定是增加还是减少,并且确定本次动态伸缩步长,然后发消息给动态伸缩处理模块,触发该应用的动态伸缩处理过程。消息中包含是增加还是减少应用服务器虚机,以及本次动态伸缩步长等信息。
动态伸缩处理模块,处理应用的具体动态伸缩过程,如果是增加应用服务器的情况,首先创建本次动态伸缩步长数量的虚机,部署好应用,加入应用集群。如果是减少应用服务器的情况,则首先从应用服务器集群中选择本次动态伸缩步长数量的激活应用服务器虚机,并将它们从应用服务器集群中移出,然后销毁这些应用服务器虚机。
通过本实施例的方案,采用本公开所述一种云应用动态伸缩方法和系 统,通过根据系统的当前性能处理能力动态确定本次动态伸缩步长,在不多占用资源的条件下,能够很好地满足业务所需的系统性能处理能力,提高了应用的可靠性和可用性。
本公开提供了一种云应用动态伸缩方法和系统,下面结合附图并举例对方案的实施作详细描述。
本公开提供一种云应用动态伸缩方法,方法实施例如下:
图4是本公开实施例的云环应用动态伸缩方法流程示意图,包括以下四个步骤:
步骤S102:通过动态伸缩策略配置模块配置应用集群的动态伸缩策略,包括监测周期、性能参数、应用集群容量、性能阀值和动态伸缩步长的对应关系列表。
步骤S104:性能数据采集模块采集各个应用的性能数据,并上报给性能监测模块。
步骤S106:性能监测模块监测应用的性能情况,并和应用的动态伸缩策略进行比较,如果满足动态伸缩策略条件,则发消息给动态伸缩处理模块触发动态伸缩处理过程,消息中包含是增加还是减少应用服务器虚机,以及本次动态伸缩步长等信息。
步骤S108:动态伸缩处理模块处理应用的具体动态伸缩,如果是增加应用服务器的情况,首先创建本次动态伸缩步长数量的虚机,部署好应用,加入应用集群。如果是减少应用服务器的情况,则首先从应用服务器集群中选择本次动态伸缩步长数量的激活应用服务器虚机,并将它们从应用服务器集群中移出,然后销毁这些应用服务器虚机。
图5是本公开实施例的云应用动态伸缩增加结构示意图,举例的应用集群初始是2台激活的应用服务器。当性能监测到满足动态伸缩增加虚机条件时,首先创建本次动态伸缩步长数量的虚机,部署好应用,然后加入应用集群。动态伸缩步长是根据性能阀值和动态伸缩步长关系列表动态确定,例如本次动态伸缩步长为2。
图6是本公开实施例的云应用动态伸缩减少结构示意图,举例的应用集 群初始是4台激活的应用服务器。当性能监测到满足动态伸缩减少虚机条件时,首先从应用服务器集群中选择本次动态伸缩步长数量的激活应用服务器虚机,并从应用集群中移除,然后销毁这些虚机。动态伸缩步长是根据性能阀值和动态伸缩步长关系列表动态确定,例如本次动态伸缩步长为2。
图7是本公开实施例的云应用动态伸缩方法处理流程图,包括以下处理。
步骤1、通过动态伸缩策略配置模块配置应用集群的动态伸缩策略,包括监测周期、性能参数、应用集群容量、性能阀值和动态伸缩步长的对应关系列表。
步骤2、采集各个应用的性能数据到应用性能数据库中。
步骤3、根据应用的动态伸缩策略进行应用的性能监测。
步骤4、如果达到动态伸缩的阀值,则判断是上限阀值,还是下线阀值。如果是上限阀值,则增加虚机,否则减少虚机。并且根据性能阀值和动态伸缩步长的对应关系列表,确定本次动态伸缩步长,例如本次动态伸缩步长为2。如果是增加虚机,进入下一步,否则进入步骤6。
步骤5、判断当前应用服务器集群是否达到应用集群容量最大值,如果已经达到最大容量,则不进行任何处理,直接进入步骤2。如果还没有达到最大容量,则根据预先设置好的应用镜像,创建本次动态伸缩步长数量虚机,部署好应用,加入应用集群。然后进入步骤2。这里要特别注意一下,如果增加本次动态伸缩步长数量的应用服务器虚机后总容量超过应用集群的最大容量的话,取应用集群最大容量减去当前应用集群容量作为本次动态伸缩步长。确保本次动态伸缩后当前应用集群容量不能大于应用集群最大容量。
步骤6、判断当前应用服务器集群是否达到应用集群容量最小值,如果已经达到应用集群最小容量,则不进行任何处理,直接进入步骤2。如果还没有达到应用集群最小容量,则从应用服务器集群中选择伸缩步长数量的激活应用服务器虚机,先从应用集群中移除,然后销毁这些虚机。然后进入步骤2。这里要特别注意一下,如果减少本次动态伸缩步长数量的应用服务器虚机后总容量小于应用集群的最小容量的话,取应用集群当前容量减去应用 集群最小容量作为本次动态伸缩步长,确保本次动态伸缩后当前应用集群容量不能小于应用集群最小容量。
本公开提供还一种云应用动态伸缩系统,系统实施例如下:
图8是本公开实施例的云应用动态伸缩系统的结构示意图,包括以下模块:动态伸缩策略配置模块、性能数据采集模块、性能监测模块、动态伸缩处理模块,以下对本公开系统实施例的各个模板进行详细说明。
1、动态伸缩策略配置模块:配置应用集群的动态伸缩策略,包括监测周期、性能参数、应用集群容量、性能阀值和动态伸缩步长的对应关系列表。其中,性能参数包括应用服务器虚机的CPU占用率、内存占有率和存储的负载、应用系统的并发用户数量、tcp连接数量、http连接数量、数据库连接数量等。其中应用集群容量,包括应用集群最小应用服务器虚机个数、最大应用服务器虚机数。其中性能阀值和动态伸缩步长的对应关系列表,以CPU负载为例配置如表1,如果当前CPU占有率大于70%,并且小于等于90%,则增加应用服务器虚机,而且对应的动态伸缩步长为2;反之,如果当前CPU占有率小于10%,并且大于等于5%,则减少应用服务器虚机,而且对应的动态伸缩步长为2。
2、性能数据采集模块:采集各个应用的性能参数,包括应用服务器虚机的CPU、内存和存储的负载、应用系统的并发用户数量、tcp连接数量、http请求数量、数据库连接数量等,并将所采集的性能参数发送给性能监测模块。
3、性能监测模块:分析各个应用的性能数据,并和动态伸缩策略进行比较,判断应用当前是否满足动态伸缩条件,如果满足动态伸缩条件,首先根据性能阀值和动态伸缩步长对应关系列表确定本次动态伸缩步长,然后发消息给动态伸缩模块,触发该应用的动态伸缩处理过程。消息中包含是增加还是减少应用服务器虚机,以及本次动态伸缩步长等信息。
4、动态伸缩处理模块:具体处理应用的动态伸缩,如果是增加应用服务器的情况,首先创建本次动态伸缩步长数量的虚机,部署好应用,加入应用集群。如果是减少应用服务器的情况,则首先从应用服务器集群中选择本次动态伸缩步长数量的激活的应用服务器虚机,并将它们从应用服务器集群 中移出,然后销毁这些应用服务器虚机。
通过本公开提供一种云应用动态伸缩方法和系统,在不多占用资源的条件下,又能够很好的满足业务所需的性能处理能力,提高了应用的可靠性和可用性。
本实施例所解决的问题是:克服目前存在的云应用动态伸缩的步长是固定配置的,要么会导致不能很好的处理当前业务所需性能处理能力,导致业务量丢失或有系统宕机风险,要么会导致远大于当前业务所需的系统性能处理能力,占用的资源太多,导致资源浪费的问题,提供一种云应用动态伸缩方法和系统,通过根据系统的当前性能处理能力动态确定本次动态伸缩步长,在不多占用资源的条件下,又能够很好的满足业务所需的性能处理能力。
示例4
本公开的实施例还提供了一种存储介质。可选地,在本示例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,采集云应用当前的性能参数,以及云应用的应用服务器集群数;
S2,根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数;
S3,根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量。
在本示例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
在本示例中,处理器可以根据存储介质中已存储的程序代码执行采集云应用当前的性能参数,以及云应用的应用服务器集群数;
在本示例中,处理器可以根据存储介质中已存储的程序代码执行根据性能参数和应用服务器集群数确定云应用的步长伸缩调整参数;
在本示例中,处理器可以根据存储介质中已存储的程序代码执行根据步长伸缩调整参数和应用服务器集群数配置云应用的应用服务器虚机的数量。
本示例中的具体例子可以参考上述示例及示例性的实施方式中所描述 的示例,本示例在此不再赘述。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上所述仅为本公开的示例性实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。
工业实用性
通过本公开,采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量,通过根据系统的当前性能处理能力动 态确定应用服务器虚机的数量,在不多占用资源的条件下,又能够很好的满足业务所需的系统性能处理能力,解决了在配置云应用的伸缩步长时容易导致资源浪费的问题,提高了应用的可靠性和可用性。

Claims (12)

  1. 一种云应用资源的配置方法,包括:
    采集云应用当前的性能参数,以及所述云应用的应用服务器集群数(S202);
    根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数(S204);
    根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量(S206)。
  2. 根据权利要求1所述的方法,其中,所述性能参数包括所述云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
  3. 根据权利要求1所述的方法,其中,根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数(S204)包括:
    在所述性能参数大于或等于第一阈值时,确定增加所述云应用的应用服务器虚机,以及根据预设的应用服务器集群数和伸缩步长的对应关系确定第一步长数;
    在所述性能参数小于或等于第二阈值时,确定减少所述云应用的应用服务器虚机,以及根据所述对应关系确定第二步长数;
    其中,所述步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
  4. 根据权利要求3所述的方法,其中,根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量(S206)包括:
    在所述步长伸缩参数指示增加应用服务器虚机时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数未达到所述最大容量阈值时,为所述云应用增加所述第一步长数个应用服务器虚机;或,
    在所述步长伸缩参数指示减少应用服务器虚机时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数未达到所述最小容量阈值时,为所述云应用减少所述第二步长数个应用服务器虚机。
  5. 根据权利要求3或4所述的方法,其中,根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量(S206)包括:
    在所述步长伸缩参数指示增加应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数达到所述最大容量阈值时,拒绝为所述云应用增加应用服务器虚机;或,
    在根据所述步长伸缩参数确定减少应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数达到所述最小容量阈值时,保持所述云应用的应用服务器虚机数量。
  6. 一种云应用资源的配置装置,包括:
    采集模块(30),设置为采集云应用当前的性能参数,以及所述云应用的应用服务器集群数;
    确定模块(32),设置为根据所述性能参数和所述应用服务器集群数确定所述云应用的步长伸缩调整参数;
    配置模块(34),设置为根据所述步长伸缩调整参数和所述应用服务器集群数配置所述云应用的应用服务器虚机的数量。
  7. 根据权利要求6所述的装置,其中,所述性能参数包括所述云应用所属的应用服务器虚机的以下至少之一:CPU占用率、内存占有率、存储负载、云应用的并发用户数量、传输控制协议TCP连接数量、超文本传输协议HTTP连接数量、数据库连接数量。
  8. 根据权利要求6所述的装置,其中,所述确定模块(32)还包括:
    第一确定单元,设置为在所述性能参数大于或等于第一阈值时,确定增加所述云应用的应用服务器虚机,以及根据预设的应用服务器集群数和伸缩步长的对应关系确定第一步长数;
    第二确定单元,设置为在所述性能参数小于或等于第二阈值时,确定减 少所述云应用的应用服务器虚机,以及根据所述对应关系确定第二步长数;
    其中,所述步长伸缩调整参数用于描述:增加或减少应用服务器虚机,步长数。
  9. 根据权利要求8所述的装置,其中,所述配置模块(34)还包括:
    第一配置单元,设置为在所述步长伸缩参数指示增加应用服务器虚机时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数未达到所述最大容量阈值时,为所述云应用增加所述第一步长数个应用服务器虚机;
    第二配置单元,设置为在所述步长伸缩参数指示减少应用服务器虚机时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数未达到所述最小容量阈值时,为所述云应用减少所述第二步长数个应用服务器虚机。
  10. 根据权利要求8或9所述的装置,其中,所述配置模块(34)还设置为:
    在所述步长伸缩参数指示增加应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最大容量阈值;在所述应用服务器集群数达到所述最大容量阈值时,拒绝为所述云应用增加应用服务器虚机;
    在根据所述步长伸缩参数确定减少应用服务器虚机的数量时,判断所述应用服务器集群数是否达到最小容量阈值;在所述应用服务器集群数达到所述最小容量阈值时,保持所述云应用的应用服务器虚机数量。
  11. 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行权利要求1至5中任一项所述的方法。
  12. 一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行权利要求1至5中任一项所述的方法。
PCT/CN2018/075286 2017-04-11 2018-02-05 云应用资源的配置方法及装置 WO2018188405A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710232383.9 2017-04-11
CN201710232383.9A CN108696556A (zh) 2017-04-11 2017-04-11 云应用资源的配置方法及装置

Publications (1)

Publication Number Publication Date
WO2018188405A1 true WO2018188405A1 (zh) 2018-10-18

Family

ID=63792809

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075286 WO2018188405A1 (zh) 2017-04-11 2018-02-05 云应用资源的配置方法及装置

Country Status (2)

Country Link
CN (1) CN108696556A (zh)
WO (1) WO2018188405A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225004A (zh) * 2018-11-23 2020-06-02 中移(杭州)信息技术有限公司 一种服务器集群的扩容方法、装置和可读介质
CN111610994A (zh) * 2020-05-20 2020-09-01 山东汇贸电子口岸有限公司 一种云数据中心的部署方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120254443A1 (en) * 2011-03-30 2012-10-04 International Business Machines Corporation Information processing system, information processing apparatus, method of scaling, program, and recording medium
CN103220337A (zh) * 2013-03-22 2013-07-24 合肥工业大学 基于自适应弹性控制的云计算资源优化配置方法
CN106133696A (zh) * 2014-03-31 2016-11-16 微软技术许可有限责任公司 缩放云资源时动态标识目标容量
CN106412075A (zh) * 2016-10-14 2017-02-15 郑州云海信息技术有限公司 一种基于云计算的资源配置方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701920A (zh) * 2013-12-31 2014-04-02 曙光云计算技术有限公司 云环境下配置虚拟应用服务器的方法
CN106293868A (zh) * 2015-05-15 2017-01-04 苏宁云商集团股份有限公司 一种云计算环境中虚拟机扩缩容方法及扩缩容系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120254443A1 (en) * 2011-03-30 2012-10-04 International Business Machines Corporation Information processing system, information processing apparatus, method of scaling, program, and recording medium
CN103220337A (zh) * 2013-03-22 2013-07-24 合肥工业大学 基于自适应弹性控制的云计算资源优化配置方法
CN106133696A (zh) * 2014-03-31 2016-11-16 微软技术许可有限责任公司 缩放云资源时动态标识目标容量
CN106412075A (zh) * 2016-10-14 2017-02-15 郑州云海信息技术有限公司 一种基于云计算的资源配置方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225004A (zh) * 2018-11-23 2020-06-02 中移(杭州)信息技术有限公司 一种服务器集群的扩容方法、装置和可读介质
CN111225004B (zh) * 2018-11-23 2022-11-22 中移(杭州)信息技术有限公司 一种服务器集群的扩容方法、装置和可读介质
CN111610994A (zh) * 2020-05-20 2020-09-01 山东汇贸电子口岸有限公司 一种云数据中心的部署方法、装置、设备及存储介质
CN111610994B (zh) * 2020-05-20 2023-10-20 山东汇贸电子口岸有限公司 一种云数据中心的部署方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN108696556A (zh) 2018-10-23

Similar Documents

Publication Publication Date Title
US10972344B2 (en) Automated adjustment of subscriber policies
US9838483B2 (en) Methods, systems, and computer readable media for a network function virtualization information concentrator
CN102567072B (zh) 一种资源分配方法、装置及系统
EP3335120B1 (en) Method and system for resource scheduling
US9532359B2 (en) Resource allocation method and device
CN107426274B (zh) 基于时序的业务应用及监控分析调度的方法和系统
WO2018121334A1 (zh) 一种提供网页应用服务的方法、装置、电子设备及系统
CN111767142B (zh) 服务节点的限流阈值设置方法和服务端设备
CN106230997A (zh) 一种资源调度方法和装置
CN110245031B (zh) 一种ai服务开放中台及方法
WO2021083243A1 (zh) 一种网络切片实例配置方法和装置
CN103414657A (zh) 一种跨数据中心的资源调度方法、超级调度中心和系统
WO2018121210A1 (zh) 一种PaaS平台容器化应用的弹缩方法及装置
CN104239150A (zh) 一种硬件资源调整的方法及装置
CN110912972A (zh) 一种业务处理方法、系统、电子设备及可读存储介质
CN105847377A (zh) 集群网络的请求拥塞过载处理方法及系统
WO2018188405A1 (zh) 云应用资源的配置方法及装置
CN111291252B (zh) 一种每秒查询率的调整方法、装置、电子设备及存储介质
CN115277577A (zh) 数据处理方法、装置、计算机设备和计算机可读存储介质
CN105162823A (zh) 一种虚拟机管理方法及装置
CN114003377A (zh) 一种基于es服务的内存熔断方法、装置、设备及可读介质
WO2017118129A1 (zh) 频谱资源共享的方法和装置
CN108882296B (zh) 一种处理报文的方法及装置
CN107835104B (zh) 网络切片间nf用户许可共享方法、系统、设备及存储介质
US11902829B2 (en) Traffic pattern identification and network function control method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18784810

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18784810

Country of ref document: EP

Kind code of ref document: A1