WO2018086467A1 - Method, apparatus and system for allocating resources of application clusters under cloud environment - Google Patents

Method, apparatus and system for allocating resources of application clusters under cloud environment Download PDF

Info

Publication number
WO2018086467A1
WO2018086467A1 PCT/CN2017/108252 CN2017108252W WO2018086467A1 WO 2018086467 A1 WO2018086467 A1 WO 2018086467A1 CN 2017108252 W CN2017108252 W CN 2017108252W WO 2018086467 A1 WO2018086467 A1 WO 2018086467A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
application cluster
application
resources
level
Prior art date
Application number
PCT/CN2017/108252
Other languages
French (fr)
Chinese (zh)
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 WO2018086467A1 publication Critical patent/WO2018086467A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1053Group management mechanisms  with pre-configuration of logical or physical connections with a determined number of other peers
    • H04L67/1057Group management mechanisms  with pre-configuration of logical or physical connections with a determined number of other peers involving pre-assessment of levels of reputation of peers

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a method for applying cluster resource allocation in a cloud environment, a device for applying cluster resource allocation in a cloud environment, and a system for applying cluster resource allocation in a cloud environment.
  • Cloud computing is a computing model that provides dynamically scalable virtual resources over the Internet in a service manner. In this way, shared hardware and software resources and information can be provided to computers and other devices on demand.
  • the basic environment of cloud computing is virtualization, and resource sharing exists in the virtualized environment.
  • a cloud computing environment hereinafter referred to as a cloud environment
  • virtual machines VMs, Virtual Machines
  • system resources of these virtual machines are mainly associated.
  • embodiments of the present application are provided to provide a method for applying cluster resource allocation in a cloud environment, which overcomes the above problems or at least partially solves the above problems, and a device for applying cluster resource allocation in a cloud environment, and A system for applying cluster resource allocation in a cloud environment.
  • the embodiment of the present application discloses a system for applying cluster resource allocation in a cloud environment, where the system includes:
  • One or more processors are One or more processors;
  • One or more modules the one or more modules being stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functions:
  • the resource load level includes a high Occupancy level and low occupancy level
  • the resource of the application cluster with a low occupation level is released according to the resource load level
  • the embodiment of the present application further discloses a method for applying cluster resource allocation in a cloud environment, including:
  • the resource load level includes a high occupancy level and a low occupancy level
  • the resource of the application cluster with a low occupation level is released according to the resource load level
  • the step of acquiring the resource usage rate of each application cluster in the specified transaction link in the cloud environment includes:
  • the cloud environment includes a resource pool
  • the step of applying for resources for the application cluster with a high occupancy level includes:
  • the application cluster has a corresponding priority
  • the step of allocating resources in the resource pool to an application cluster with a high occupancy level includes:
  • the resources in the resource pool are allocated according to the application cluster whose priority is a high occupation level.
  • the resource load level has a corresponding release ratio
  • the step of releasing resources of the application cluster of the low occupancy level according to the resource load level includes:
  • the step of releasing resources of the low occupancy level application cluster according to a release ratio comprises:
  • the idle resource is released according to the release ratio.
  • the step of allocating the released resources to the application cluster of the high occupancy level comprises:
  • the embodiment of the present application further discloses an apparatus for applying cluster resource allocation in a cloud environment, including:
  • a resource usage acquisition module configured to acquire resource usage rates of application clusters in a specified transaction link in a cloud environment
  • a resource load level determining module configured to determine a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupancy level and a low occupancy level;
  • a resource application obtaining module configured to apply for resources for the application cluster of the high occupancy level
  • a resource release module configured to release resources of an application cluster of a low occupancy level according to a resource load level if the resource application fails for the application cluster of the high occupancy level
  • a resource allocation module configured to allocate the released resource to the application cluster of the high occupancy level.
  • the embodiment of the present application further discloses a method for applying cluster resource allocation in a cloud environment, including:
  • the resource load level includes a resource full load level and other levels
  • the released resources are allocated to an application cluster of the resource full load level.
  • the step of acquiring the resource load status of each application cluster in the cloud environment includes:
  • the cloud environment includes a resource pool
  • the step of applying for resources for the application cluster of the resource full load level includes:
  • the resources in the resource pool are allocated to the application cluster of the resource full load level;
  • the application cluster has a corresponding priority
  • the step of allocating resources in the resource pool to an application cluster of a resource full load level includes:
  • the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
  • the resource load level has a corresponding release ratio
  • the step of releasing resources of other levels of the application cluster according to the resource load level includes:
  • the step of releasing resources of the other application cluster according to a release ratio comprises:
  • the idle resource is released according to the release ratio.
  • the step of allocating the released resource to the application cluster of the resource full load level comprises:
  • the embodiment of the present application further discloses an apparatus for applying cluster resource allocation in a cloud environment, including:
  • a resource load status obtaining module configured to acquire a resource load status of each application cluster in a cloud environment
  • a resource load level determining module configured to determine a resource load level of the application cluster according to the resource load status; the resource load level includes a resource full load level and other levels;
  • a resource application module configured to apply for resources for an application cluster of the resource full load level
  • a resource release module configured to release resources of other levels of the application cluster according to a resource load level when the application cluster for the resource full load level fails to apply for a resource
  • And releasing a resource allocation module configured to allocate the released resource to an application cluster of the resource full load level.
  • the cluster is applied in a cloud environment, and the resource load level of the application cluster is determined according to the load state of each application cluster. If the application cluster with the full load level exists, the resource is applied for the application cluster. If it fails, it requests other levels of application clusters to release resources, and finally allocates the released resources to the application cluster at the resource full level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
  • Embodiment 1 is a flow chart of the steps of Embodiment 1 of a method for applying cluster resource allocation in a cloud environment according to the present application;
  • FIG. 2 is a schematic diagram of resource allocation of an application cluster in a cloud environment according to the present application
  • Embodiment 3 is a flow chart of steps in Embodiment 2 of a method for applying cluster resource allocation in a cloud environment according to the present application;
  • FIG. 4 is a structural block diagram of an apparatus for applying cluster resource allocation in a cloud environment according to the present application
  • FIG. 5 is a schematic structural diagram of a server embodiment of the present application.
  • one or more application clusters can be used to complete specific services independently, and the application clusters can form a transaction link to complete a complete transaction.
  • a transaction link to complete a complete transaction.
  • a series of tasks such as commodity, logistics, certification, and marketing are completed in the application cluster of the supply chain.
  • Transaction link pressure measurement can be used to test the processing efficiency of the transaction link of the application cluster.
  • the transaction link pressure test simulates various performance indicators of the application cluster through automatic test tools to simulate various normal, peak and abnormal load conditions, detects the performance bottleneck of the application cluster, and improves the processing capability of the application cluster.
  • the current transaction link pressure test only tests the performance bottleneck of the application cluster, and when the access traffic reaches the target value, for example, when the access traffic reaches 15 W, the processing capability of the application cluster is no longer detected, and the resources cannot be fully utilized. .
  • the embodiment of the present application is applied to a cluster in a cloud environment, and is in the process of pressure measurement on a specified platform.
  • FIG. 1 a flow chart of steps of a method for applying cluster resource allocation in a cloud environment according to the present application is shown, which may specifically include the following steps:
  • Step 101 Obtain a resource load status of each application cluster in a cloud environment.
  • an application cluster of a transaction link is first combed, and the application cluster is connected to a specified platform to form a cloud environment. In this cloud environment, it is possible to plan the application cluster.
  • an application cluster includes an application A cluster, an application B cluster, and an application C cluster.
  • the application clusters are connected to a specified platform, and the application clusters on the platform can share resources.
  • the resource load status of the application cluster refers to the resource usage rate of the application cluster.
  • the resources may include capacity, CPU, memory, disk I/O, network bandwidth, and the like. In some cases, the resource usage of the application cluster can reach 100%.
  • the step 101 may include the following sub-steps:
  • Sub-step S11 when the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
  • the embodiment of the present application detects the performance bottleneck of the current application cluster by performing a pressure test on the transaction link.
  • the performance bottleneck that is, the resource usage rate reaches a dangerous threshold, the application cluster will not work properly.
  • the embodiment of the present application acquires the resource load status of each application cluster in the cloud environment.
  • Step 102 Determine, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
  • the resource load level of the application cluster is determined according to its resource load status, and the resource load level can be used to represent the resource usage rate of the application cluster.
  • the resource load level can include the resource full load level and other levels.
  • the resource full load level means that the resource usage of the application cluster has reached a dangerous threshold. For example, the CPU usage may reach 90%.
  • the application cluster A has a CPU usage greater than 70% (CPU>70%), or if the relationship between the average load and the number of CPU cores in 1 minute is load1>core_num*1.5, then the application can be considered as an application.
  • the A cluster is at the resource full level, and the application B cluster and the application C cluster are at other levels.
  • the division of the number of levels of the resource load level may be specifically The requirement division is not limited by the embodiment of the present application.
  • the method for dividing the resource load level in the embodiment of the present application is not limited to the CPU usage rate, and may be divided into other resource parameters, such as memory, disk I/O, network bandwidth, etc., or according to other methods.
  • the division may be any, and the embodiment of the present application also does not limit this.
  • Step 103 Apply for resources for the application cluster of the resource full load level
  • a resource pool may be included in the cloud environment, and idle resources are placed in the resource pool. When the application cluster needs to apply for resources, the resource pool is first requested.
  • the step 103 may include the following sub-steps:
  • Sub-step S21 applying for resources to the resource pool
  • Sub-step S22 when the resources of the resource pool are sufficient, allocate resources in the resource pool to the application cluster of the resource full-load level;
  • the resources in the resource pool can be directly allocated to the application cluster at the resource full level. However, if the resources in the resource pool are exhausted, the application clusters at the resource full level cannot be applied for resources. At this time, the application for the resource failed.
  • the application cluster may have a corresponding priority
  • the sub-step S22 may include the following sub-steps:
  • Sub-step S221 When the application clusters of the resource full load level are two or more, the resources in the resource pool are allocated according to the application cluster whose priority is the resource full load level.
  • the resources can be prioritized to the high priority application cluster. Specifically, if multiple application clusters have performance bottlenecks at the same time, that is, application clusters with multiple resource full-load levels appear at the same time, resources are allocated in order for each application cluster according to priority, and high-priority application clusters preferentially apply for resources. Then, apply for resources for the low-priority application cluster. Through such an allocation principle, the host resources of the application cluster can be fully utilized.
  • the resources in the resource pool will be exhausted after applying for resources for the low-priority application cluster, and finally the high-priority application cluster will not be able to be clustered. resource allocation.
  • the priority of the application cluster may be set by the relevant personnel.
  • the priority of the application cluster may also be set according to other aspects such as the importance degree or processing sequence of the application cluster.
  • the embodiment of the present invention does not limit this.
  • Step 104 If the application cluster of the resource full load level fails to apply for the resource, the resources of the application cluster of other levels are released according to the resource load level.
  • the resource load level may have a corresponding release ratio
  • the step 104 may include the following sub-steps:
  • Sub-step S31 determining a release ratio corresponding to a resource load level of the application cluster of another level
  • Sub-step S32 releasing resources of the application cluster of the other level according to the release ratio
  • Sub-step S33 saving the released resource to the resource pool.
  • the resource of the application cluster when the resource of the application cluster is released, the resource is released according to the resource load level of the application cluster, that is, if the application cluster is loaded with a large load, less resources are released, and if the load is small, Applying a cluster releases more resources.
  • the sub-step S32 that is, the releasing the resources of the other application cluster according to a release ratio, includes:
  • Sub-step S321 acquiring current resources of the application cluster of the other level
  • Sub-step S322 obtaining current access traffic of the application cluster of the other level
  • Sub-step S324 determining, by using the current resource and the required resource, an idle resource of the application cluster of the other level;
  • the resources required for the current application cluster may be: the total traffic per second of the current application cluster/the absolute value of the daily pressure measurement, wherein the absolute value of the daily pressure measurement refers to a single virtual machine in the application cluster.
  • the idle resources that the application cluster can release can be determined.
  • the resources required for the current application cluster may also be: total access per second of the current application cluster / daily pressure measurement stand-alone extreme value / safe water level.
  • the security water level is a buffer (buffer), and may be set according to actual requirements or not used. This embodiment of the present invention does not limit this.
  • the application cluster B has a higher resource load level and a higher resource usage rate. If the CPU usage is greater than 50% and less than 60%, the application cluster B only needs to release 5% of resources and apply the resources of the C cluster. Load level Low, resource usage is low, CPU usage is greater than 10%, less than 20%, then the application cluster needs to release 15% of resources. The released resources can be saved to the T4 resource pool. Through the resource gradient release, the resources of each application cluster can be kept at a certain level instead of across the board.
  • Step 105 Allocate the released resource to an application cluster of the resource full load level.
  • the step 105 may include the following sub-steps:
  • Sub-step S41 applying for a resource to the resource pool in which the released resource is saved
  • Sub-step S42 allocating resources released in the resource pool for the application cluster of the resource full load level.
  • the application cluster at the resource full level can continuously apply for resources from the resource pool until the user needs to meet the requirements.
  • the resource requirement of the application cluster at the resource full load level may be that the number of predicted instances (virtual machine resources) is determined according to the access traffic, and then the number of predicted instances is subtracted from the current number of instances (current virtual machine resources), that is, The resource requirements for the application cluster.
  • the resource requirement of the application cluster at the resource full load level can be to reduce the application cluster from the resource full load level to other levels.
  • the user access traffic can be continuously increased, and steps 101 to 105 are performed again. If it is repeated, the resource load of the application cluster of the entire transaction link is finally flattened. The state makes the resources of each application cluster fully utilized.
  • the cluster is applied in a cloud environment, and the resource load level of the application cluster is determined according to the load state of each application cluster. If the application cluster with the full load level exists, the resource is applied for the application cluster. If it fails, it requests other levels of application clusters to release resources, and finally allocates the released resources to the application cluster at the resource full level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
  • FIG. 3 a flow chart of the steps of the method for applying the cluster resource allocation in the cloud environment of the present application is shown in the following steps.
  • Step 201 Obtain a resource usage rate of each application cluster in a specified transaction link in a cloud environment.
  • Step 202 Determine, according to the resource usage rate, a resource load level of each application cluster; the resource load level includes a high occupancy level and a low occupation level;
  • Step 203 Apply for resources for the application cluster of the high occupancy level.
  • Step 204 If the application for the high-occupancy application cluster fails, the resources of the application cluster with a low occupation level are released according to the resource load level.
  • Step 205 Allocate the released resource to the application cluster of the high occupancy level.
  • the step 201 may include:
  • the cloud environment includes a resource pool
  • the step 203 may include:
  • the application cluster has a corresponding priority
  • the step of allocating resources in the resource pool to an application cluster with a high occupancy level includes:
  • the resources in the resource pool are allocated according to the application cluster whose priority is a high occupation level.
  • the resource load level has a corresponding release ratio
  • the step 204 may include:
  • the step of releasing resources of the low occupancy level application cluster according to a release ratio includes:
  • the idle resource is released according to the release ratio.
  • the step 205 includes:
  • a plurality of transaction links can be divided in a cloud environment to deal with various transactions in a targeted manner.
  • the embodiment of the present invention can be applied in a cloud environment to perform overall planning for resources of an application cluster.
  • the resource load status of the application cluster is known according to the resource usage rate of each application cluster, so that the resource load level at which the resource cluster is located can be determined. If the application cluster of the high-occupancy level exists, the resource is applied to the application cluster. If the application fails, the application cluster of the low-occupancy level is requested to release the resources. Finally, the released resources are allocated to the application cluster of the high-occupancy level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
  • the pressure measurement process of the transaction link in the embodiment of the present application is illustrated by a specific example, as shown in FIG. 2 .
  • the application cluster A that has performance bottleneck continuously requests resources from the resource pool until it receives its own resource requirements, and stops other low-load application clusters from releasing idle resources. At this point, continue to touch the high pressure, that is, increase the user's access traffic, and iterate again from step 1.
  • FIG. 4 a structural block diagram of an apparatus embodiment for applying cluster resource allocation in a cloud environment according to the present application is shown, which may specifically include the following modules:
  • the resource load status obtaining module 301 is configured to acquire a resource load status of each application cluster in the cloud environment;
  • the resource load state obtaining module 301 may include the following submodules:
  • the resource load status acquisition sub-module is configured to obtain the resource load status of each application cluster in the cloud environment when the access traffic is increased.
  • the resource load level determining module 302 is configured to determine a resource load level of the application cluster according to the resource load status; the resource load level includes a resource full load level and other levels;
  • the resource application module 303 is configured to apply for resources for the application cluster of the resource full load level
  • the cloud environment may include a resource pool
  • the resource application module 303 may include the following sub-modules:
  • a first resource pool resource application submodule configured to apply for a resource to the resource pool
  • a first resource processing sub-module configured to: when the resources of the resource pool are sufficient, allocate resources in the resource pool to an application cluster of the resource full-load level;
  • the second resource processing sub-module is configured to: when the resource of the resource pool is exhausted, requesting the resource for the application cluster of the resource full-load level fails.
  • the application cluster may have a corresponding priority
  • the first resource processing submodule includes:
  • the priority processing unit is configured to allocate resources in the resource pool according to the application cluster whose priority is the resource full load level when the application cluster of the resource full load level is two or more.
  • the resource release module 304 is configured to release resources of other levels of the application cluster according to the resource load level when the application cluster for the resource full load level fails to apply for the resource;
  • the resource load level may have a corresponding release ratio
  • the resource The release module 304 can include the following sub-modules:
  • the release ratio determining submodule is configured to determine a release ratio corresponding to a resource load level of the application cluster of another level
  • a resource ratio release submodule configured to release resources of the application cluster of the other level according to the release ratio
  • the resource saving submodule is released, and the released resource is saved in the resource pool.
  • the resource ratio release submodule may include the following units:
  • a current resource obtaining unit configured to acquire a current resource of the application cluster of the other level
  • the current access traffic unit is configured to obtain current access traffic of the application cluster of the other level
  • a demand resource calculation unit configured to calculate a demand resource by using the current access traffic and a preset single-machine limit value
  • An idle resource determining unit configured to determine, by using the current resource and the required resource, an idle resource of the application cluster of the other level
  • an idle resource release unit configured to release the idle resource according to the release ratio.
  • the release resource allocation module 305 is configured to allocate the released resource to the application cluster of the resource full load level.
  • the release resource allocation module 205 may include the following sub-modules:
  • a second resource pool resource application submodule configured to apply for a resource to the resource pool in which the released resource is saved
  • a third resource processing submodule configured to allocate resources released in the resource pool to the application cluster of the resource full load level.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the embodiment of the present application further provides a system for applying cluster resource allocation in a cloud environment, where the system includes:
  • One or more processors are One or more processors;
  • One or more modules the one or more modules being stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functions:
  • the resource load level includes a resource full load level and other levels
  • the released resources are allocated to an application cluster of the resource full load level.
  • the one or more modules may have the following functions:
  • the cloud environment includes a resource pool, and the one or more modules may have the following functions:
  • the resources in the resource pool are allocated to the application cluster of the resource full load level;
  • the application cluster has a corresponding priority
  • the one or more modules may have the following functions:
  • the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
  • the resource load level has a corresponding release ratio
  • the one or more modules may have the following functions:
  • the one or more modules may have the following functions:
  • the idle resource is released according to the release ratio.
  • the one or more modules may have the following functions:
  • the embodiment of the present application further provides an apparatus for applying cluster resource allocation in a cloud environment, and the apparatus may include the following modules:
  • a resource usage acquisition module configured to acquire resource usage rates of application clusters in a specified transaction link in a cloud environment
  • a resource load level determining module configured to determine a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupancy level and a low occupancy level;
  • a resource application obtaining module configured to apply for resources for the application cluster of the high occupancy level
  • a resource release module configured to release resources of an application cluster of a low occupancy level according to a resource load level if the resource application fails for the application cluster of the high occupancy level
  • a resource allocation module configured to allocate the released resource to the application cluster of the high occupancy level.
  • FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 400 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 422 (eg, one or more processors) and memory 432, one or one
  • the storage medium 430 (for example, one or one storage device in Shanghai) that stores the application 442 or the data 444 above.
  • the memory 432 and the storage medium 430 may be temporarily stored or persistently stored.
  • the program stored on storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • central processor 422 can be configured to communicate with storage medium 430, executing a series of instruction operations in storage medium 430 on server 400.
  • Server 400 may also include one or more power sources 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 758, one or more keyboards 456, and/or one or more operating systems 441.
  • power sources 426 for example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the central processor 422 can execute instructions on the server 400 for:
  • the resource load level includes a resource full load level and other levels
  • the released resources are allocated to an application cluster of the resource full load level.
  • the one or more modules may have the following functions:
  • the cloud environment includes a resource pool, and the one or more modules may have the following functions:
  • the resources in the resource pool are allocated to the application cluster of the resource full load level;
  • the application cluster has a corresponding priority
  • the one or more modules may have the following functions:
  • the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
  • the resource load level has a corresponding release ratio
  • the one or more modules may have the following functions:
  • the one or more modules may have the following functions:
  • the idle resource is released according to the release ratio.
  • the one or more modules may have the following functions:
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM Is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Abstract

Embodiments of the present application provide a method, apparatus and system for allocating resources of application clusters under a cloud environment. The method comprises: obtaining resource utilization rates of all application clusters in a specified transaction link under a cloud environment; determining resource load levels of all the application clusters according to the resource utilization rates, the resource load levels comprising a high occupancy level and a low occupancy level; applying for resources for an application cluster at the high occupancy level; releasing resources of an application cluster at the low occupancy level according to the resource load levels if the applying for resources for an application cluster at the high occupancy level fails; and allocating the released resources to the application cluster at the high occupancy level. The embodiments of the present application can level resource loads of the application clusters under the entire cloud environment, and can make full use of the existing resources to improve the resource utilization efficiency of the application clusters, so that the application clusters can support higher access traffic.

Description

一种云环境下应用集群资源分配的方法、装置和系统Method, device and system for applying cluster resource allocation in cloud environment
本申请要求2016年11月08日递交的申请号为201610982629.X、发明名称为“一种云环境下应用集群资源分配的方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 201610982629.X filed on November 8, 2016, entitled "Method, Apparatus and System for Application Cluster Resource Allocation in a Cloud Environment", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及数据处理技术领域,特别是涉及一种云环境下应用集群资源分配的方法,一种云环境下应用集群资源分配的装置,以及一种云环境下应用集群资源分配的系统。The present invention relates to the field of data processing technologies, and in particular, to a method for applying cluster resource allocation in a cloud environment, a device for applying cluster resource allocation in a cloud environment, and a system for applying cluster resource allocation in a cloud environment.
背景技术Background technique
云计算是一种通过互联网以服务方式提供动态可伸缩的虚拟资源的计算模式,通过这种方式,共享的软硬件资源和信息可以按需求提供给计算机和其他设备。云计算的基础环境是虚拟化,虚拟化环境中存在资源共享。云计算环境(以下简称云环境)中经常使用虚拟机(VM,Virtual Machine),这些虚拟机主要关联的系统资源等等。Cloud computing is a computing model that provides dynamically scalable virtual resources over the Internet in a service manner. In this way, shared hardware and software resources and information can be provided to computers and other devices on demand. The basic environment of cloud computing is virtualization, and resource sharing exists in the virtualized environment. In a cloud computing environment (hereinafter referred to as a cloud environment), virtual machines (VMs, Virtual Machines) are often used, and system resources of these virtual machines are mainly associated.
云环境中的这些资源都是由虚拟机共享,当虚拟机需要申请资源时,将从该云环境中申请空闲的资源。然而,在资源有限的情况下,如果空闲的资源已经耗尽,那么虚拟机申请资源失败,该虚拟机将由于资源负载过大而无法正常工作,极大影响工作效率。These resources in the cloud environment are shared by virtual machines. When the virtual machine needs to apply for resources, it will apply for idle resources from the cloud environment. However, in the case of limited resources, if the idle resources are exhausted, the virtual machine fails to apply for resources, and the virtual machine will not work properly due to excessive resource load, which greatly affects work efficiency.
发明内容Summary of the invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种云环境下应用集群资源分配的方法,一种云环境下应用集群资源分配的装置,以及一种云环境下应用集群资源分配的系统。In view of the above problems, embodiments of the present application are provided to provide a method for applying cluster resource allocation in a cloud environment, which overcomes the above problems or at least partially solves the above problems, and a device for applying cluster resource allocation in a cloud environment, and A system for applying cluster resource allocation in a cloud environment.
为了解决上述问题,本申请实施例公开了一种云环境下应用集群资源分配的系统,所述系统包括:In order to solve the above problem, the embodiment of the present application discloses a system for applying cluster resource allocation in a cloud environment, where the system includes:
一个或多个处理器;One or more processors;
存储器;和Memory; and
一个或多个模块,所述一个或多个模块存储于所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个模块具有如下功能:One or more modules, the one or more modules being stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functions:
获取云环境下指定交易链路中各个应用集群的资源使用率;Obtain resource usage rates of application clusters in a specified transaction link in a cloud environment;
依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高 占用级别和低占用级别;Determining a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high Occupancy level and low occupancy level;
为所述高占用级别的应用集群申请资源;Applying for the application cluster of the high occupancy level;
若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;If the application for the high-occupancy application cluster fails, the resource of the application cluster with a low occupation level is released according to the resource load level;
将所述释放的资源分配给所述高占用级别的应用集群。Allocating the released resources to the application cluster of the high occupancy level.
本申请实施例还公开了一种云环境下应用集群资源分配的方法,包括:The embodiment of the present application further discloses a method for applying cluster resource allocation in a cloud environment, including:
获取云环境下指定交易链路中各个应用集群的资源使用率;Obtain resource usage rates of application clusters in a specified transaction link in a cloud environment;
依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;Determining, according to the resource usage rate, a resource load level of each application cluster; the resource load level includes a high occupancy level and a low occupancy level;
为所述高占用级别的应用集群申请资源;Applying for the application cluster of the high occupancy level;
若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;If the application for the high-occupancy application cluster fails, the resource of the application cluster with a low occupation level is released according to the resource load level;
将所述释放的资源分配给所述高占用级别的应用集群。Allocating the released resources to the application cluster of the high occupancy level.
优选地,所述获取云环境下指定交易链路中各个应用集群的资源使用率的步骤包括:Preferably, the step of acquiring the resource usage rate of each application cluster in the specified transaction link in the cloud environment includes:
当访问流量提升时,获取云环境下指定交易链路中各个应用集群的资源使用率。When the access traffic is increased, the resource usage rate of each application cluster in the specified transaction link in the cloud environment is obtained.
优选地,所述云环境下包括资源池,所述为高占用级别的应用集群申请资源的步骤包括:Preferably, the cloud environment includes a resource pool, and the step of applying for resources for the application cluster with a high occupancy level includes:
向所述资源池申请资源;Applying for resources to the resource pool;
当所述资源池的资源充足时,则为所述高占用级别的应用集群分配所述资源池中资源;Allocating resources in the resource pool to the application cluster of the high occupancy level when the resources of the resource pool are sufficient;
当所述资源池的资源枯竭时,则为所述高占用级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application for the high occupancy level application cluster fails.
优选地,所述应用集群具有对应的优先级,所述为高占用级别的应用集群分配所述资源池中资源的步骤包括:Preferably, the application cluster has a corresponding priority, and the step of allocating resources in the resource pool to an application cluster with a high occupancy level includes:
当所述高占用级别的应用集群为两个或者两个以上时,按照所述优先级为高占用级别的应用集群分配所述资源池中资源。When the application cluster of the high-occupancy level is two or more, the resources in the resource pool are allocated according to the application cluster whose priority is a high occupation level.
优选地,所述资源负载级别具有对应的释放比例,所述按照资源负载级别释放低占用级别的应用集群的资源的步骤包括:Preferably, the resource load level has a corresponding release ratio, and the step of releasing resources of the application cluster of the low occupancy level according to the resource load level includes:
确定低占用级别的应用集群的资源负载级别对应的释放比例;Determining the release ratio corresponding to the resource load level of the application cluster with a low occupancy level;
按照所述释放比例释放所述低占用级别的应用集群的资源;Release the resources of the low occupancy level application cluster according to the release ratio;
将所述释放的资源保存至资源池中。 Save the released resource to the resource pool.
优选地,所述按照释放比例释放所述低占用级别的应用集群的资源的步骤包括:Preferably, the step of releasing resources of the low occupancy level application cluster according to a release ratio comprises:
获取所述低占用级别的应用集群的当前资源;Obtaining a current resource of the application cluster of the low occupancy level;
获取所述低占用级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the low occupancy level;
采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
采用所述当前资源和所述需求资源确定所述低占用级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the low occupancy level;
按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
优选地,所述将释放的资源分配给所述高占用级别的应用集群的步骤包括:Preferably, the step of allocating the released resources to the application cluster of the high occupancy level comprises:
向所述保存有释放的资源的资源池申请资源;Requesting a resource from the resource pool in which the released resource is saved;
为所述高占用级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the high occupancy level application cluster.
本申请实施例还公开了一种云环境下应用集群资源分配的装置,包括:The embodiment of the present application further discloses an apparatus for applying cluster resource allocation in a cloud environment, including:
资源使用率获取模块,用于获取云环境下指定交易链路中各个应用集群的资源使用率;a resource usage acquisition module, configured to acquire resource usage rates of application clusters in a specified transaction link in a cloud environment;
资源负载级别确定模块,用于依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;a resource load level determining module, configured to determine a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupancy level and a low occupancy level;
资源申请获取模块,用于为所述高占用级别的应用集群申请资源;a resource application obtaining module, configured to apply for resources for the application cluster of the high occupancy level;
资源释放模块,用于若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;a resource release module, configured to release resources of an application cluster of a low occupancy level according to a resource load level if the resource application fails for the application cluster of the high occupancy level;
资源分配模块,用于将所述释放的资源分配给所述高占用级别的应用集群。And a resource allocation module, configured to allocate the released resource to the application cluster of the high occupancy level.
本申请实施例还公开了一种云环境下应用集群资源分配的方法,包括:The embodiment of the present application further discloses a method for applying cluster resource allocation in a cloud environment, including:
获取云环境下各个应用集群的资源负载状态;Obtain the resource load status of each application cluster in the cloud environment;
依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;Determining, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
为所述资源满载级别的应用集群申请资源;Applying for the resource cluster of the resource full load level;
若为所述资源满载级别的应用集群申请资源失败,则按照资源负载级别释放其他级别的应用集群的资源;If the application cluster of the resource full-load level fails to apply for resources, the resources of other levels of the application cluster are released according to the resource load level;
将所述释放的资源分配给所述资源满载级别的应用集群。The released resources are allocated to an application cluster of the resource full load level.
优选地,所述获取云环境下各个应用集群的资源负载状态的步骤包括:Preferably, the step of acquiring the resource load status of each application cluster in the cloud environment includes:
当访问流量提升时,获取云环境下各个应用集群的资源负载状态。When the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
优选地,所述云环境下包括资源池,所述为资源满载级别的应用集群申请资源的步骤包括: Preferably, the cloud environment includes a resource pool, and the step of applying for resources for the application cluster of the resource full load level includes:
向所述资源池申请资源;Applying for resources to the resource pool;
当所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;When the resources of the resource pool are sufficient, the resources in the resource pool are allocated to the application cluster of the resource full load level;
当所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application cluster for the resource full load level fails to apply for resources.
优选地,所述应用集群具有对应的优先级,所述为资源满载级别的应用集群分配所述资源池中资源的步骤包括:Preferably, the application cluster has a corresponding priority, and the step of allocating resources in the resource pool to an application cluster of a resource full load level includes:
当所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。When the application cluster of the resource full load level is two or more, the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
优选地,所述资源负载级别具有对应的释放比例,所述按照资源负载级别释放其他级别的应用集群的资源的步骤包括:Preferably, the resource load level has a corresponding release ratio, and the step of releasing resources of other levels of the application cluster according to the resource load level includes:
确定其他级别的应用集群的资源负载级别对应的释放比例;Determine the release ratio corresponding to the resource load level of the application cluster of other levels;
按照所述释放比例释放所述其他级别的应用集群的资源;Release the resources of the other level of the application cluster according to the release ratio;
将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
优选地,所述按照释放比例释放所述其他应用集群的资源的步骤包括:Preferably, the step of releasing resources of the other application cluster according to a release ratio comprises:
获取所述其他级别的应用集群的当前资源;Obtaining current resources of the application cluster of the other level;
获取所述其他级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the other level;
采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the other level;
按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
优选地,所述将释放的资源分配给所述资源满载级别的应用集群的步骤包括:Preferably, the step of allocating the released resource to the application cluster of the resource full load level comprises:
向所述保存有释放的资源的资源池申请资源;Requesting a resource from the resource pool in which the released resource is saved;
为所述资源满载级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the application cluster of the resource full load level.
本申请实施例还公开了一种云环境下应用集群资源分配的装置,包括:The embodiment of the present application further discloses an apparatus for applying cluster resource allocation in a cloud environment, including:
资源负载状态获取模块,用于获取云环境下各个应用集群的资源负载状态;a resource load status obtaining module, configured to acquire a resource load status of each application cluster in a cloud environment;
资源负载级别确定模块,用于依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;a resource load level determining module, configured to determine a resource load level of the application cluster according to the resource load status; the resource load level includes a resource full load level and other levels;
资源申请模块,用于为所述资源满载级别的应用集群申请资源;a resource application module, configured to apply for resources for an application cluster of the resource full load level;
资源释放模块,用于在为所述资源满载级别的应用集群申请资源失败时,按照资源负载级别释放其他级别的应用集群的资源;a resource release module, configured to release resources of other levels of the application cluster according to a resource load level when the application cluster for the resource full load level fails to apply for a resource;
释放资源分配模块,用于将所述释放的资源分配给所述资源满载级别的应用集群。 And releasing a resource allocation module, configured to allocate the released resource to an application cluster of the resource full load level.
本申请实施例包括以下优点:Embodiments of the present application include the following advantages:
本申请实施例对于在云环境下应用集群,根据各个应用集群资源负载状态确定其所处的资源负载级别,如果存在资源满载级别的应用集群,则为该应用集群申请资源,如果此时申请资源失败,则请求其他级别的应用集群释放资源,最后将释放的资源分配给资源满载级别的应用集群。需要说明的是,本申请实施例是按照应用集群的资源满载级别来释放资源,故而如果反复执行上述步骤,那么最终将拉平整个云环境下应用集群的资源负载,能够充分利用现有资源,提高应用集群的资源使用效率,使得应用集群可以支撑更高的访问流量。In the embodiment of the present application, the cluster is applied in a cloud environment, and the resource load level of the application cluster is determined according to the load state of each application cluster. If the application cluster with the full load level exists, the resource is applied for the application cluster. If it fails, it requests other levels of application clusters to release resources, and finally allocates the released resources to the application cluster at the resource full level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
附图说明DRAWINGS
图1是本申请的一种云环境下应用集群资源分配的方法实施例1的步骤流程图;1 is a flow chart of the steps of Embodiment 1 of a method for applying cluster resource allocation in a cloud environment according to the present application;
图2是本申请的一种云环境下应用集群的资源分配示意图;2 is a schematic diagram of resource allocation of an application cluster in a cloud environment according to the present application;
图3是本申请的一种云环境下应用集群资源分配的方法实施例2的步骤流程图;3 is a flow chart of steps in Embodiment 2 of a method for applying cluster resource allocation in a cloud environment according to the present application;
图4是本申请的一种云环境下应用集群资源分配的装置实施例的结构框图;4 is a structural block diagram of an apparatus for applying cluster resource allocation in a cloud environment according to the present application;
图5是本申请的一种服务器实施例结构示意图。FIG. 5 is a schematic structural diagram of a server embodiment of the present application.
具体实施方式detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。The above described objects, features and advantages of the present application will become more apparent and understood.
在云环境下包括一个或多个应用集群,可以分别独立完成特定服务,应用集群之间交互形成交易链路,能够完成一个完整的交易工作。例如,在某个供应链路的应用集群中,包括商品、物流、认证、营销等四个应用系统,在该供应链路的应用集群中完成商品、物流、认证、营销等一系列工作。交易链路压测可以用于测试应用集群的交易链路的处理效率。In the cloud environment, one or more application clusters can be used to complete specific services independently, and the application clusters can form a transaction link to complete a complete transaction. For example, in an application cluster of a supply link, including four application systems of commodity, logistics, certification, and marketing, a series of tasks such as commodity, logistics, certification, and marketing are completed in the application cluster of the supply chain. Transaction link pressure measurement can be used to test the processing efficiency of the transaction link of the application cluster.
交易链路压测通过自动化的测试工具模拟多种正常、峰值以及异常负载条件对应用集群的各项性能指标进行压测,检测出应用集群的性能瓶颈,提高应用集群的处理能力。The transaction link pressure test simulates various performance indicators of the application cluster through automatic test tools to simulate various normal, peak and abnormal load conditions, detects the performance bottleneck of the application cluster, and improves the processing capability of the application cluster.
然而,目前交易链路压测只是测试出应用集群的性能瓶颈,并且当访问流量达到目标值,例如达到15W的访问流量时,则不再向上探测应用集群的处理能力,那么资源无法充分利用起来。However, the current transaction link pressure test only tests the performance bottleneck of the application cluster, and when the access traffic reaches the target value, for example, when the access traffic reaches 15 W, the processing capability of the application cluster is no longer detected, and the resources cannot be fully utilized. .
针对上述问题,本申请实施例对于云环境下应用集群,在指定的平台上压测过程中, 拉平交易链路整体应用集群的资源负载,在现有资源有限的情况下,充分利用现有资源,均衡各个应用集群的资源负载,提升应用集群的处理能力,使得应用集群能够支撑更高访问流量。For the above problem, the embodiment of the present application is applied to a cluster in a cloud environment, and is in the process of pressure measurement on a specified platform. Leveling the resource load of the application cluster as a whole, and making full use of existing resources to balance the resource load of each application cluster and improve the processing capacity of the application cluster, so that the application cluster can support higher access traffic. .
参照图1,示出了本申请的一种云环境下应用集群资源分配的方法实施例的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1 , a flow chart of steps of a method for applying cluster resource allocation in a cloud environment according to the present application is shown, which may specifically include the following steps:
步骤101,获取云环境下各个应用集群的资源负载状态;Step 101: Obtain a resource load status of each application cluster in a cloud environment.
在本申请实施例中,首先梳理某个交易链路的应用集群,并将该应用集群接入指定的平台上,形成云环境。在该云环境下能够对于应用集群进行统筹规划。In the embodiment of the present application, an application cluster of a transaction link is first combed, and the application cluster is connected to a specified platform to form a cloud environment. In this cloud environment, it is possible to plan the application cluster.
如图2所示,在某个交易链路上包括应用A集群,应用B集群,应用C集群,这些应用集群接入到某个指定的平台中,在该平台上的应用集群可以共享资源。As shown in FIG. 2, an application cluster includes an application A cluster, an application B cluster, and an application C cluster. The application clusters are connected to a specified platform, and the application clusters on the platform can share resources.
应用集群的资源负载状态,是指应用集群的资源使用率,具体来说,资源可以包括容量、CPU、内存、磁盘I/O、网络带宽等等。在某些情况下,应用集群的资源使用率可以达到100%。The resource load status of the application cluster refers to the resource usage rate of the application cluster. Specifically, the resources may include capacity, CPU, memory, disk I/O, network bandwidth, and the like. In some cases, the resource usage of the application cluster can reach 100%.
在本申请的一个实施例中,所述步骤101可以包括如下子步骤:In an embodiment of the present application, the step 101 may include the following sub-steps:
子步骤S11,当访问流量提升时,获取云环境下各个应用集群的资源负载状态。Sub-step S11, when the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
本申请实施例通过对交易链路进行压测,探测目前应用集群的性能瓶颈。所谓性能瓶颈,即资源使用率达到了危险阈值,此时应用集群将无法正常工作。The embodiment of the present application detects the performance bottleneck of the current application cluster by performing a pressure test on the transaction link. The performance bottleneck, that is, the resource usage rate reaches a dangerous threshold, the application cluster will not work properly.
在对交易链路进行压测的过程中,可以不断提升用户对于应用集群的访问流量。在一种情形下,本申请实施例在检测到访问流量提升时,将获取云环境下各个应用集群的资源负载状态。During the process of compressing the transaction link, the user's access traffic to the application cluster can be continuously improved. In one case, when detecting the increase of the access traffic, the embodiment of the present application acquires the resource load status of each application cluster in the cloud environment.
步骤102,依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;Step 102: Determine, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
在本申请实施例中,对于各个应用集群,将按照其资源负载状态来确定其所处的资源负载级别,资源负载级别能够用于表征应用集群的资源使用率。In the embodiment of the present application, for each application cluster, the resource load level of the application cluster is determined according to its resource load status, and the resource load level can be used to represent the resource usage rate of the application cluster.
资源负载级别可以包括资源满载级别和其他级别,资源满载级别是指应用集群的资源使用率已经达到一个危险阈值,例如,可能是CPU使用率达到90%。The resource load level can include the resource full load level and other levels. The resource full load level means that the resource usage of the application cluster has reached a dangerous threshold. For example, the CPU usage may reach 90%.
如图2所示,应用A集群如果是CPU使用率大于70%(CPU>70%),或者,在1分钟内的平均负载与CPU核数的关系为load1>core_num*1.5,则可以认为应用A集群处于资源满载级别,应用B集群和应用C集群则是为其他级别。As shown in Figure 2, if the application cluster A has a CPU usage greater than 70% (CPU>70%), or if the relationship between the average load and the number of CPU cores in 1 minute is load1>core_num*1.5, then the application can be considered as an application. The A cluster is at the resource full level, and the application B cluster and the application C cluster are at other levels.
需要说明的是,本申请实施例对于资源负载级别的级别数量的划分,可以按照具体 需求划分,本申请实施例对此不加以限制。此外,本申请实施例对于资源负载级别的划分方式,不仅仅局限于CPU使用率,也可以结合其他资源参数进行划分,比如内存、磁盘I/O、网络带宽等使用率,或者按照其他方式进行划分均可,本申请实施例同样对此不加以限制。It should be noted that, in the embodiment of the present application, the division of the number of levels of the resource load level may be specifically The requirement division is not limited by the embodiment of the present application. In addition, the method for dividing the resource load level in the embodiment of the present application is not limited to the CPU usage rate, and may be divided into other resource parameters, such as memory, disk I/O, network bandwidth, etc., or according to other methods. The division may be any, and the embodiment of the present application also does not limit this.
步骤103,为所述资源满载级别的应用集群申请资源;Step 103: Apply for resources for the application cluster of the resource full load level;
在云环境下可以包括资源池,在资源池中放置有空闲的资源,当应用集群需要进行申请资源时,将首先向资源池申请资源。A resource pool may be included in the cloud environment, and idle resources are placed in the resource pool. When the application cluster needs to apply for resources, the resource pool is first requested.
在本申请的一个实施例中,所述步骤103可以包括如下子步骤:In an embodiment of the present application, the step 103 may include the following sub-steps:
子步骤S21,向所述资源池申请资源;Sub-step S21, applying for resources to the resource pool;
子步骤S22,当所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;Sub-step S22, when the resources of the resource pool are sufficient, allocate resources in the resource pool to the application cluster of the resource full-load level;
子步骤S23,当所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。In sub-step S23, when the resources of the resource pool are exhausted, the application cluster for the resource full-load level fails to apply for resources.
可以理解,如果资源池中资源充足,那么可以直接将资源池中的资源分配给资源满载级别的应用集群,但是,如果资源池中资源已经枯竭,那么将无法为资源满载级别的应用集群申请资源,此时申请资源失败。It can be understood that if the resources in the resource pool are sufficient, the resources in the resource pool can be directly allocated to the application cluster at the resource full level. However, if the resources in the resource pool are exhausted, the application clusters at the resource full level cannot be applied for resources. At this time, the application for the resource failed.
在本申请的一个实施例中,所述应用集群可以具有对应的优先级,所述子步骤S22可以包括如下子步骤:In an embodiment of the present application, the application cluster may have a corresponding priority, and the sub-step S22 may include the following sub-steps:
子步骤S221,当所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。Sub-step S221: When the application clusters of the resource full load level are two or more, the resources in the resource pool are allocated according to the application cluster whose priority is the resource full load level.
当资源池中存在可分配的资源时,可以将资源优先分配给高优先级别的应用集群。具体来说,如果多个应用集群同时出现性能瓶颈,即多个资源满载级别的应用集群同时出现时,将按照优先级为每个应用集群按序分配资源,高优先级的应用集群优先申请资源,然后再为低优先级的应用集群申请资源,通过这样的分配原则,可以使得应用集群的宿主机资源的充分利用。When there are allocable resources in the resource pool, the resources can be prioritized to the high priority application cluster. Specifically, if multiple application clusters have performance bottlenecks at the same time, that is, application clusters with multiple resource full-load levels appear at the same time, resources are allocated in order for each application cluster according to priority, and high-priority application clusters preferentially apply for resources. Then, apply for resources for the low-priority application cluster. Through such an allocation principle, the host resources of the application cluster can be fully utilized.
反之,如果不按照优先级为每个应用集群按序分配资源,那么将可能导致在为低优先级的应用集群申请资源后,资源池中资源枯竭,那么最后将无法为高优先级的应用集群分配资源。Conversely, if the resources are not allocated in order for each application cluster according to the priority, the resources in the resource pool will be exhausted after applying for resources for the low-priority application cluster, and finally the high-priority application cluster will not be able to be clustered. resource allocation.
需要说明的是,本申请实施例中对于应用集群的优先级,可以由相关人员进行设置,当然,也可以按照应用集群的重要程度或者处理顺序等其他方式来设置应用集群的优先 级,本发明实施例对此不加以限制。It should be noted that, in the embodiment of the present application, the priority of the application cluster may be set by the relevant personnel. Of course, the priority of the application cluster may also be set according to other aspects such as the importance degree or processing sequence of the application cluster. The embodiment of the present invention does not limit this.
步骤104,若为所述资源满载级别的应用集群申请资源失败,则按照资源负载级别释放其他级别的应用集群的资源;Step 104: If the application cluster of the resource full load level fails to apply for the resource, the resources of the application cluster of other levels are released according to the resource load level.
本申请实施例在从资源池申请资源失败时,将释放其他应用集群的资源来弥补当前资源不足的情况。When the application for resources from the resource pool fails, the resources of other application clusters are released to make up for the shortage of current resources.
在本申请的一个实施例中,所述资源负载级别可以具有对应的释放比例,所述步骤104可以包括如下子步骤:In an embodiment of the present application, the resource load level may have a corresponding release ratio, and the step 104 may include the following sub-steps:
子步骤S31,确定其他级别的应用集群的资源负载级别对应的释放比例;Sub-step S31, determining a release ratio corresponding to a resource load level of the application cluster of another level;
子步骤S32,按照所述释放比例释放所述其他级别的应用集群的资源;Sub-step S32, releasing resources of the application cluster of the other level according to the release ratio;
子步骤S33,将所述释放的资源保存至资源池中。Sub-step S33, saving the released resource to the resource pool.
在本申请实施例中,在释放应用集群的资源时,是按照应用集群的资源负载级别来释放资源,即如果是负载较大的应用集群,则释放较少的资源,如果是负载较小的应用集群,则释放较多的资源。In the embodiment of the present application, when the resource of the application cluster is released, the resource is released according to the resource load level of the application cluster, that is, if the application cluster is loaded with a large load, less resources are released, and if the load is small, Applying a cluster releases more resources.
在本申请的一个实施例中,所述子步骤S32,即所述按照释放比例释放所述其他应用集群的资源的步骤包括:In an embodiment of the present application, the sub-step S32, that is, the releasing the resources of the other application cluster according to a release ratio, includes:
子步骤S321,获取所述其他级别的应用集群的当前资源;Sub-step S321, acquiring current resources of the application cluster of the other level;
子步骤S322,获取所述其他级别的应用集群的当前访问流量;Sub-step S322, obtaining current access traffic of the application cluster of the other level;
子步骤S323,采用所述当前访问流量和预设单机极限值计算需求资源;Sub-step S323, calculating the demand resource by using the current access traffic and the preset single-machine limit value;
子步骤S324,采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;Sub-step S324, determining, by using the current resource and the required resource, an idle resource of the application cluster of the other level;
子步骤S325,按照所述释放比例释放所述空闲资源。Sub-step S325, releasing the idle resource according to the release ratio.
在本申请实施例中,当前应用集群所需的资源可以是:当前应用集群的每秒访问总流量/日常压测单机极值,其中,日常压测单机极值是指应用集群中单个虚拟机的所能承受的访问流量。根据应用集群的当前资源和需求资源,可以确定该应用集群可以释放的空闲资源。In the embodiment of the present application, the resources required for the current application cluster may be: the total traffic per second of the current application cluster/the absolute value of the daily pressure measurement, wherein the absolute value of the daily pressure measurement refers to a single virtual machine in the application cluster. The traffic that can withstand. According to the current resource and the required resource of the application cluster, the idle resources that the application cluster can release can be determined.
在另一实施例中,当前应用集群所需的资源还可以是:当前应用集群的每秒访问总流量/日常压测单机极值/安全水位。其中,安全水位是一个buffer(缓冲),可根据实际需求设置大小或者不使用,本发明实施例对此不加以限制。In another embodiment, the resources required for the current application cluster may also be: total access per second of the current application cluster / daily pressure measurement stand-alone extreme value / safe water level. The security water level is a buffer (buffer), and may be set according to actual requirements or not used. This embodiment of the present invention does not limit this.
如图2所示,应用B集群的资源负载级别较高,资源使用率较高,CPU使用率大于50%,小于60%,则应用B集群只需要释放5%的资源,应用C集群的资源负载级别较 低,资源使用率较低,CPU使用率大于10%,小于20%,则应用C集群需要释放15%的资源。释放的资源可以保存到T4资源池中。通过资源梯度式释放,让各个应用集群的资源能够保持在某个水平线,而不是一刀切。As shown in Figure 2, the application cluster B has a higher resource load level and a higher resource usage rate. If the CPU usage is greater than 50% and less than 60%, the application cluster B only needs to release 5% of resources and apply the resources of the C cluster. Load level Low, resource usage is low, CPU usage is greater than 10%, less than 20%, then the application cluster needs to release 15% of resources. The released resources can be saved to the T4 resource pool. Through the resource gradient release, the resources of each application cluster can be kept at a certain level instead of across the board.
步骤105,将所述释放的资源分配给所述资源满载级别的应用集群。Step 105: Allocate the released resource to an application cluster of the resource full load level.
在本申请的一个实施例中,所述步骤105可以包括如下子步骤:In an embodiment of the present application, the step 105 may include the following sub-steps:
子步骤S41,向所述保存有释放的资源的资源池申请资源;Sub-step S41, applying for a resource to the resource pool in which the released resource is saved;
子步骤S42,为所述资源满载级别的应用集群分配所述资源池中释放的资源。Sub-step S42, allocating resources released in the resource pool for the application cluster of the resource full load level.
当资源池中有释放的资源存入后,资源满载级别的应用集群可以从该资源池中不断申请资源,直到满足自己的需求,则可以停止其它级别的应用集群的释放空闲资源。After the released resources are saved in the resource pool, the application cluster at the resource full level can continuously apply for resources from the resource pool until the user needs to meet the requirements.
具体来说,资源满载级别的应用集群的资源需求量,可以是根据访问流量确定出预测实例数(虚拟机资源),然后再将预测实例数减去当前实例数(当前虚拟机资源),即为该应用集群的资源需求量。Specifically, the resource requirement of the application cluster at the resource full load level may be that the number of predicted instances (virtual machine resources) is determined according to the access traffic, and then the number of predicted instances is subtracted from the current number of instances (current virtual machine resources), that is, The resource requirements for the application cluster.
当然,资源满载级别的应用集群的资源需求可以是将应用集群从资源满载级别,降低至其他级别。Of course, the resource requirement of the application cluster at the resource full load level can be to reduce the application cluster from the resource full load level to other levels.
当本申请实施例完成对资源满载级别的应用集群分配资源后,可以继续提升用户的访问流量,并再次执行步骤101-步骤105,如是反复,最终将拉平整个交易链路的应用集群的资源负载状态,使得各个应用集群的资源都能够充分利用。After the resources of the application cluster of the resource full load level are allocated, the user access traffic can be continuously increased, and steps 101 to 105 are performed again. If it is repeated, the resource load of the application cluster of the entire transaction link is finally flattened. The state makes the resources of each application cluster fully utilized.
本申请实施例对于在云环境下应用集群,根据各个应用集群资源负载状态确定其所处的资源负载级别,如果存在资源满载级别的应用集群,则为该应用集群申请资源,如果此时申请资源失败,则请求其他级别的应用集群释放资源,最后将释放的资源分配给资源满载级别的应用集群。需要说明的是,本申请实施例是按照应用集群的资源满载级别来释放资源,故而如果反复执行上述步骤,那么最终将拉平整个云环境下应用集群的资源负载,能够充分利用现有资源,提高应用集群的资源使用效率,使得应用集群可以支撑更高的访问流量。In the embodiment of the present application, the cluster is applied in a cloud environment, and the resource load level of the application cluster is determined according to the load state of each application cluster. If the application cluster with the full load level exists, the resource is applied for the application cluster. If it fails, it requests other levels of application clusters to release resources, and finally allocates the released resources to the application cluster at the resource full level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
参照图3,示出了本申请的一种云环境下应用集群资源分配的方法实施例2的步骤流程图,具体可以包括如下步骤:Referring to FIG. 3, a flow chart of the steps of the method for applying the cluster resource allocation in the cloud environment of the present application is shown in the following steps.
步骤201,获取云环境下指定交易链路中各个应用集群的资源使用率;Step 201: Obtain a resource usage rate of each application cluster in a specified transaction link in a cloud environment.
步骤202,依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;Step 202: Determine, according to the resource usage rate, a resource load level of each application cluster; the resource load level includes a high occupancy level and a low occupation level;
步骤203,为所述高占用级别的应用集群申请资源; Step 203: Apply for resources for the application cluster of the high occupancy level.
步骤204,若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;Step 204: If the application for the high-occupancy application cluster fails, the resources of the application cluster with a low occupation level are released according to the resource load level.
步骤205,将所述释放的资源分配给所述高占用级别的应用集群。Step 205: Allocate the released resource to the application cluster of the high occupancy level.
在本申请的一种优选实施例中,所述步骤201可以包括:In a preferred embodiment of the present application, the step 201 may include:
当访问流量提升时,获取云环境下指定交易链路中各个应用集群的资源使用率。When the access traffic is increased, the resource usage rate of each application cluster in the specified transaction link in the cloud environment is obtained.
在本申请的一种优选实施例中,所述云环境下包括资源池,所述步骤203可以包括:In a preferred embodiment of the present application, the cloud environment includes a resource pool, and the step 203 may include:
向所述资源池申请资源;Applying for resources to the resource pool;
当所述资源池的资源充足时,则为所述高占用级别的应用集群分配所述资源池中资源;Allocating resources in the resource pool to the application cluster of the high occupancy level when the resources of the resource pool are sufficient;
当所述资源池的资源枯竭时,则为所述高占用级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application for the high occupancy level application cluster fails.
在本申请的一种优选实施例中,所述应用集群具有对应的优先级,所述为高占用级别的应用集群分配所述资源池中资源的步骤包括:In a preferred embodiment of the present application, the application cluster has a corresponding priority, and the step of allocating resources in the resource pool to an application cluster with a high occupancy level includes:
当所述高占用级别的应用集群为两个或者两个以上时,按照所述优先级为高占用级别的应用集群分配所述资源池中资源。When the application cluster of the high-occupancy level is two or more, the resources in the resource pool are allocated according to the application cluster whose priority is a high occupation level.
在本申请的一种优选实施例中,所述资源负载级别具有对应的释放比例,所述步骤204可以包括:In a preferred embodiment of the present application, the resource load level has a corresponding release ratio, and the step 204 may include:
确定低占用级别的应用集群的资源负载级别对应的释放比例;Determining the release ratio corresponding to the resource load level of the application cluster with a low occupancy level;
按照所述释放比例释放所述低占用级别的应用集群的资源;Release the resources of the low occupancy level application cluster according to the release ratio;
将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
在本申请的一种优选实施例中,所述按照释放比例释放所述低占用级别的应用集群的资源的步骤包括:In a preferred embodiment of the present application, the step of releasing resources of the low occupancy level application cluster according to a release ratio includes:
获取所述低占用级别的应用集群的当前资源;Obtaining a current resource of the application cluster of the low occupancy level;
获取所述低占用级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the low occupancy level;
采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
采用所述当前资源和所述需求资源确定所述低占用级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the low occupancy level;
按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
在本申请的一种优选实施例中,所述步骤205包括:In a preferred embodiment of the present application, the step 205 includes:
向所述保存有释放的资源的资源池申请资源;Requesting a resource from the resource pool in which the released resource is saved;
为所述高占用级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the high occupancy level application cluster.
在具体实现中,云环境下可以划分有多条交易链路,以有针对性地处理各种的事务, 在云环境下可以应用本发明实施例以对于应用集群的资源进行统筹规划。In a specific implementation, a plurality of transaction links can be divided in a cloud environment to deal with various transactions in a targeted manner. The embodiment of the present invention can be applied in a cloud environment to perform overall planning for resources of an application cluster.
本申请实施例,对于在云环境下应用集群,根据各个应用集群资源使用率知晓该应用集群的资源负载状态,从而可以确定其所处的资源负载级别。如果存在高占用级别的应用集群,则为该应用集群申请资源,如果此时申请资源失败,则请求低占用级别的应用集群释放资源,最后将释放的资源分配给高占用级别的应用集群。需要说明的是,本申请实施例是按照应用集群的资源满载级别来释放资源,故而如果反复执行上述步骤,那么最终将拉平整个云环境下应用集群的资源负载,能够充分利用现有资源,提高应用集群的资源使用效率,使得应用集群可以支撑更高的访问流量。In the embodiment of the present application, for applying a cluster in a cloud environment, the resource load status of the application cluster is known according to the resource usage rate of each application cluster, so that the resource load level at which the resource cluster is located can be determined. If the application cluster of the high-occupancy level exists, the resource is applied to the application cluster. If the application fails, the application cluster of the low-occupancy level is requested to release the resources. Finally, the released resources are allocated to the application cluster of the high-occupancy level. It should be noted that, in the embodiment of the present application, resources are released according to the resource full load level of the application cluster. Therefore, if the above steps are repeatedly performed, the resource load of the application cluster in the entire cloud environment is finally flattened, and the existing resources can be fully utilized to improve. Application cluster resource utilization efficiency enables application clusters to support higher access traffic.
为使本领域技术人员更好地理解本申请实施例,以下通过具体的示例来说明本申请实施例中交易链路的压测过程,如图2所示。In order to enable a person skilled in the art to better understand the embodiments of the present application, the pressure measurement process of the transaction link in the embodiment of the present application is illustrated by a specific example, as shown in FIG. 2 .
1,梳理整个交易链路的应用集群,并接入平台;在该平台下接入有应用A集群,应用B集群,应用C集群,这些应用集群组成一个交易链路。1. Combine the application clusters of the entire transaction link and access the platform; access the application A cluster, the application B cluster, and the application C cluster under the platform, and these application clusters form a transaction link.
2,对交易链路进行压测,以探测该交易链路下应用集群的性能瓶颈。为各个应用集群按照资源负载状态划分资源负载级别,其中,出现性能瓶颈的应用集群将划分为资源满载级别。2. Perform a pressure test on the transaction link to detect the performance bottleneck of the application cluster under the transaction link. The resource load level is divided according to the resource load status for each application cluster, and the application cluster with performance bottleneck is divided into resource full load levels.
3,当某应用集群出现性能瓶颈时,如应用A集群,则向资源池申请资源;如果从资源池申请资源成功,则继续向上摸高压力,即提升该交易链路下应用集群资源用户的访问量。3. When a performance bottleneck occurs in an application cluster, for example, if the application cluster A is applied, the resource is applied to the resource pool. If the resource is successfully applied from the resource pool, the pressure is continuously increased, that is, the application of the cluster resource user under the transaction link is improved. Views.
申请机器(资源)时有一个原则:如果多个应用集群同时出现性能瓶颈,则按照每个应用集群的优先级高低来分配资源,首先为优先级高的应用集群申请资源,其次为低优先级的应用集群申请资源,以达到宿主机资源的充分利用;如果不按这个原则,则有可能会导致低优先级的应用集群分配了资源后,资源池的资源耗尽,最后无法再为高优先级的应用集群分配资源。There is a principle when applying for a machine (resource): if multiple application clusters have performance bottlenecks at the same time, resources are allocated according to the priority of each application cluster. First, resources are applied for the application cluster with higher priority, followed by low priority. Application clusters apply for resources to achieve full utilization of host resources; if this principle is not followed, it may cause low-priority application clusters to allocate resources, resource pool resources are exhausted, and finally can no longer be high priority. Level application clusters allocate resources.
4,随着对交易链路的应用集群不断摸高压力,并在抬高压力的时候并实时申请资源,以支撑应用集群当前的访问流量。直到某应用集群出现性能瓶颈,并且申请资源失败(资源池已枯竭)。平台则自动遍历其它链路上的应用集群的资源负载状态,每个应用集群根据自身的资源负载状态不同,梯度释放资源以拉平资源负载水位。4. As the application cluster of the transaction link continues to be under high pressure, and when the pressure is raised, the resources are applied in real time to support the current access traffic of the application cluster. Until a performance bottleneck occurs in an application cluster, and the application for resources fails (the resource pool is exhausted). The platform automatically traverses the resource load status of the application clusters on other links. Each application cluster releases resources according to its own resource load state to level the resource load water level.
5,拉平水位后,资源释放并保存到资源池,出现性能瓶颈的应用集群A不断从资源池申请资源,直到拿到自己的资源需求,则停止其它低负载应用集群释放空闲资源的任务。此时,继续摸高压力,即提升用户的访问流量,从第1步再次迭代。 5. After the water level is leveled, the resources are released and saved to the resource pool. The application cluster A that has performance bottleneck continuously requests resources from the resource pool until it receives its own resource requirements, and stops other low-load application clusters from releasing idle resources. At this point, continue to touch the high pressure, that is, increase the user's access traffic, and iterate again from step 1.
6,通过以上5步迭代,最终以达到充分利用交易链路的应用集群的现有资源,使得该交易链路能够支撑更大用户的访问流量。6, through the above five steps of iteration, and finally to reach the existing resources of the application cluster that fully utilizes the transaction link, so that the transaction link can support the access traffic of a larger user.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because In accordance with embodiments of the present application, certain steps may be performed in other sequences or concurrently. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required in the embodiments of the present application.
参照图4,示出了本申请的一种云环境下应用集群资源分配的装置实施例的结构框图,具体可以包括如下模块:Referring to FIG. 4, a structural block diagram of an apparatus embodiment for applying cluster resource allocation in a cloud environment according to the present application is shown, which may specifically include the following modules:
资源负载状态获取模块301,用于获取云环境下各个应用集群的资源负载状态;The resource load status obtaining module 301 is configured to acquire a resource load status of each application cluster in the cloud environment;
在本申请的一个实施例中,所述资源负载状态获取模块301可以包括如下子模块:In an embodiment of the present application, the resource load state obtaining module 301 may include the following submodules:
资源负载状态获取子模块,用于在访问流量提升时,获取云环境下各个应用集群的资源负载状态。The resource load status acquisition sub-module is configured to obtain the resource load status of each application cluster in the cloud environment when the access traffic is increased.
资源负载级别确定模块302,用于依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;The resource load level determining module 302 is configured to determine a resource load level of the application cluster according to the resource load status; the resource load level includes a resource full load level and other levels;
资源申请模块303,用于为所述资源满载级别的应用集群申请资源;The resource application module 303 is configured to apply for resources for the application cluster of the resource full load level;
在本申请的一个实施例中,所述云环境下可以包括资源池,所述资源申请模块303可以包括如下子模块:In an embodiment of the present application, the cloud environment may include a resource pool, and the resource application module 303 may include the following sub-modules:
第一资源池资源申请子模块,用于向所述资源池申请资源;a first resource pool resource application submodule, configured to apply for a resource to the resource pool;
第一资源处理子模块,用于在所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;a first resource processing sub-module, configured to: when the resources of the resource pool are sufficient, allocate resources in the resource pool to an application cluster of the resource full-load level;
第二资源处理子模块,用于在所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。The second resource processing sub-module is configured to: when the resource of the resource pool is exhausted, requesting the resource for the application cluster of the resource full-load level fails.
在本申请的一个实施例中,所述应用集群可以具有对应的优先级,所述第一资源处理子模块包括:In an embodiment of the present application, the application cluster may have a corresponding priority, and the first resource processing submodule includes:
优先级处理单元,用于在所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。The priority processing unit is configured to allocate resources in the resource pool according to the application cluster whose priority is the resource full load level when the application cluster of the resource full load level is two or more.
资源释放模块304,用于在为所述资源满载级别的应用集群申请资源失败时,按照资源负载级别释放其他级别的应用集群的资源;The resource release module 304 is configured to release resources of other levels of the application cluster according to the resource load level when the application cluster for the resource full load level fails to apply for the resource;
在本申请的一个实施例中,所述资源负载级别可以具有对应的释放比例,所述资源 释放模块304可以包括如下子模块:In an embodiment of the present application, the resource load level may have a corresponding release ratio, the resource The release module 304 can include the following sub-modules:
释放比例确定子模块,用于确定其他级别的应用集群的资源负载级别对应的释放比例;The release ratio determining submodule is configured to determine a release ratio corresponding to a resource load level of the application cluster of another level;
资源比例释放子模块,用于按照所述释放比例释放所述其他级别的应用集群的资源;a resource ratio release submodule, configured to release resources of the application cluster of the other level according to the release ratio;
释放资源保存子模块,用于将所述释放的资源保存至资源池中。The resource saving submodule is released, and the released resource is saved in the resource pool.
在本申请的一个实施例中,所述资源比例释放子模块可以包括如下单元:In an embodiment of the present application, the resource ratio release submodule may include the following units:
当前资源获取单元,用于获取所述其他级别的应用集群的当前资源;a current resource obtaining unit, configured to acquire a current resource of the application cluster of the other level;
当前访问流量单元,用于获取所述其他级别的应用集群的当前访问流量;The current access traffic unit is configured to obtain current access traffic of the application cluster of the other level;
需求资源计算单元,用于采用所述当前访问流量和预设单机极限值计算需求资源;a demand resource calculation unit, configured to calculate a demand resource by using the current access traffic and a preset single-machine limit value;
空闲资源确定单元,用于采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;An idle resource determining unit, configured to determine, by using the current resource and the required resource, an idle resource of the application cluster of the other level;
空闲资源释放单元,用于按照所述释放比例释放所述空闲资源。And an idle resource release unit, configured to release the idle resource according to the release ratio.
释放资源分配模块305,用于将所述释放的资源分配给所述资源满载级别的应用集群。The release resource allocation module 305 is configured to allocate the released resource to the application cluster of the resource full load level.
在本申请的一个实施例中,所述释放资源分配模块205可以包括如下子模块:In an embodiment of the present application, the release resource allocation module 205 may include the following sub-modules:
第二资源池资源申请子模块,用于向所述保存有释放的资源的资源池申请资源;a second resource pool resource application submodule, configured to apply for a resource to the resource pool in which the released resource is saved;
第三资源处理子模块,用于为所述资源满载级别的应用集群分配所述资源池中释放的资源。And a third resource processing submodule, configured to allocate resources released in the resource pool to the application cluster of the resource full load level.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本申请实施例还提供了一种云环境下应用集群资源分配的系统,所述系统包括:The embodiment of the present application further provides a system for applying cluster resource allocation in a cloud environment, where the system includes:
一个或多个处理器;One or more processors;
存储器;和Memory; and
一个或多个模块,所述一个或多个模块存储于所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个模块具有如下功能:One or more modules, the one or more modules being stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functions:
获取云环境下各个应用集群的资源负载状态;Obtain the resource load status of each application cluster in the cloud environment;
依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;Determining, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
为所述资源满载级别的应用集群申请资源;Applying for the resource cluster of the resource full load level;
若为所述资源满载级别的应用集群申请资源失败,则按照资源负载级别释放其他级 别的应用集群的资源;If the application cluster of the resource full load level fails to apply for resources, the other levels are released according to the resource load level. Resources of other application clusters;
将所述释放的资源分配给所述资源满载级别的应用集群。The released resources are allocated to an application cluster of the resource full load level.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
当访问流量提升时,获取云环境下各个应用集群的资源负载状态。When the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
可选地,所述云环境下包括资源池,该一个或多个模块可以具有如下功能:Optionally, the cloud environment includes a resource pool, and the one or more modules may have the following functions:
向所述资源池申请资源;Applying for resources to the resource pool;
当所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;When the resources of the resource pool are sufficient, the resources in the resource pool are allocated to the application cluster of the resource full load level;
当所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application cluster for the resource full load level fails to apply for resources.
可选地,所述应用集群具有对应的优先级,该一个或多个模块可以具有如下功能:Optionally, the application cluster has a corresponding priority, and the one or more modules may have the following functions:
当所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。When the application cluster of the resource full load level is two or more, the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
可选地,所述资源负载级别具有对应的释放比例,该一个或多个模块可以具有如下功能:Optionally, the resource load level has a corresponding release ratio, and the one or more modules may have the following functions:
确定其他级别的应用集群的资源负载级别对应的释放比例;Determine the release ratio corresponding to the resource load level of the application cluster of other levels;
按照所述释放比例释放所述其他级别的应用集群的资源;Release the resources of the other level of the application cluster according to the release ratio;
将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
获取所述其他级别的应用集群的当前资源;Obtaining current resources of the application cluster of the other level;
获取所述其他级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the other level;
采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the other level;
按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
向所述保存有释放的资源的资源池申请资源;Requesting a resource from the resource pool in which the released resource is saved;
为所述资源满载级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the application cluster of the resource full load level.
本申请实施例还提供了一种云环境下应用集群资源分配的装置,所述装置可以包括如下模块:The embodiment of the present application further provides an apparatus for applying cluster resource allocation in a cloud environment, and the apparatus may include the following modules:
资源使用率获取模块,用于获取云环境下指定交易链路中各个应用集群的资源使用率; a resource usage acquisition module, configured to acquire resource usage rates of application clusters in a specified transaction link in a cloud environment;
资源负载级别确定模块,用于依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;a resource load level determining module, configured to determine a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupancy level and a low occupancy level;
资源申请获取模块,用于为所述高占用级别的应用集群申请资源;a resource application obtaining module, configured to apply for resources for the application cluster of the high occupancy level;
资源释放模块,用于若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;a resource release module, configured to release resources of an application cluster of a low occupancy level according to a resource load level if the resource application fails for the application cluster of the high occupancy level;
资源分配模块,用于将所述释放的资源分配给所述高占用级别的应用集群。And a resource allocation module, configured to allocate the released resource to the application cluster of the high occupancy level.
图5是本申请实施例提供的一种服务器结构示意图。该服务器400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)422(例如,一个或一个以上处理器)和存储器432,一个或一个以上存储应用程序442或数据444的存储介质430(例如一个或一个以上海量存储设备)。其中,存储器432和存储介质430可以是短暂存储的或持久存储的。存储在存储介质430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器422可以设置为与存储介质430通信,在服务器400上执行存储介质430中的一系列指令操作。FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 400 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 422 (eg, one or more processors) and memory 432, one or one The storage medium 430 (for example, one or one storage device in Shanghai) that stores the application 442 or the data 444 above. Among them, the memory 432 and the storage medium 430 may be temporarily stored or persistently stored. The program stored on storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the server. Still further, central processor 422 can be configured to communicate with storage medium 430, executing a series of instruction operations in storage medium 430 on server 400.
服务器400还可以包括一个或一个以上电源426,一个或一个以上有线或无线网络接口450,一个或一个以上输入输出接口758,一个或一个以上键盘456,和/或,一个或一个以上操作系统441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。 Server 400 may also include one or more power sources 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 758, one or more keyboards 456, and/or one or more operating systems 441. For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
中央处理器422可以在服务器400上执行以下操作的指令:The central processor 422 can execute instructions on the server 400 for:
获取云环境下各个应用集群的资源负载状态;Obtain the resource load status of each application cluster in the cloud environment;
依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;Determining, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
为所述资源满载级别的应用集群申请资源;Applying for the resource cluster of the resource full load level;
若为所述资源满载级别的应用集群申请资源失败,则按照资源负载级别释放其他级别的应用集群的资源;If the application cluster of the resource full-load level fails to apply for resources, the resources of other levels of the application cluster are released according to the resource load level;
将所述释放的资源分配给所述资源满载级别的应用集群。The released resources are allocated to an application cluster of the resource full load level.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
当访问流量提升时,获取云环境下各个应用集群的资源负载状态。When the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
可选地,所述云环境下包括资源池,该一个或多个模块可以具有如下功能:Optionally, the cloud environment includes a resource pool, and the one or more modules may have the following functions:
向所述资源池申请资源; Applying for resources to the resource pool;
当所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;When the resources of the resource pool are sufficient, the resources in the resource pool are allocated to the application cluster of the resource full load level;
当所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application cluster for the resource full load level fails to apply for resources.
可选地,所述应用集群具有对应的优先级,该一个或多个模块可以具有如下功能:Optionally, the application cluster has a corresponding priority, and the one or more modules may have the following functions:
当所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。When the application cluster of the resource full load level is two or more, the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
可选地,所述资源负载级别具有对应的释放比例,该一个或多个模块可以具有如下功能:Optionally, the resource load level has a corresponding release ratio, and the one or more modules may have the following functions:
确定其他级别的应用集群的资源负载级别对应的释放比例;Determine the release ratio corresponding to the resource load level of the application cluster of other levels;
按照所述释放比例释放所述其他级别的应用集群的资源;Release the resources of the other level of the application cluster according to the release ratio;
将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
获取所述其他级别的应用集群的当前资源;Obtaining current resources of the application cluster of the other level;
获取所述其他级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the other level;
采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the other level;
按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
可选地,该一个或多个模块可以具有如下功能:Optionally, the one or more modules may have the following functions:
向所述保存有释放的资源的资源池申请资源;Requesting a resource from the resource pool in which the released resource is saved;
为所述资源满载级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the application cluster of the resource full load level.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments can be referred to each other.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存 是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. RAM Is an example of a computer readable medium. Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device such that a series of operational steps are performed on the computer or other programmable terminal device to produce computer-implemented processing, such that the computer or other programmable terminal device The instructions executed above provide steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。While a preferred embodiment of the embodiments of the present application has been described, those skilled in the art can make further changes and modifications to the embodiments once they are aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the modifications and the modifications
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何 其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between operations. Moreover, the terms "including", "comprising" or any of them Other variations are intended to encompass non-exclusive inclusions, such that a process, method, article, or terminal device that comprises a plurality of elements includes not only those elements but also other elements not specifically listed or included The elements inherent in methods, articles, or terminal equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that comprises the element, without further limitation.
以上对本申请所提供的一种云环境下应用集群资源分配的方法,一种云环境下应用集群资源分配的装置,以及一种云环境下应用集群资源分配的系统,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The method for applying cluster resource allocation in a cloud environment provided by the present application, a device for applying cluster resource allocation in a cloud environment, and a system for applying cluster resource allocation in a cloud environment are described in detail herein. The principles and implementations of the present application are described by using specific examples. The description of the above embodiments is only for helping to understand the method and core ideas of the present application. Meanwhile, for those skilled in the art, according to the idea of the present application The details of the present invention and the scope of application are subject to change. In the above, the contents of the present specification should not be construed as limiting the present application.

Claims (17)

  1. 一种云环境下应用集群资源分配的系统,其特征在于,所述系统包括:A system for applying cluster resource allocation in a cloud environment, characterized in that the system comprises:
    一个或多个处理器;One or more processors;
    存储器;和Memory; and
    一个或多个模块,所述一个或多个模块存储于所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个模块具有如下功能:One or more modules, the one or more modules being stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functions:
    获取云环境下指定交易链路中各个应用集群的资源使用率;Obtain resource usage rates of application clusters in a specified transaction link in a cloud environment;
    依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;Determining, according to the resource usage rate, a resource load level of each application cluster; the resource load level includes a high occupancy level and a low occupancy level;
    为所述高占用级别的应用集群申请资源;Applying for the application cluster of the high occupancy level;
    若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;If the application for the high-occupancy application cluster fails, the resource of the application cluster with a low occupation level is released according to the resource load level;
    将所述释放的资源分配给所述高占用级别的应用集群。Allocating the released resources to the application cluster of the high occupancy level.
  2. 一种云环境下应用集群资源分配的方法,其特征在于,包括:A method for applying cluster resource allocation in a cloud environment, characterized in that:
    获取云环境下指定交易链路中各个应用集群的资源使用率;Obtain resource usage rates of application clusters in a specified transaction link in a cloud environment;
    依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;Determining, according to the resource usage rate, a resource load level of each application cluster; the resource load level includes a high occupancy level and a low occupancy level;
    为所述高占用级别的应用集群申请资源;Applying for the application cluster of the high occupancy level;
    若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;If the application for the high-occupancy application cluster fails, the resource of the application cluster with a low occupation level is released according to the resource load level;
    将所述释放的资源分配给所述高占用级别的应用集群。Allocating the released resources to the application cluster of the high occupancy level.
  3. 根据权利要求2所述的方法,其特征在于,所述获取云环境下指定交易链路中各个应用集群的资源使用率的步骤包括:The method according to claim 2, wherein the step of acquiring the resource usage rate of each application cluster in the specified transaction link in the cloud environment comprises:
    当访问流量提升时,获取云环境下指定交易链路中各个应用集群的资源使用率。When the access traffic is increased, the resource usage rate of each application cluster in the specified transaction link in the cloud environment is obtained.
  4. 根据权利要求2所述的方法,其特征在于,所述云环境下包括资源池,所述为所述高占用级别的应用集群申请资源的步骤包括:The method of claim 2, wherein the cloud environment includes a resource pool, and the step of requesting resources for the application cluster of the high occupancy level comprises:
    向所述资源池申请资源;Applying for resources to the resource pool;
    当所述资源池的资源充足时,则为所述高占用级别的应用集群分配所述资源池中资源;Allocating resources in the resource pool to the application cluster of the high occupancy level when the resources of the resource pool are sufficient;
    当所述资源池的资源枯竭时,则为所述高占用级别的应用集群申请资源失败。 When the resources of the resource pool are exhausted, the application for the high occupancy level application cluster fails.
  5. 根据权利要求4所述的方法,其特征在于,所述应用集群具有对应的优先级,所述为所述高占用级别的应用集群分配所述资源池中资源的步骤包括:The method according to claim 4, wherein the application cluster has a corresponding priority, and the step of allocating resources in the resource pool to the application cluster of the high occupancy level comprises:
    当所述高占用级别的应用集群为两个或者两个以上时,按照所述优先级为高占用级别的应用集群分配所述资源池中资源。When the application cluster of the high-occupancy level is two or more, the resources in the resource pool are allocated according to the application cluster whose priority is a high occupation level.
  6. 根据权利要求2或4所述的方法,其特征在于,所述资源负载级别具有对应的释放比例,所述按照资源负载级别释放低占用级别的应用集群的资源的步骤包括:The method according to claim 2 or 4, wherein the resource load level has a corresponding release ratio, and the step of releasing resources of the application cluster of the low occupancy level according to the resource load level comprises:
    确定低占用级别的应用集群的资源负载级别对应的释放比例;Determining the release ratio corresponding to the resource load level of the application cluster with a low occupancy level;
    按照所述释放比例释放所述低占用级别的应用集群的资源;Release the resources of the low occupancy level application cluster according to the release ratio;
    将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
  7. 根据权利要求6所述的方法,其特征在于,所述按照释放比例释放所述低占用级别的应用集群的资源的步骤包括:The method according to claim 6, wherein the step of releasing resources of the low occupancy level application cluster according to a release ratio comprises:
    获取所述低占用级别的应用集群的当前资源;Obtaining a current resource of the application cluster of the low occupancy level;
    获取所述低占用级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the low occupancy level;
    采用所述当前访问流量和预设单机极限值计算需求资源;Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
    采用所述当前资源和所述需求资源确定所述低占用级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the low occupancy level;
    按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
  8. 根据权利要求2或4所述的方法,其特征在于,所述将所述释放的资源分配给所述高占用级别的应用集群的步骤包括:The method according to claim 2 or 4, wherein the step of allocating the released resource to the application cluster of the high occupancy level comprises:
    向保存有释放的资源的资源池申请资源;Request a resource from a resource pool that holds the released resources;
    为所述高占用级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the high occupancy level application cluster.
  9. 一种云环境下应用集群资源分配的装置,其特征在于,包括:A device for applying cluster resource allocation in a cloud environment, characterized in that:
    资源使用率获取模块,用于获取云环境下指定交易链路中各个应用集群的资源使用率;a resource usage acquisition module, configured to acquire resource usage rates of application clusters in a specified transaction link in a cloud environment;
    资源负载级别确定模块,用于依据所述资源使用率确定各个应用集群的资源负载级别;所述资源负载级别包括高占用级别和低占用级别;a resource load level determining module, configured to determine a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupancy level and a low occupancy level;
    资源申请获取模块,用于为所述高占用级别的应用集群申请资源;a resource application obtaining module, configured to apply for resources for the application cluster of the high occupancy level;
    资源释放模块,用于若为所述高占用级别的应用集群申请资源失败,则按照资源负载级别释放低占用级别的应用集群的资源;a resource release module, configured to release resources of an application cluster of a low occupancy level according to a resource load level if the resource application fails for the application cluster of the high occupancy level;
    资源分配模块,用于将所述释放的资源分配给所述高占用级别的应用集群。And a resource allocation module, configured to allocate the released resource to the application cluster of the high occupancy level.
  10. 一种云环境下应用集群资源分配的方法,其特征在于,包括: A method for applying cluster resource allocation in a cloud environment, characterized in that:
    获取云环境下各个应用集群的资源负载状态;Obtain the resource load status of each application cluster in the cloud environment;
    依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;Determining, according to the resource load status, a resource load level of the application cluster; the resource load level includes a resource full load level and other levels;
    为所述资源满载级别的应用集群申请资源;Applying for the resource cluster of the resource full load level;
    若为所述资源满载级别的应用集群申请资源失败,则按照资源负载级别释放其他级别的应用集群的资源;If the application cluster of the resource full-load level fails to apply for resources, the resources of other levels of the application cluster are released according to the resource load level;
    将所述释放的资源分配给所述资源满载级别的应用集群。The released resources are allocated to an application cluster of the resource full load level.
  11. 根据权利要求10所述的方法,其特征在于,所述获取云环境下各个应用集群的资源负载状态的步骤包括:The method according to claim 10, wherein the step of acquiring the resource load status of each application cluster in the cloud environment comprises:
    当访问流量提升时,获取云环境下各个应用集群的资源负载状态。When the access traffic is increased, the resource load status of each application cluster in the cloud environment is obtained.
  12. 根据权利要求10所述的方法,其特征在于,所述云环境下包括资源池,所述为所述资源满载级别的应用集群申请资源的步骤包括:The method according to claim 10, wherein the cloud environment includes a resource pool, and the step of applying for resources for the application cluster of the resource full load level comprises:
    向所述资源池申请资源;Applying for resources to the resource pool;
    当所述资源池的资源充足时,则为所述资源满载级别的应用集群分配所述资源池中资源;When the resources of the resource pool are sufficient, the resources in the resource pool are allocated to the application cluster of the resource full load level;
    当所述资源池的资源枯竭时,则为所述资源满载级别的应用集群申请资源失败。When the resources of the resource pool are exhausted, the application cluster for the resource full load level fails to apply for resources.
  13. 根据权利要求12所述的方法,其特征在于,所述应用集群具有对应的优先级,所述为所述资源满载级别的应用集群分配所述资源池中资源的步骤包括:The method according to claim 12, wherein the application cluster has a corresponding priority, and the step of allocating resources in the resource pool to the application cluster of the resource full load level comprises:
    当所述资源满载级别的应用集群为两个或者两个以上时,按照所述优先级为资源满载级别的应用集群分配所述资源池中资源。When the application cluster of the resource full load level is two or more, the resource in the resource pool is allocated according to the application cluster whose priority is the resource full load level.
  14. 根据权利要求10或12所述的方法,其特征在于,所述资源负载级别具有对应的释放比例,所述按照资源负载级别释放其他级别的应用集群的资源的步骤包括:The method according to claim 10 or 12, wherein the resource load level has a corresponding release ratio, and the step of releasing resources of other levels of the application cluster according to the resource load level comprises:
    确定其他级别的应用集群的资源负载级别对应的释放比例;Determine the release ratio corresponding to the resource load level of the application cluster of other levels;
    按照所述释放比例释放所述其他级别的应用集群的资源;Release the resources of the other level of the application cluster according to the release ratio;
    将所述释放的资源保存至资源池中。Save the released resource to the resource pool.
  15. 根据权利要求14所述的方法,其特征在于,所述按照释放比例释放所述其他应用集群的资源的步骤包括:The method according to claim 14, wherein the step of releasing resources of the other application cluster according to a release ratio comprises:
    获取所述其他级别的应用集群的当前资源;Obtaining current resources of the application cluster of the other level;
    获取所述其他级别的应用集群的当前访问流量;Obtaining current access traffic of the application cluster of the other level;
    采用所述当前访问流量和预设单机极限值计算需求资源; Calculating the demand resource by using the current access traffic and the preset stand-alone limit value;
    采用所述当前资源和所述需求资源确定所述其他级别的应用集群的空闲资源;Determining, by the current resource and the required resource, an idle resource of the application cluster of the other level;
    按照所述释放比例释放所述空闲资源。The idle resource is released according to the release ratio.
  16. 根据权利要求10或12所述的方法,其特征在于,所述将所述释放的资源分配给所述资源满载级别的应用集群的步骤包括:The method according to claim 10 or 12, wherein the step of allocating the released resource to the application cluster of the resource full load level comprises:
    向保存有释放的资源的资源池申请资源;Request a resource from a resource pool that holds the released resources;
    为所述资源满载级别的应用集群分配所述资源池中释放的资源。Allocating resources released in the resource pool for the application cluster of the resource full load level.
  17. 一种云环境下应用集群资源分配的装置,其特征在于,包括:A device for applying cluster resource allocation in a cloud environment, characterized in that:
    资源负载状态获取模块,用于获取云环境下各个应用集群的资源负载状态;a resource load status obtaining module, configured to acquire a resource load status of each application cluster in a cloud environment;
    资源负载级别确定模块,用于依据所述资源负载状态确定所述应用集群的资源负载级别;所述资源负载级别包括资源满载级别和其他级别;a resource load level determining module, configured to determine a resource load level of the application cluster according to the resource load status; the resource load level includes a resource full load level and other levels;
    资源申请模块,用于为所述资源满载级别的应用集群申请资源;a resource application module, configured to apply for resources for an application cluster of the resource full load level;
    资源释放模块,用于在为所述资源满载级别的应用集群申请资源失败时,按照资源负载级别释放其他级别的应用集群的资源;a resource release module, configured to release resources of other levels of the application cluster according to a resource load level when the application cluster for the resource full load level fails to apply for a resource;
    释放资源分配模块,用于将所述释放的资源分配给所述资源满载级别的应用集群。 And releasing a resource allocation module, configured to allocate the released resource to an application cluster of the resource full load level.
PCT/CN2017/108252 2016-11-08 2017-10-30 Method, apparatus and system for allocating resources of application clusters under cloud environment WO2018086467A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610982629.XA CN108063784B (en) 2016-11-08 2016-11-08 Method, device and system for distributing application cluster resources in cloud environment
CN201610982629.X 2016-11-08

Publications (1)

Publication Number Publication Date
WO2018086467A1 true WO2018086467A1 (en) 2018-05-17

Family

ID=62109433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108252 WO2018086467A1 (en) 2016-11-08 2017-10-30 Method, apparatus and system for allocating resources of application clusters under cloud environment

Country Status (3)

Country Link
CN (1) CN108063784B (en)
TW (1) TWI755415B (en)
WO (1) WO2018086467A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199251A (en) * 2020-09-25 2021-01-08 同程网络科技股份有限公司 Method, system and device for realizing dynamic increase and decrease of servers through timing tasks

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446069A (en) * 2018-09-26 2019-03-08 平安普惠企业管理有限公司 Compatibility test method, device, computer equipment and medium
CN110597623A (en) * 2019-08-13 2019-12-20 平安普惠企业管理有限公司 Container resource allocation method and device, computer equipment and storage medium
CN112882825A (en) * 2019-11-29 2021-06-01 北京国双科技有限公司 Method, device and equipment for allocating storage resources
CN112350952B (en) * 2020-10-28 2023-04-07 武汉绿色网络信息服务有限责任公司 Controller distribution method and network service system
CN112860403B (en) * 2021-02-22 2023-11-07 中国联合网络通信集团有限公司 Cluster load resource scheduling method, device, equipment, medium and product
CN113965611A (en) * 2021-10-29 2022-01-21 重庆忽米网络科技有限公司 SaaS (software as a service) industrial APP (application) operation method based on resource release and recovery
CN114218560B (en) * 2022-02-22 2023-04-25 湖北芯擎科技有限公司 Resource access method, device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929715A (en) * 2012-10-31 2013-02-13 曙光云计算技术有限公司 Method and system for scheduling network resources based on virtual machine migration
US20140047084A1 (en) * 2012-08-07 2014-02-13 Advanced Micro Devices, Inc. System and method for modifying a hardware configuration of a cloud computing system
CN103763346A (en) * 2013-12-31 2014-04-30 华为技术有限公司 Distributed resource scheduling method and device
CN103856512A (en) * 2012-11-30 2014-06-11 华为技术有限公司 Cloud computing management server, working host, idle host and resource scheduling method
CN104079503A (en) * 2013-03-27 2014-10-01 华为技术有限公司 Method and device of distributing resources
CN105955826A (en) * 2016-05-10 2016-09-21 广东睿江云计算股份有限公司 Control method and device of quality of service in cloud host system
CN106033371A (en) * 2015-03-13 2016-10-19 杭州海康威视数字技术股份有限公司 Method and system for dispatching video analysis task

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120072250A (en) * 2010-12-23 2012-07-03 한국전자통신연구원 Dynamic load_balancing system and method thereof
US8671407B2 (en) * 2011-07-06 2014-03-11 Microsoft Corporation Offering network performance guarantees in multi-tenant datacenters
CN103248659B (en) * 2012-02-13 2016-04-20 北京华胜天成科技股份有限公司 A kind of cloud computing resource scheduling method and system
CN103634330A (en) * 2012-08-20 2014-03-12 曙光信息产业(北京)有限公司 Automatic resource distribution method in cloud calculation environment
US9417919B2 (en) * 2012-09-06 2016-08-16 Hewlett Packard Enterprise Development Lp Computer cluster with objective-based resource sharing
CN103533086B (en) * 2013-10-31 2017-02-01 中国科学院计算机网络信息中心 Uniform resource scheduling method in cloud computing system
TWI552002B (en) * 2014-04-22 2016-10-01 財團法人工業技術研究院 Method and system for dynamic instance deployment of public cloud
CN104268018B (en) * 2014-09-22 2017-11-24 浪潮(北京)电子信息产业有限公司 Job scheduling method and job scheduler in a kind of Hadoop clusters

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140047084A1 (en) * 2012-08-07 2014-02-13 Advanced Micro Devices, Inc. System and method for modifying a hardware configuration of a cloud computing system
CN102929715A (en) * 2012-10-31 2013-02-13 曙光云计算技术有限公司 Method and system for scheduling network resources based on virtual machine migration
CN103856512A (en) * 2012-11-30 2014-06-11 华为技术有限公司 Cloud computing management server, working host, idle host and resource scheduling method
CN104079503A (en) * 2013-03-27 2014-10-01 华为技术有限公司 Method and device of distributing resources
CN103763346A (en) * 2013-12-31 2014-04-30 华为技术有限公司 Distributed resource scheduling method and device
CN106033371A (en) * 2015-03-13 2016-10-19 杭州海康威视数字技术股份有限公司 Method and system for dispatching video analysis task
CN105955826A (en) * 2016-05-10 2016-09-21 广东睿江云计算股份有限公司 Control method and device of quality of service in cloud host system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199251A (en) * 2020-09-25 2021-01-08 同程网络科技股份有限公司 Method, system and device for realizing dynamic increase and decrease of servers through timing tasks

Also Published As

Publication number Publication date
CN108063784A (en) 2018-05-22
TW201818244A (en) 2018-05-16
CN108063784B (en) 2022-01-25
TWI755415B (en) 2022-02-21

Similar Documents

Publication Publication Date Title
WO2018086467A1 (en) Method, apparatus and system for allocating resources of application clusters under cloud environment
US11714667B2 (en) Automated scaling of application in virtual data centers
US10937125B2 (en) Resource-utilization-based workload re-allocation system
JP6219512B2 (en) Virtual hadoop manager
US9569277B1 (en) Rebalancing virtual resources for virtual machines based on multiple resource capacities
CN104375897B (en) Cloud computing resource scheduling method based on the unbalanced degree of minimum relative load
JP2017511940A5 (en)
JP2014527221A (en) Application resource manager on the cloud
RU2015114568A (en) AUTOMATED RESOURCE USE PROFILING
US8959367B2 (en) Energy based resource allocation across virtualized machines and data centers
TW201324358A (en) Dynamic resource allocation method for a virtual machine cluster
TW201407476A (en) System and method for allocating resource of virtual machine
US20150350055A1 (en) Shared resource contention
WO2015032201A1 (en) Virtual machine placing method and device
WO2019105379A1 (en) Resource management method and apparatus, electronic device, and storage medium
TWI671708B (en) Flow rate control method and device
CN104636187A (en) Virtual machine scheduling method in NUMA (non uniform memory access) architecture and based on load prediction
US9971971B2 (en) Computing instance placement using estimated launch times
CN107251007B (en) Cluster computing service ensuring device and method
CN103488538B (en) Application extension device and application extension method in cloud computing system
US11886898B2 (en) GPU-remoting latency aware virtual machine migration
CN103399791A (en) Method and device for migrating virtual machines on basis of cloud computing
Chaudhary et al. A new load balancing technique for virtual machine cloud computing environment
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
CN106412075A (en) Resource allocation method and device based on cloud computing

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: 17869054

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: 17869054

Country of ref document: EP

Kind code of ref document: A1