TW201818244A - 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
TW201818244A
TW201818244A TW106127139A TW106127139A TW201818244A TW 201818244 A TW201818244 A TW 201818244A TW 106127139 A TW106127139 A TW 106127139A TW 106127139 A TW106127139 A TW 106127139A TW 201818244 A TW201818244 A TW 201818244A
Authority
TW
Taiwan
Prior art keywords
resource
resources
application
level
application cluster
Prior art date
Application number
TW106127139A
Other languages
Chinese (zh)
Other versions
TWI755415B (en
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 TW201818244A publication Critical patent/TW201818244A/en
Application granted granted Critical
Publication of TWI755415B publication Critical patent/TWI755415B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/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
    • 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/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

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 application cluster resource allocation in cloud environment   

本發明係有關資料處理技術領域,特別是有關一種雲端環境下應用集群資源分配的方法,一種雲端環境下應用集群資源分配的裝置,以及一種雲端環境下應用集群資源分配的系統。 The invention relates to the technical field of data processing, 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.

雲端計算是一種透過互聯網以服務方式提供動態可伸縮的虛擬資源的計算模式,透過這種方式,共用的軟硬體資源和資訊可以按需求而被提供給電腦和其他設備。雲端計算的基礎環境是虛擬化,虛擬化環境中存在有資源分享。雲端計算環境(以下簡稱雲端環境)中經常使用虛擬機(VM,Virtual Machine),這些虛擬機主要關聯的系統資源等等。 Cloud computing is a computing model that provides dynamically scalable virtual resources as a service through the Internet. In this way, shared software and hardware resources and information can be provided to computers and other devices as needed. The basic environment of cloud computing is virtualization, and resource sharing exists in the virtualized environment. A virtual machine (VM, Virtual Machine) is often used in a cloud computing environment (hereinafter referred to as a cloud environment), and these virtual machines are mainly associated with system resources and the like.

雲端環境中的這些資源都是由虛擬機所共用,當虛擬機需要申請資源時,將從該雲端環境中申請空閒的資源。然而,在資源有限的情況下,如果空閒的資源已經耗盡,那麼虛擬機申請資源失敗,該虛擬機將由於資源負載過大而無法正常工作,極大地影響工作效率。 These resources in the cloud environment are shared by the virtual machine. 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 idle resources have been exhausted, the virtual machine fails to apply for resources, and the virtual machine will not work properly due to excessive resource load, which will greatly affect work efficiency.

鑒於上述問題,提出了本發明實施例以便提供一種克服上述問題或者至少部分地解決上述問題的一種雲端環境下應用集群資源分配的方法,一種雲端環境下應用集群資源分配的裝置,以及一種雲端環境下應用集群資源分配的系統。 In view of the above problems, embodiments of the present invention are provided in order to provide a method for allocating cluster resource in a cloud environment, a device for allocating cluster resource in a cloud environment, and a cloud environment. Application cluster resource allocation system.

為了解決上述問題,本發明實施例揭示了一種雲端環境下應用集群資源分配的系統,所述系統包括:一個或多個處理器;記憶體;和一個或多個模組,所述一個或多個模組係儲存於所述記憶體中並被配置成由所述一個或多個處理器所執行,所述一個或多個模組具有如下功能:獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;依據所述資源使用率來確定各個應用集群的資源負載級別;所述資源負載級別包括高佔用級別和低佔用級別;為所述高佔用級別的應用集群申請資源;若為所述高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;將所述釋放的資源分配給所述高佔用級別的應用集群。 In order to solve the above problems, an embodiment of the present invention discloses a system for allocating cluster resources in a cloud environment. The system includes: one or more processors; a memory; and one or more modules. Each module is stored in the memory and configured to be executed by the one or more processors, and the one or more modules have the following functions: obtaining each application in a specified transaction link in the cloud environment The resource utilization rate of the cluster; determining the resource load level of each application cluster according to the resource utilization rate; the resource load level includes a high-occupancy level and a low-occupancy level; applying for resources for the high-occupancy level application cluster; if If the high-occupancy application cluster fails to apply for resources, the resources of the low-occupancy application cluster are released according to the resource load level; the released resources are allocated to the high-occupancy application cluster.

本發明實施例還揭示了一種雲端環境下應用集群資源分配的方法,包括: 獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;依據所述資源使用率來確定各個應用集群的資源負載級別;所述資源負載級別包括高佔用級別和低佔用級別;為所述高佔用級別的應用集群申請資源;若為所述高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;將所述釋放的資源分配給所述高佔用級別的應用集群。 An embodiment of the present invention also discloses a method for allocating application cluster resources in a cloud environment, including: obtaining resource utilization rates of each application cluster in a designated transaction link in the cloud environment; and determining resources of each application cluster according to the resource utilization rates. Load level; the resource load level includes a high-occupancy level and a low-occupancy level; apply for resources for the high-occupancy level application cluster; if resource application fails for the high-occupancy level application cluster, release according to the resource load level Resources of a low-occupancy level application cluster; allocating the released resources to the high-occupancy level application cluster.

較佳地,所述獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率的步驟包括:當訪問流量提升時,獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率。 Preferably, the step of obtaining the resource utilization rate of each application cluster in the designated transaction link in the cloud environment includes: when the access traffic is increased, obtaining the resource utilization rate of each application cluster in the designated transaction link in the cloud environment.

較佳地,所述雲端環境下包括資源池,所述為高佔用級別的應用集群申請資源的步驟包括:向所述資源池申請資源;當所述資源池的資源充足時,則為所述高佔用級別的應用集群分配所述資源池中資源;當所述資源池的資源枯竭時,則為所述高佔用級別的應用集群申請資源失敗。 Preferably, the cloud environment includes a resource pool, and the step of applying for resources for a high-occupancy application cluster includes: applying for resources from the resource pool; when the resources of the resource pool are sufficient, the resource pool is the A high-occupancy level application cluster allocates resources in the resource pool; when the resources of the resource pool are exhausted, applying for resources for the high-occupancy level application cluster fails.

較佳地,所述應用集群具有對應的優先順序,所述為高佔用級別的應用集群分配所述資源池中資源的步驟包括:當所述高佔用級別的應用集群為兩個或者兩個以上 時,按照所述優先順序為高佔用級別的應用集群分配所述資源池中資源。 Preferably, the application clusters have corresponding priorities, and the step of allocating resources in the resource pool to application clusters with high occupation levels includes: when the application clusters with high occupation levels are two or more When allocating resources in the resource pool to the application cluster with a high occupation level according to the priority order.

較佳地,所述資源負載級別具有對應的釋放比例,所述按照資源負載級別來釋放低佔用級別的應用集群的資源的步驟包括:確定低佔用級別的應用集群的資源負載級別對應的釋放比例;按照所述釋放比例來釋放所述低佔用級別的應用集群的資源;將所述釋放的資源保存至資源池中。 Preferably, the resource load level has a corresponding release ratio, and the step of releasing the resources of the low-occupancy application cluster according to the resource load level includes determining a release ratio corresponding to the resource load level of the low-occupancy application cluster. Release the resources of the low-occupancy level application cluster according to the release ratio; and save the released resources in a resource pool.

較佳地,所述按照釋放比例來釋放所述低佔用級別的應用集群的資源的步驟包括:獲取所述低佔用級別的應用集群的目前資源;獲取所述低佔用級別的應用集群的目前訪問流量;採用所述目前訪問流量和預設單機極限值來計算需求資源;採用所述目前資源和所述需求資源來確定所述低佔用級別的應用集群的空閒資源;按照所述釋放比例來釋放所述空閒資源。 Preferably, the step of releasing the resources of the low-occupancy-level application cluster according to the release ratio includes: obtaining the current resources of the low-occupancy-level application cluster; obtaining the current access of the low-occupancy-level application cluster. Traffic; using the current access traffic and a preset stand-alone limit value to calculate a demand resource; using the current resource and the demand resource to determine idle resources of the low-occupancy application cluster; releasing according to the release ratio The idle resource.

較佳地,所述將釋放的資源分配給所述高佔用級別的應用集群的步驟包括:向所述保存有釋放的資源的資源池申請資源;為所述高佔用級別的應用集群分配所述資源池中釋放的資源。 Preferably, the step of allocating the released resources to the high-occupancy-level application cluster includes: applying for resources from the resource pool in which the released resources are stored; and allocating the high-occupancy-level application cluster. Resources released in the resource pool.

本發明實施例還揭示了一種雲端環境下應用集群資源分配的裝置,包括:資源使用率獲取模組,用以獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;資源負載級別確定模組,用以依據所述資源使用率來確定各個應用集群的資源負載級別;所述資源負載級別包括高佔用級別和低佔用級別;資源申請獲取模組,用以為所述高佔用級別的應用集群申請資源;資源釋放模組,用以若為所述高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;資源分配模組,用以將所述釋放的資源分配給所述高佔用級別的應用集群。 An embodiment of the present invention also discloses an apparatus for allocating application cluster resources in a cloud environment, including: a resource utilization rate acquisition module for acquiring the resource utilization rate of each application cluster in a designated transaction link in the cloud environment; determining a resource load level A module for determining a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupation level and a low occupation level; a resource application acquisition module for the application of the high occupation level The cluster applies for resources; a resource release module is used to release the resources of a low-occupancy application cluster according to the resource load level if the resource application fails for the high-occupancy application cluster; a resource allocation module is used to The released resources are allocated to the high-occupancy application cluster.

本發明實施例還揭示了一種雲端環境下應用集群資源分配的方法,包括:獲取雲端環境下各個應用集群的資源負載狀態;依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;為所述資源滿載級別的應用集群申請資源;若為所述資源滿載級別的應用集群申請資源失敗,則按照資源負載級別來釋放其他級別的應用集群的資源;將所述釋放的資源分配給所述資源滿載級別的應用集 群。 An embodiment of the present invention also discloses a method for allocating resources of an application cluster in a cloud environment, including: obtaining a resource load status of each application cluster in the cloud environment; determining a resource load level of the application cluster according to the resource load status; The resource load level includes a resource full level and other levels; apply for resources for an application cluster at the resource full level; if the application fails for an application cluster at the resource full level, release other levels of application clusters according to the resource load level Allocating the released resources to an application cluster at the resource full level.

較佳地,所述獲取雲端環境下各個應用集群的資源負載狀態的步驟包括:當訪問流量提升時,獲取雲端環境下各個應用集群的資源負載狀態。 Preferably, the step of obtaining the resource load status of each application cluster in the cloud environment includes: when the access traffic is increased, obtaining the resource load status of each application cluster in the cloud environment.

較佳地,所述雲端環境下包括資源池,所述為資源滿載級別的應用集群申請資源的步驟包括:向所述資源池申請資源;當所述資源池的資源充足時,則為所述資源滿載級別的應用集群分配所述資源池中資源;當所述資源池的資源枯竭時,則為所述資源滿載級別的應用集群申請資源失敗。 Preferably, the cloud environment includes a resource pool, and the step of applying for resources for an application cluster at a resource full level includes: applying for resources from the resource pool; when the resources of the resource pool are sufficient, the resource pool is the An application cluster at a resource full level allocates resources in the resource pool; when the resources of the resource pool are exhausted, the application for the resource cluster at the resource full level fails to apply for resources.

較佳地,所述應用集群具有對應的優先順序,所述為資源滿載級別的應用集群分配所述資源池中資源的步驟包括:當所述資源滿載級別的應用集群為兩個或者兩個以上時,按照所述優先順序為資源滿載級別的應用集群分配所述資源池中資源。 Preferably, the application cluster has a corresponding priority order, and the step of allocating resources in the resource pool to an application cluster at a resource full level includes: when the application cluster at a resource full level is two or more than two At that time, the resources in the resource pool are allocated to the application cluster at the resource full level according to the priority order.

較佳地,所述資源負載級別具有對應的釋放比例,所述按照資源負載級別來釋放其他級別的應用集群的資源的步驟包括:確定其他級別的應用集群的資源負載級別對應的釋放比例;按照所述釋放比例來釋放所述其他級別的應用集群的 資源;將所述釋放的資源保存至資源池中。 Preferably, the resource load level has a corresponding release ratio, and the step of releasing resources of application clusters of other levels according to the resource load level includes: determining release ratios corresponding to the resource load levels of application clusters of other levels; The release ratio releases resources of the application clusters of other levels; and saves the released resources in a resource pool.

較佳地,所述按照釋放比例來釋放所述其他應用集群的資源的步驟包括:獲取所述其他級別的應用集群的目前資源;獲取所述其他級別的應用集群的目前訪問流量;採用所述目前訪問流量和預設單機極限值來計算需求資源;採用所述目前資源和所述需求資源來確定所述其他級別的應用集群的空閒資源;按照所述釋放比例來釋放所述空閒資源。 Preferably, the step of releasing the resources of the other application clusters according to the release ratio includes: obtaining current resources of the other-level application clusters; obtaining current access traffic of the other-level application clusters; using the The current access traffic and the preset single machine limit value are used to calculate the required resources; the current resources and the required resources are used to determine the idle resources of the application clusters of other levels; and the idle resources are released according to the release ratio.

較佳地,所述將釋放的資源分配給所述資源滿載級別的應用集群的步驟包括:向所述保存有釋放的資源的資源池申請資源;為所述資源滿載級別的應用集群分配所述資源池中釋放的資源。 Preferably, the step of allocating the released resources to the application cluster at the resource full level includes: applying for resources from the resource pool in which the released resources are stored; and allocating the application cluster at the resource full level Resources released in the resource pool.

本發明實施例還揭示了一種雲端環境下應用集群資源分配的裝置,包括:資源負載狀態獲取模組,用以獲取雲端環境下各個應用集群的資源負載狀態;資源負載級別確定模組,用以依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;資源申請模組,用以為所述資源滿載級別的應用集群 申請資源;資源釋放模組,用以在為所述資源滿載級別的應用集群申請資源失敗時,按照資源負載級別來釋放其他級別的應用集群的資源;釋放資源分配模組,用以將所述釋放的資源分配給所述資源滿載級別的應用集群。 An embodiment of the present invention also discloses a device for allocating resources of an application cluster in a cloud environment, including: a resource load status acquisition module for acquiring resource load status of each application cluster in the cloud environment; a resource load level determination module for Determining the resource load level of the application cluster according to the resource load status; the resource load level includes a resource full level and other levels; a resource application module for applying for resources for the application cluster at the resource full level; resource release A module for releasing resources of application clusters of other levels according to the resource load level when the application for the resource full-level application cluster fails, and releasing a resource allocation module for allocating the released resources to An application cluster at the resource full load level.

本發明實施例包括以下優點:本發明實施例對於在雲端環境下應用集群,根據各個應用集群資源負載狀態來確定其所處的資源負載級別,如果存在有資源滿載級別的應用集群,則為該應用集群申請資源,如果此時申請資源失敗,則請求其他級別的應用集群釋放資源,最後將釋放的資源分配給資源滿載級別的應用集群。需要說明的是,本發明實施例是按照應用集群的資源滿載級別來釋放資源,故而如果反復執行上述步驟,那麼最終將拉平整個雲端環境下應用集群的資源負載,能夠充分利用現有資源,提高應用集群的資源使用效率,使得應用集群可以支撐更高的訪問流量。 The embodiments of the present invention include the following advantages: For an application cluster in a cloud environment, the embodiment of the present invention determines the resource load level of each application cluster according to the resource load status of the application cluster. If there is an application cluster with a resource full level, this is the The application cluster applies for resources. If the resource application fails at this time, it requests the application clusters at other levels to release the resources, and finally allocates the released resources to the application clusters at the resource full level. It should be noted that the embodiment of the present invention releases resources 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 will be flattened, and the existing resources can be fully utilized to improve the application. The resource utilization efficiency of the cluster enables the application cluster to support higher access traffic.

301‧‧‧資源負載狀態獲取模組 301‧‧‧Resource load status acquisition module

302‧‧‧資源負載級別確定模組 302‧‧‧Resource load level determination module

303‧‧‧資源申請模組 303‧‧‧Resource Application Module

304‧‧‧資源釋放模組 304‧‧‧Resource Release Module

305‧‧‧釋放資源分配模組 305‧‧‧Release resource allocation module

400‧‧‧伺服器 400‧‧‧Server

422‧‧‧中央處理器 422‧‧‧Central Processing Unit

426‧‧‧電源 426‧‧‧Power

430‧‧‧儲存媒體 430‧‧‧Storage media

432‧‧‧記憶體 432‧‧‧Memory

441‧‧‧作業系統 441‧‧‧operating system

442‧‧‧應用程式 442‧‧‧ Apps

444‧‧‧資料 444‧‧‧ Information

450‧‧‧有線或無線網路介面 450‧‧‧ wired or wireless network interface

456‧‧‧鍵盤 456‧‧‧Keyboard

458‧‧‧輸入輸出介面 458‧‧‧I / O interface

圖1是本發明的一種雲端環境下應用集群資源分配的方法實施例1的步驟流程圖;圖2是本發明的一種雲端環境下應用集群的資源分配示意圖;圖3是本發明的一種雲端環境下應用集群資源分配的 方法實施例2的步驟流程圖;圖4是本發明的一種雲端環境下應用集群資源分配的裝置實施例的結構方塊圖;圖5是本發明的一種伺服器實施例結構示意圖。 FIG. 1 is a flowchart of steps in Embodiment 1 of a method for allocating resources in a cloud environment according to the present invention; FIG. 2 is a schematic diagram for allocating resources in an application cluster in a cloud environment according to the present invention; FIG. 3 is a cloud environment according to the present invention FIG. 4 is a structural block diagram of an embodiment of an apparatus for applying cluster resource allocation in a cloud environment of the present invention; FIG. 5 is a structure of a server embodiment of the present invention schematic diagram.

為了使本發明的上述目的、特徵和優點能夠更加明顯易懂,下面結合附圖和具體實施方式而對本發明作進一步詳細的說明。 In order to make the foregoing objects, features, and advantages of the present invention more comprehensible, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

在雲端環境下包括一個或多個應用集群,可以分別獨立完成特定服務,應用集群之間交互形成交易鏈路,能夠完成一個完整的交易工作。例如,在某個供應鏈路的應用集群中,包括商品、物流、認證、行銷等四個應用系統,在該供應鏈路的應用集群中完成商品、物流、認證、行銷等一系列工作。交易鏈路壓測可以被用來測試應用集群的交易鏈路的處理效率。 In the cloud environment, it includes one or more application clusters, which can independently complete specific services, and the application clusters interact to form a transaction link, which can complete a complete transaction. For example, in an application cluster of a supply chain, there are four application systems including commodities, logistics, authentication, and marketing. In the application cluster of the supply chain, a series of tasks such as commodities, logistics, authentication, and marketing are completed. The transaction link stress test can be used to test the processing efficiency of the transaction link of the application cluster.

交易鏈路壓測透過自動化的測試工具來模擬多種正常、峰值以及異常負載條件而對應用集群的各項性能指標進行壓測,檢測出應用集群的性能瓶頸,提高應用集群的處理能力。 Transaction link stress testing uses automated testing tools to simulate a variety of normal, peak, and abnormal load conditions to stress test various performance indicators of application clusters, detect performance bottlenecks in application clusters, and improve processing capabilities of application clusters.

然而,目前交易鏈路壓測只是測試出應用集群的性能瓶頸,並且當訪問流量達到目標值,例如達到15W的訪問流量時,則不再向上探測應用集群的處理能力,那麼資源無法被充分利用起來。 However, the current transaction link stress test only tests the performance bottleneck of the application cluster, and when the access traffic reaches the target value, such as 15W access traffic, the processing capacity of the application cluster is no longer probed upward, so resources cannot be fully utilized stand up.

針對上述問題,本發明實施例對於雲端環境下應用集群,在指定的平臺上壓測過程中,拉平交易鏈路整體應用集群的資源負載,在現有資源有限的情況下,充分利用現有資源,均衡各個應用集群的資源負載,提升應用集群的處理能力,使得應用集群能夠支撐更高訪問流量。 In view of the above problems, in the embodiment of the present invention, for the application cluster in the cloud environment, during the pressure test on the specified platform, the resource load of the overall application cluster of the transaction link is leveled. When the existing resources are limited, the existing resources are fully utilized to balance The resource load of each application cluster improves the processing capacity of the application cluster, enabling the application cluster to support higher access traffic.

參照圖1,示出了本發明的一種雲端環境下應用集群資源分配的方法實施例的步驟流程圖,具體上可以包括如下步驟:步驟101,獲取雲端環境下各個應用集群的資源負載狀態;在本發明實施例中,首先梳理某個交易鏈路的應用集群,並將該應用集群接入指定的平臺上,形成雲端環境。在該雲端環境下能夠對於應用集群進行統籌規劃。 Referring to FIG. 1, a flowchart of a method embodiment of an application cluster resource allocation method in a cloud environment according to the present invention is shown. Specifically, the method may include the following steps: Step 101: Obtain a resource load status of each application cluster in a cloud environment; In the embodiment of the present invention, an application cluster of a certain transaction link is first combed, and the application cluster is connected to a designated platform to form a cloud environment. In this cloud environment, overall planning for application clusters can be performed.

如圖2所示,在某個交易鏈路上包括應用A集群,應用B集群,應用C集群,這些應用集群接入到某個指定的平臺中,在該平臺上的應用集群可以共用資源。 As shown in FIG. 2, a certain transaction link includes an application A cluster, an application B cluster, and an application C cluster. These 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 an application cluster refers to the resource utilization rate of the application cluster. Specifically, resources can include capacity, CPU, memory, disk I / O, network bandwidth, and so on. In some cases, the resource usage of an application cluster can reach 100%.

在本發明的一個實施例中,所述步驟101可以包括如下子步驟:子步驟S11,當訪問流量提升時,獲取雲端環境下各個應用集群的資源負載狀態。 In an embodiment of the present invention, the step 101 may include the following sub-steps: Sub-step S11: when the access traffic is increased, obtain the resource load status of each application cluster in the cloud environment.

本發明實施例透過對交易鏈路進行壓測,探測目前應用集群的性能瓶頸。所謂性能瓶頸,即為資源使用率達到了危險閾值,此時應用集群將無法正常工作。 The embodiment of the present invention detects the performance bottleneck of the current application cluster by stress testing the transaction link. The so-called performance bottleneck is that the resource usage has reached a dangerous threshold, and the application cluster will not work properly at this time.

在對交易鏈路進行壓測的過程中,可以不斷提升用戶對於應用集群的訪問流量。在一種情形下,本發明實施例在檢測到訪問流量提升時,將獲取雲端環境下各個應用集群的資源負載狀態。 During the stress test of the transaction link, the user's access to the application cluster can be continuously improved. In one case, when an increase in access traffic is detected, the embodiments of the present invention will obtain the resource load status of each application cluster in the cloud environment.

步驟102,依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;在本發明實施例中,對於各個應用集群,將按照其資源負載狀態來確定其所處的資源負載級別,資源負載級別能夠被用來表示應用集群的資源使用率。 Step 102: Determine the resource load level of the application cluster according to the resource load status; the resource load level includes a resource full level and other levels; in the embodiment of the present invention, for each application cluster, the resource load will be determined according to its resource load. State to determine its resource load level. The resource load level can be used to indicate the resource usage of the application cluster.

資源負載級別可以包括資源滿載級別和其他級別,資源滿載級別是指應用集群的資源使用率已經達到一個危險閾值,例如,可能是CPU使用率達到90%。 The resource load level can include the resource full level and other levels. The resource full level means that the resource usage of the application cluster has reached a dangerous threshold, for example, it may be that the CPU usage reaches 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 A cluster has a CPU usage greater than 70% (CPU> 70%), or the relationship between the average load and the number of CPU cores within 1 minute is load1> core_num * 1.5, then the application can be considered as an application The A cluster system is at the full resource level, while the application B cluster and the application C cluster are at other levels.

需要說明的是,本發明實施例對於資源負載級別的級別數量的劃分,可以按照具體需求來劃分,本發明實施例對此不加以限制。此外,本發明實施例對於資源負載級別 的劃分方式,不僅僅局限於CPU使用率,也可以結合其他資源參數來進行劃分,比如記憶體、磁片I/O、網路帶寬等使用率,或者按照其他方式來進行劃分均可,本發明實施例同樣對此不加以限制。 It should be noted that the division of the number of levels of resource load levels in the embodiments of the present invention may be divided according to specific requirements, which is not limited in the embodiments of the present invention. In addition, the method for dividing the resource load level according to the embodiment of the present invention is not limited to the CPU usage rate, but can also be divided in combination with other resource parameters, such as the usage rate of memory, disk I / O, and network bandwidth, or The division may be performed in other manners, which is not limited in the embodiment of the present invention.

步驟103,為所述資源滿載級別的應用集群申請資源;在雲端環境下可以包括資源池,在資源池中放置有空閒的資源,當應用集群需要進行申請資源時,將首先向資源池申請資源。 Step 103: Apply for resources for the application cluster at the resource full level; in a cloud environment, a resource pool may be included, and idle resources are placed in the resource pool. When the application cluster needs to apply for resources, it will first apply for resources from the resource pool. .

在本發明的一個實施例中,所述步驟103可以包括如下子步驟:子步驟S21,向所述資源池申請資源;子步驟S22,當所述資源池的資源充足時,則為所述資源滿載級別的應用集群分配所述資源池中資源;子步驟S23,當所述資源池的資源枯竭時,則為所述資源滿載級別的應用集群申請資源失敗。 In an embodiment of the present invention, the step 103 may include the following sub-steps: sub-step S21, applying for resources from the resource pool; sub-step S22, when the resources of the resource pool are sufficient, the resources are the resources The application cluster at the full load level allocates resources in the resource pool; in step S23, when the resources of the resource pool are exhausted, the application for the resource cluster at the full load level fails to apply for resources.

可以理解,如果資源池中資源充足,那麼可以直接將資源池中的資源分配給資源滿載級別的應用集群,但是,如果資源池中資源已經枯竭,那麼將無法為資源滿載級別的應用集群申請資源,此時申請資源失敗。 It can be understood that if there are sufficient resources in the resource pool, the resources in the resource pool can be directly allocated to the application cluster at the resource full level, but if the resources in the resource pool have been exhausted, then the resources cannot be applied for the application cluster at the resource full level. , At this time failed to apply for resources.

在本發明的一個實施例中,所述應用集群可以具有對應的優先順序,所述子步驟S22可以包括如下子步驟:子步驟S221,當所述資源滿載級別的應用集群為兩個或者兩個以上時,按照所述優先順序為資源滿載級別的應 用集群分配所述資源池中資源。 In an embodiment of the present invention, the application cluster may have a corresponding priority order, and the sub-step S22 may include the following sub-steps: sub-step S221, when the resource full-level application cluster is two or two In the above, the resources in the resource pool are allocated to the application cluster at the resource full level according to the priority order.

當資源池中存在有可分配的資源時,可以將資源優先分配給高優先級別的應用集群。具體來說,如果多個應用集群同時出現性能瓶頸,亦即,多個資源滿載級別的應用集群同時出現時,將按照優先順序為每個應用集群按序分配資源,高優先順序的應用集群優先申請資源,然後再為低優先順序的應用集群申請資源,透過這樣的分配原則,可以使得應用集群的宿主機資源的充分利用。 When there are allocable resources in the resource pool, the resources can be preferentially allocated to the application cluster of high priority. Specifically, if multiple application clusters have performance bottlenecks at the same time, that is, when multiple application clusters with full resource levels appear at the same time, each application cluster will be allocated resources in order according to the priority order, and the high priority application cluster will take precedence Apply for resources, and then apply for low-priority application clusters. Through this allocation principle, you can make full use of the host resources of the application clusters.

反之,如果不按照優先順序為每個應用集群按序分配資源,那麼將可能導致在為低優先順序的應用集群申請資源後,資源池中資源枯竭,那麼最後將無法為高優先順序的應用集群分配資源。 Conversely, if you do not allocate resources to each application cluster in order according to the priority order, it may lead to the exhaustion of resources in the resource pool after applying for resources for low-priority application clusters, and you will eventually be unable to serve high-priority application clusters. distribute resources.

需要說明的是,本發明實施例中對於應用集群的優先順序,可以由相關人員來進行設定,當然,也可以按照應用集群的重要程度或者處理順序等其他方式來設定應用集群的優先順序,本發明實施例對此不加以限制。 It should be noted that, in the embodiment of the present invention, the priority order of the application clusters can be set by relevant personnel. Of course, the priority order of the application clusters can also be set according to the importance or processing order of the application clusters. The embodiment of the invention does not limit this.

步驟104,若為所述資源滿載級別的應用集群申請資源失敗,則按照資源負載級別來釋放其他級別的應用集群的資源;本發明實施例在從資源池申請資源失敗時,將釋放其他應用集群的資源來彌補目前資源不足的情況。 In step 104, if the application resource fails for the application cluster at the resource full load level, the resources of other application clusters are released according to the resource load level. When the application for resources from the resource pool fails, the embodiment of the present invention will release other application clusters. Resources to make up for the current lack of resources.

在本發明的一個實施例中,所述資源負載級別可以具有對應的釋放比例,所述步驟104可以包括如下子步驟:子步驟S31,確定其他級別的應用集群的資源負載級 別對應的釋放比例;子步驟S32,按照所述釋放比例來釋放所述其他級別的應用集群的資源;子步驟S33,將所述釋放的資源保存至資源池中。 In an embodiment of the present invention, the resource load level may have a corresponding release ratio, and the step 104 may include the following sub-steps: sub-step S31, determining release ratios corresponding to resource load levels of application clusters of other levels; Sub-step S32 is to release the resources of the application clusters at other levels according to the release ratio; and sub-step S33 is to save the released resources to the resource pool.

在本發明實施例中,在釋放應用集群的資源時,是按照應用集群的資源負載級別來釋放資源,亦即,如果是負載較大的應用集群,則釋放較少的資源,如果是負載較小的應用集群,則釋放較多的資源。 In the embodiment of the present invention, when releasing the resources of the application cluster, the resources are released according to the resource load level of the application cluster, that is, if the application cluster has a large load, less resources are released, and if the load is relatively heavy, A small application cluster releases more resources.

在本發明的一個實施例中,所述子步驟S32,亦即,所述按照釋放比例釋放所述其他應用集群的資源的步驟包括:子步驟S321,獲取所述其他級別的應用集群的目前資源;子步驟S322,獲取所述其他級別的應用集群的目前訪問流量;子步驟S323,採用所述目前訪問流量和預設單機極限值來計算需求資源;子步驟S324,採用所述目前資源和所述需求資源來確定所述其他級別的應用集群的空閒資源;子步驟S325,按照所述釋放比例來釋放所述空閒資源。 In one embodiment of the present invention, the sub-step S32, that is, the step of releasing the resources of the other application clusters according to the release ratio includes: a sub-step S321, obtaining current resources of the other-level application clusters Sub-step S322, obtaining the current access traffic of the application cluster at another level; sub-step S323, using the current access traffic and a preset stand-alone limit value to calculate required resources; sub-step S324, using the current resources and all The required resources are determined to determine the idle resources of the application clusters at other levels; in step S325, the idle resources are released according to the release ratio.

在本發明實施例中,目前應用集群所需的資源可以是:目前應用集群的每秒訪問總流量/日常壓測單機極值,其中,日常壓測單機極值是指應用集群中單個虛擬機 的所能承受的訪問流量。根據應用集群的目前資源和需求資源,可以確定該應用集群可以釋放的空閒資源。 In the embodiment of the present invention, the resources required by the current application cluster may be: total current traffic per second of the current application cluster / daily stress test single machine extreme value, wherein the daily stress test single machine extreme value refers to a single virtual machine in the application cluster Of affordable access traffic. According to the current resources and demand resources of the application cluster, the idle resources that the application cluster can release can be determined.

在另一實施例中,目前應用集群所需的資源還可以是:目前應用集群的每秒訪問總流量/日常壓測單機極值/安全水位。其中,安全水位是一個buffer(緩衝),可根據實際需求來設定大小或者不使用,本發明實施例對此不加以限制。 In another embodiment, the resources required by the current application cluster may also be: the total traffic per second of the current application cluster / daily pressure test single machine extreme value / safe water level. The safe water level is a buffer (buffer), which can be set according to actual needs or not used, which is not limited in the embodiment of the present invention.

如圖2所示,應用B集群的資源負載級別較高,資源使用率較高,CPU使用率大於50%,小於60%,則應用B集群只需要釋放5%的資源,應用C集群的資源負載級別較低,資源使用率較低,CPU使用率大於10%,小於20%,則應用C集群需要釋放15%的資源。釋放的資源可以被保存到T4資源池中。透過資源梯度式釋放,讓各個應用集群的資源能夠保持在某個水平線,而不是一刀切。 As shown in Figure 2, application B cluster has a higher resource load level and higher resource utilization. CPU usage is greater than 50% and less than 60%. Application B cluster only needs to release 5% of resources, and application C cluster resources. The load level is low and the resource usage is low. If the CPU usage is greater than 10% and less than 20%, the application C cluster needs to release 15% of the resources. The released resources can be saved to the T4 resource pool. Through resource gradient release, the resources of each application cluster can be maintained at a certain level, rather than a one-size-fits-all.

步驟105,將所述釋放的資源分配給所述資源滿載級別的應用集群。 Step 105: Allocate the released resources to an application cluster at the resource full level.

在本發明的一個實施例中,所述步驟105可以包括如下子步驟:子步驟S41,向所述保存有釋放的資源的資源池申請資源;子步驟S42,為所述資源滿載級別的應用集群分配所述資源池中釋放的資源。 In an embodiment of the present invention, the step 105 may include the following sub-steps: sub-step S41, applying for resources from the resource pool in which the released resources are stored; and sub-step S42, an application cluster of the resource full level Allocating resources released in the resource pool.

當資源池中有釋放的資源存入後,資源滿載級別的應用集群可以從該資源池中不斷地申請資源,直到滿足自己 的需求為止,則可以停止其他級別的應用集群的釋放空閒資源。 After the released resources in the resource pool are deposited, the application cluster at the full resource level can continuously apply for resources from the resource pool until it meets its needs, and then it can stop the release of idle resources by other application clusters.

具體來說,資源滿載級別的應用集群的資源需求量,可以是根據訪問流量而確定出預測實例數(虛擬機資源),然後再將預測實例數減去目前實例數(目前虛擬機資源),即為該應用集群的資源需求量。 Specifically, the resource demand of the application cluster at the resource full level can be determined by predicting the number of instances (virtual machine resources) according to access traffic, and then subtracting the number of predicted instances from the current number of instances (current virtual machine resources). This is the resource requirement of the application cluster.

當然,資源滿載級別的應用集群的資源需求可以是將應用集群從資源滿載級別,降低至其他級別。 Of course, the resource requirements of an application cluster at the resource full level may be to reduce the application cluster from the resource full level to another level.

當本發明實施例完成對資源滿載級別的應用集群分配資源後,可以繼續提升用戶的訪問流量,並再次執行步驟101-步驟105,如是反復,最終將拉平整個交易鏈路的應用集群的資源負載狀態,使得各個應用集群的資源都能夠充分利用。 After the embodiment of the present invention completes allocating resources to the application cluster at the resource full level, the user's access flow can be continuously improved, and steps 101 to 105 are performed again. If repeated, the resource load of the application cluster of the entire transaction link will eventually be leveled out. Status, so that the resources of each application cluster can be fully utilized.

本發明實施例對於在雲端環境下應用集群,根據各個應用集群資源負載狀態來確定其所處的資源負載級別,如果存在有資源滿載級別的應用集群,則為該應用集群申請資源,如果此時申請資源失敗,則請求其他級別的應用集群釋放資源,最後將釋放的資源分配給資源滿載級別的應用集群。需要說明的是,本發明實施例是按照應用集群的資源滿載級別來釋放資源,故而如果反復執行上述步驟,那麼最終將拉平整個雲端環境下應用集群的資源負載,能夠充分利用現有資源,提高應用集群的資源使用效率,使得應用集群可以支撐更高的訪問流量。 In the embodiment of the present invention, for an application cluster in a cloud environment, the resource load level of each application cluster is determined according to the resource load status of each application cluster. If there is an application cluster with a resource full level, it applies for resources for the application cluster. If the resource application fails, the application clusters at other levels are requested to release the resources, and finally the released resources are allocated to the application clusters at the resource full level. It should be noted that the embodiment of the present invention releases resources 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 will be flattened, and the existing resources can be fully utilized to improve the application. The resource utilization efficiency of the cluster enables the application cluster to support higher access traffic.

參照圖3,示出了本發明的一種雲端環境下應用集群 資源分配的方法實施例2的步驟流程圖,具體上可以包括如下步驟:步驟201,獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;步驟202,依據所述資源使用率來確定各個應用集群的資源負載級別;所述資源負載級別包括高佔用級別和低佔用級別;步驟203,為所述高佔用級別的應用集群申請資源;步驟204,若為所述高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;步驟205,將所述釋放的資源分配給所述高佔用級別的應用集群。 Referring to FIG. 3, a flowchart of steps in Embodiment 2 of a method for allocating resources of an application cluster in a cloud environment according to the present invention is shown. Specifically, the method may include the following steps: Step 201: Obtain each application cluster in a designated transaction link in the cloud environment. Step 202, determining a resource load level of each application cluster according to the resource usage rate; the resource load level includes a high occupation level and a low occupation level; step 203, the application cluster of the high occupation level Apply for resources; step 204, if the application resource for the high-occupancy level application cluster fails, release the resources of the low-occupancy level application cluster according to the resource load level; step 205, allocate the released resources to the high-occupancy level Occupancy level application cluster.

在本發明的一種較佳實施例中,所述步驟201可以包括:當訪問流量提升時,獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率。 In a preferred embodiment of the present invention, the step 201 may include: when the access traffic is increased, obtaining a resource usage rate of each application cluster in a designated transaction link in a cloud environment.

在本發明的一種較佳實施例中,所述雲端環境下包括資源池,所述步驟203可以包括:向所述資源池申請資源;當所述資源池的資源充足時,則為所述高佔用級別的應用集群分配所述資源池中資源;當所述資源池的資源枯竭時,則為所述高佔用級別的應用集群申請資源失敗。 In a preferred embodiment of the present invention, the cloud environment includes a resource pool, and the step 203 may include: applying for resources from the resource pool; when the resources of the resource pool are sufficient, the resource pool is high. The application cluster of the occupied level allocates resources in the resource pool; when the resources of the resource pool are exhausted, the application of resources for the application cluster of the high occupied level fails.

在本發明的一種較佳實施例中,所述應用集群具有對應的優先順序,所述為高佔用級別的應用集群分配所述資源池中資源的步驟包括:當所述高佔用級別的應用集群為兩個或者兩個以上時,按照所述優先順序為高佔用級別的應用集群分配所述資源池中資源。 In a preferred embodiment of the present invention, the application cluster has a corresponding priority order, and the step of allocating resources in the resource pool to an application cluster with a high occupation level includes: when the application cluster with a high occupation level When there are two or more, the resources in the resource pool are allocated to the application cluster with a high occupation level according to the priority order.

在本發明的一種較佳實施例中,所述資源負載級別具有對應的釋放比例,所述步驟204可以包括:確定低佔用級別的應用集群的資源負載級別對應的釋放比例;按照所述釋放比例來釋放所述低佔用級別的應用集群的資源;將所述釋放的資源保存至資源池中。 In a preferred embodiment of the present invention, the resource load level has a corresponding release ratio, and the step 204 may include: determining a release ratio corresponding to a resource load level of a low-occupancy application cluster; and according to the release ratio To release the resources of the low-occupancy application cluster; save the released resources to a resource pool.

在本發明的一種較佳實施例中,所述按照釋放比例來釋放所述低佔用級別的應用集群的資源的步驟包括:獲取所述低佔用級別的應用集群的目前資源;獲取所述低佔用級別的應用集群的目前訪問流量;採用所述目前訪問流量和預設單機極限值來計算需求資源;採用所述目前資源和所述需求資源來確定所述低佔用級別的應用集群的空閒資源;按照所述釋放比例來釋放所述空閒資源。 In a preferred embodiment of the present invention, the step of releasing the resources of the low-occupancy-level application cluster according to the release ratio includes: obtaining the current resources of the low-occupancy-level application cluster; and acquiring the low-occupancy Current access traffic of an application cluster at a level; using the current access traffic and a preset stand-alone limit value to calculate a demand resource; using the current resource and the demand resource to determine idle resources of the low-occupancy application cluster; Release the idle resources according to the release ratio.

在本發明的一種較佳實施例中,所述步驟205包括:向所述保存有釋放的資源的資源池申請資源; 為所述高佔用級別的應用集群分配所述資源池中釋放的資源。 In a preferred embodiment of the present invention, the step 205 includes: applying for resources from the resource pool in which the released resources are stored; and allocating the resources released in the resource pool to the high-occupancy application cluster.

在具體實現中,雲端環境下可以劃分有多條交易鏈路,以有針對性地處理各種的事務,在雲端環境下可以應用本發明實施例以對於應用集群的資源進行統籌規劃。 In specific implementation, multiple transaction links can be divided in the cloud environment to target various transactions in a targeted manner. In the cloud environment, embodiments of the present invention can be applied to make overall planning for the resources of the application cluster.

本發明實施例,對於在雲端環境下應用集群,根據各個應用集群資源使用率而知曉該應用集群的資源負載狀態,從而可以確定其所處的資源負載級別。如果存在有高佔用級別的應用集群,則為該應用集群申請資源,如果此時申請資源失敗,則請求低佔用級別的應用集群釋放資源,最後將釋放的資源分配給高佔用級別的應用集群。需要說明的是,本發明實施例是按照應用集群的資源滿載級別來釋放資源,故而如果反復執行上述步驟,那麼最終將拉平整個雲端環境下應用集群的資源負載,能夠充分利用現有資源,提高應用集群的資源使用效率,使得應用集群可以支撐更高的訪問流量。 In the embodiment of the present invention, for an application 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 it is located can be determined. If there is a high-occupancy application cluster, apply for resources for the application cluster. If the resource application fails at this time, request the low-occupancy application cluster to release resources, and finally allocate the released resources to the high-occupancy application cluster. It should be noted that the embodiment of the present invention releases resources 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 will be flattened, and the existing resources can be fully utilized to improve the application The resource utilization efficiency of the cluster enables the application cluster to support higher access traffic.

為使本領域技術人員更好地理解本發明實施例,以下透過具體的示例來說明本發明實施例中交易鏈路的壓測過程,如圖2所示。 To enable those skilled in the art to better understand the embodiments of the present invention, the following describes the stress measurement process of the transaction link in the embodiments of the present invention through specific examples, as shown in FIG. 2.

1,梳理整個交易鏈路的應用集群,並接入平臺;在該平臺下接入有應用A集群,應用B集群,應用C集群,這些應用集群組成一個交易鏈路。 1. Sort out the application clusters of the entire transaction link and access the platform; under this platform, there are application A cluster, application B cluster, and application C cluster. These application clusters form a transaction link.

2,對交易鏈路進行壓測,以探測該交易鏈路下應用集群的性能瓶頸。為各個應用集群按照資源負載狀態劃分 資源負載級別,其中,出現性能瓶頸的應用集群將劃分為資源滿載級別。 2. Stress test the transaction link to detect the performance bottleneck of the application cluster under the transaction link. For each application cluster, the resource load level is divided according to the resource load status. Among them, the application cluster with performance bottlenecks will be divided into the resource full level.

3,當某應用集群出現性能瓶頸時,如應用A集群,則向資源池申請資源;如果從資源池申請資源成功,則繼續向上摸高壓力,亦即,提升該交易鏈路下應用集群資源用戶的訪問量。 3. When a performance bottleneck occurs in an application cluster, such as applying cluster A, apply for resources from the resource pool; if the application for resources from the resource pool is successful, continue to exert upward pressure, that is, increase the application cluster resources under the transaction link User traffic.

申請機器(資源)時有一個原則:如果多個應用集群同時出現性能瓶頸,則按照每個應用集群的優先順序高低來分配資源,首先為優先順序高的應用集群申請資源,其次為低優先順序的應用集群申請資源,以達到宿主機資源的充分利用;如果不按這個原則,則有可能會導致低優先順序的應用集群分配了資源後,資源池的資源耗盡,最後無法再為高優先順序的應用集群分配資源。 There is a principle when applying for machines (resources): If multiple application clusters have performance bottlenecks at the same time, resources are allocated according to the priority of each application cluster. First, apply for resources for high priority application clusters, followed by low priority. Application clusters apply for resources in order to achieve the full utilization of host resources; if this principle is not followed, it may lead to low-priority application clusters after allocating resources, resource pool resources are exhausted, and finally high priority cannot be reached Sequential application clusters allocate resources.

4,隨著對交易鏈路的應用集群不斷摸高壓力,並在抬高壓力的時候並即時申請資源,以支撐應用集群目前的訪問流量。直到某應用集群出現性能瓶頸,並且申請資源失敗(資源池已枯竭)為止。平臺則自動遍歷其他鏈路上的應用集群的資源負載狀態,每個應用集群根據自身的資源負載狀態不同,梯度釋放資源以拉平資源負載水位。 4. As the application cluster of the transaction link keeps on increasing pressure, and when the pressure is increased, it will immediately apply for resources to support the current access traffic of the application cluster. Until a performance bottleneck occurs in an application cluster, and resource application 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 in a gradient to level the resource load water level according to its own resource load status.

5,拉平水位後,資源釋放並保存到資源池,出現性能瓶頸的應用集群A不斷從資源池申請資源,直到拿到自己的資源需求,則停止其他低負載應用集群釋放空閒資源的任務。此時,繼續摸高壓力,即提升用戶的訪問流量,從第1步再次迭代。 5. After leveling the water level, resources are released and saved to the resource pool. Application cluster A with performance bottlenecks continuously requests resources from the resource pool until it gets its own resource requirements, and then stops other low-load application clusters from releasing idle resources. At this point, continue to feel high pressure, that is, increase the user's access traffic, and iterate again from step 1.

6,透過以上5個步驟迭代,最終以達到充分利用交易鏈路的應用集群的現有資源,使得該交易鏈路能夠支撐更大用戶的訪問流量。 6. Iterate through the above 5 steps to finally make full use of the existing resources of the application cluster of the transaction link, so that the transaction link can support the access traffic of larger users.

需要說明的是,對於方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本領域技術人員應該知悉,本發明實施例並不受所描述的動作順序的限制,因為依據本發明實施例,某些步驟可以採用其他順序或者同時進行。其次,本領域技術人員也應該知悉,說明書中所描述的實施例均屬於較佳實施例,所涉及的動作並不一定是本發明實施例所必須的。 It should be noted that, for the method embodiments, for the sake of simple description, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence because According to the embodiment of the present invention, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

參照圖4,示出了本發明的一種雲端環境下應用集群資源分配的裝置實施例的結構方塊圖,具體上可以包括如下模組:資源負載狀態獲取模組301,用以獲取雲端環境下各個應用集群的資源負載狀態;在本發明的一個實施例中,所述資源負載狀態獲取模組301可以包括如下子模組:資源負載狀態獲取子模組,用以在訪問流量提升時,獲取雲端環境下各個應用集群的資源負載狀態。 Referring to FIG. 4, there is shown a structural block diagram of an embodiment of an apparatus for allocating cluster resources in a cloud environment according to the present invention. Specifically, the device may include the following modules: a resource load status acquisition module 301, which is used to acquire various resources in the cloud environment. The resource load status of the application cluster. In one embodiment of the present invention, the resource load status acquisition module 301 may include the following sub-modules: the resource load status acquisition sub-module is used to acquire the cloud when the access traffic is increased. Resource load status of each application cluster in the environment.

資源負載級別確定模組302,用以依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;資源申請模組303,用以為所述資源滿載級別的應用集群申請資源; 在本發明的一個實施例中,所述雲端環境下可以包括資源池,所述資源申請模組303可以包括如下子模組:第一資源池資源申請子模組,用以向所述資源池申請資源;第一資源處理子模組,用以在所述資源池的資源充足時,則為所述資源滿載級別的應用集群分配所述資源池中資源;第二資源處理子模組,用以在所述資源池的資源枯竭時,則為所述資源滿載級別的應用集群申請資源失敗。 A resource load level determination 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 level and other levels; a resource application module 303 is configured for the An application cluster at a resource full level applies for resources. In an embodiment of the present invention, the cloud environment may include a resource pool, and the resource application module 303 may include the following submodules: a first resource pool resource application submodule A group for applying for resources from the resource pool; a first resource processing submodule for allocating resources in the resource pool to an application cluster at the resource full level when the resources of the resource pool are sufficient; The second resource processing sub-module is configured to fail to apply for resources for the application cluster at the resource full level when the resources of the resource pool are exhausted.

在本發明的一個實施例中,所述應用集群可以具有對應的優先順序,所述第一資源處理子模組包括:優先順序處理單元,用以在所述資源滿載級別的應用集群為兩個或者兩個以上時,按照所述優先順序為資源滿載級別的應用集群分配所述資源池中資源。 In an embodiment of the present invention, the application cluster may have a corresponding priority order, and the first resource processing sub-module includes: a priority order processing unit configured to have two application clusters at the resource full load level. Or when there are more than two, resources in the resource pool are allocated to the application clusters at the resource full level according to the priority order.

資源釋放模組304,用以在為所述資源滿載級別的應用集群申請資源失敗時,按照資源負載級別來釋放其他級別的應用集群的資源;在本發明的一個實施例中,所述資源負載級別可以具有對應的釋放比例,所述資源釋放模組304可以包括如下子模組:釋放比例確定子模組,用以確定其他級別的應用集群的資源負載級別對應的釋放比例;資源比例釋放子模組,用以按照所述釋放比例來釋放所述其他級別的應用集群的資源; 釋放資源保存子模組,用以將所述釋放的資源保存至資源池中。 The resource release module 304 is configured to release resources of application clusters of other levels according to the resource load level when the application resource fails for the application clusters of the resource full load level. In one embodiment of the present invention, the resource load Levels may have corresponding release ratios, and the resource release module 304 may include the following sub-modules: release ratio determination sub-modules to determine release ratios corresponding to resource load levels of application clusters at other levels; A module configured to release the resources of the application cluster at another level according to the release ratio; and a release resource saving submodule configured to save the released resources into a resource pool.

在本發明的一個實施例中,所述資源比例釋放子模組可以包括如下單元:目前資源獲取單元,用以獲取所述其他級別的應用集群的目前資源;目前訪問流量單元,用以獲取所述其他級別的應用集群的目前訪問流量;需求資源計算單元,用以採用所述目前訪問流量和預設單機極限值來計算需求資源;空閒資源確定單元,用以採用所述目前資源和所述需求資源來確定所述其他級別的應用集群的空閒資源;空閒資源釋放單元,用以按照所述釋放比例來釋放所述空閒資源。 In one embodiment of the present invention, the resource proportion release sub-module may include the following units: a current resource acquisition unit to acquire the current resources of the other-level application clusters; a current access traffic unit to acquire all resources The current access flow of other levels of application clusters is described; a demand resource calculation unit is configured to calculate the demand resource using the current access flow and a preset single machine limit value; an idle resource determination unit is configured to use the current resource and the Resources are required to determine the idle resources of the application clusters at other levels; an idle resource release unit is configured to release the idle resources according to the release ratio.

釋放資源分配模組305,用以將所述釋放的資源分配給所述資源滿載級別的應用集群。 A resource allocation module 305 is configured to allocate the released resources to an application cluster at a resource full level.

在本發明的一個實施例中,所述釋放資源分配模組205可以包括如下子模組:第二資源池資源申請子模組,用以向所述保存有釋放的資源的資源池申請資源;第三資源處理子模組,用以為所述資源滿載級別的應用集群分配所述資源池中釋放的資源。 In an embodiment of the present invention, the released resource allocation module 205 may include the following submodules: a second resource pool resource application submodule, which is used to apply for resources from the resource pool in which the released resources are stored; The third resource processing submodule is configured to allocate resources released from the resource pool to an application cluster at the resource full level.

對於裝置實施例而言,由於其與方法實施例基本相似,所以描述的比較簡單,相關之處參見方法實施例的部 分說明即可。 As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant part, refer to the description of the method embodiment.

本發明實施例還提供了一種雲端環境下應用集群資源分配的系統,所述系統包括:一個或多個處理器;記憶體;和一個或多個模組,所述一個或多個模組係儲存於所述記憶體中並被配置成由所述一個或多個處理器所執行,所述一個或多個模組具有如下功能:獲取雲端環境下各個應用集群的資源負載狀態;依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;為所述資源滿載級別的應用集群申請資源;若為所述資源滿載級別的應用集群申請資源失敗,則按照資源負載級別來釋放其他級別的應用集群的資源;將所述釋放的資源分配給所述資源滿載級別的應用集群。 An embodiment of the present invention also provides a system for allocating cluster resources in a cloud environment. The system includes: one or more processors; a memory; and one or more modules. The one or more modules are Stored in the memory and configured to be executed by the one or more processors, the one or more modules have the following functions: obtaining the resource load status of each application cluster in the cloud environment; according to the Resource load status to determine the resource load level of the application cluster; the resource load level includes the resource full level and other levels; apply for resources for the application cluster at the resource full level; if applying for the application cluster at the resource full level If the resource fails, the resources of the application clusters at other levels are released according to the resource load level; the released resources are allocated to the application clusters at the resource full level.

可選地,該一個或多個模組可以具有如下功能:當訪問流量提升時,獲取雲端環境下各個應用集群的資源負載狀態。 Optionally, the one or more modules may have the following function: when the access traffic is increased, obtain the resource load status of each application cluster in the cloud environment.

可選地,所述雲端環境下包括資源池,該一個或多個模組可以具有如下功能:向所述資源池申請資源;當所述資源池的資源充足時,則為所述資源滿載級別 的應用集群分配所述資源池中資源;當所述資源池的資源枯竭時,則為所述資源滿載級別的應用集群申請資源失敗。 Optionally, the cloud environment includes a resource pool, and the one or more modules may have the following functions: apply for resources from the resource pool; when the resources of the resource pool are sufficient, the resource full level The application cluster allocates resources in the resource pool; when the resources in the resource pool are exhausted, applying for resources for the application cluster at the resource full level fails.

可選地,所述應用集群具有對應的優先順序,該一個或多個模組可以具有如下功能:當所述資源滿載級別的應用集群為兩個或者兩個以上時,按照所述優先順序為資源滿載級別的應用集群分配所述資源池中資源。 Optionally, the application cluster has a corresponding priority order, and the one or more modules may have the following function: When the application cluster at the resource full load level is two or more, according to the priority order, An application cluster at a resource full level allocates resources in the resource pool.

可選地,所述資源負載級別具有對應的釋放比例,該一個或多個模組可以具有如下功能:確定其他級別的應用集群的資源負載級別對應的釋放比例;按照所述釋放比例來釋放所述其他級別的應用集群的資源;將所述釋放的資源保存至資源池中。 Optionally, the resource load level has a corresponding release ratio, and the one or more modules may have the following functions: determining the release ratios corresponding to the resource load levels of other levels of application clusters; and releasing all the resources according to the release ratio. The resources of the application clusters at other levels are described; the released resources are saved in a resource pool.

可選地,該一個或多個模組可以具有如下功能:獲取所述其他級別的應用集群的目前資源;獲取所述其他級別的應用集群的目前訪問流量;採用所述目前訪問流量和預設單機極限值來計算需求資源;採用所述目前資源和所述需求資源來確定所述其他級別的應用集群的空閒資源;按照所述釋放比例來釋放所述空閒資源。 Optionally, the one or more modules may have the following functions: acquiring current resources of the application clusters at other levels; acquiring current access traffic of the application clusters at other levels; using the current access traffic and presets The single machine limit value is used to calculate the required resources; the current resources and the required resources are used to determine the idle resources of the other-level application clusters; and the idle resources are released according to the release ratio.

可選地,該一個或多個模組可以具有如下功能: 向所述保存有釋放的資源的資源池申請資源;為所述資源滿載級別的應用集群分配所述資源池中釋放的資源。 Optionally, the one or more modules may have the following functions: apply for resources from the resource pool where the released resources are stored; and allocate resources released from the resource pool to the application cluster at the resource full level.

本發明實施例還提供了一種雲端環境下應用集群資源分配的裝置,所述裝置可以包括如下模組:資源使用率獲取模組,用以獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;資源負載級別確定模組,用以依據所述資源使用率來確定各個應用集群的資源負載級別;所述資源負載級別包括高佔用級別和低佔用級別;資源申請獲取模組,用以為所述高佔用級別的應用集群申請資源;資源釋放模組,用以若為所述高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;資源分配模組,用以將所述釋放的資源分配給所述高佔用級別的應用集群。 An embodiment of the present invention further provides an apparatus for allocating application cluster resources in a cloud environment. The apparatus may include the following modules: a resource utilization rate acquisition module for acquiring resources of each application cluster in a designated transaction link in the cloud environment Utilization rate; a resource load level determining module for determining a resource load level of each application cluster according to the resource utilization rate; the resource load level includes a high occupation level and a low occupation level; a resource application acquisition module is used for The high-occupancy-level application cluster applies for resources; a resource release module is used to release the resources of the low-occupancy-level application cluster according to the resource load level if resource application fails for the high-occupancy-level application cluster; resource allocation A module for allocating the released resources to the high-occupancy application cluster.

圖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 according to an embodiment of the present invention. The server 400 may have a relatively large difference due to different configurations or performance, and may include one or more central processing units (CPU) 422 (for example, one or more processors) and a memory 432. , One or more storage media 430 (eg, one or more mass storage devices) that store applications 442 or data 444. Among them, the memory 432 and the storage medium 430 may be temporarily stored or persistently stored. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of command operations on the server. Furthermore, the central processing unit 422 may be configured to communicate with the storage medium 430 and execute a series of instruction operations in the storage medium 430 on the server 400.

伺服器400還可以包括一個或一個以上的電源426,一個或一個以上的有線或無線網路介面450,一個或一個以上的輸入輸出介面458,一個或一個以上的鍵盤456,和/或,一個或一個以上的作業系統441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。 The server 400 may also include one or more power sources 426, one or more wired or wireless network interfaces 450, one or more input / output interfaces 458, one or more keyboards 456, and / or, an Or more than one operating system 441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

中央處理器422可以在伺服器400上執行以下操作的指令:獲取雲端環境下各個應用集群的資源負載狀態;依據所述資源負載狀態來確定所述應用集群的資源負載級別;所述資源負載級別包括資源滿載級別和其他級別;為所述資源滿載級別的應用集群申請資源;若為所述資源滿載級別的應用集群申請資源失敗,則按照資源負載級別來釋放其他級別的應用集群的資源;將所述釋放的資源分配給所述資源滿載級別的應用集群。 The central processor 422 may execute the following instructions on the server 400: obtaining the resource load status of each application cluster in the cloud environment; determining the resource load level of the application cluster according to the resource load status; the resource load level Including the resource full level and other levels; apply for resources for the application cluster at the resource full level; if the application fails for the application cluster at the resource full level, release the resources of other levels of the application cluster according to the resource load level; The released resources are allocated to an application cluster at the resource full level.

可選地,該一個或多個模組可以具有如下功能:當訪問流量提升時,獲取雲端環境下各個應用集群的 資源負載狀態。 Optionally, the one or more modules may have the following function: when the access traffic is increased, obtain the resource load status of each application cluster in the cloud environment.

可選地,所述雲端環境下包括資源池,該一個或多個模組可以具有如下功能:向所述資源池申請資源;當所述資源池的資源充足時,則為所述資源滿載級別的應用集群分配所述資源池中資源;當所述資源池的資源枯竭時,則為所述資源滿載級別的應用集群申請資源失敗。 Optionally, the cloud environment includes a resource pool, and the one or more modules may have the following functions: apply for resources from the resource pool; when the resources of the resource pool are sufficient, the resource full level The application cluster allocates resources in the resource pool; when the resources in the resource pool are exhausted, applying for resources for the application cluster at the resource full level fails.

可選地,所述應用集群具有對應的優先順序,該一個或多個模組可以具有如下功能:當所述資源滿載級別的應用集群為兩個或者兩個以上時,按照所述優先順序為資源滿載級別的應用集群分配所述資源池中資源。 Optionally, the application cluster has a corresponding priority order, and the one or more modules may have the following function: When the application cluster at the resource full load level is two or more, according to the priority order, An application cluster at a resource full level allocates resources in the resource pool.

可選地,所述資源負載級別具有對應的釋放比例,該一個或多個模組可以具有如下功能:確定其他級別的應用集群的資源負載級別對應的釋放比例;按照所述釋放比例來釋放所述其他級別的應用集群的資源;將所述釋放的資源保存至資源池中。 Optionally, the resource load level has a corresponding release ratio, and the one or more modules may have the following functions: determining the release ratios corresponding to the resource load levels of other levels of application clusters; and releasing all the resources according to the release ratio. The resources of the application clusters at other levels are described; the released resources are saved in a resource pool.

可選地,該一個或多個模組可以具有如下功能:獲取所述其他級別的應用集群的目前資源;獲取所述其他級別的應用集群的目前訪問流量;採用所述目前訪問流量和預設單機極限值來計算需求 資源;採用所述目前資源和所述需求資源來確定所述其他級別的應用集群的空閒資源;按照所述釋放比例來釋放所述空閒資源。 Optionally, the one or more modules may have the following functions: acquiring current resources of the application clusters at other levels; acquiring current access traffic of the application clusters at other levels; using the current access traffic and presets The single machine limit value is used to calculate the required resources; the current resources and the required resources are used to determine the idle resources of the other-level application clusters; and the idle resources are released according to the release ratio.

可選地,該一個或多個模組可以具有如下功能:向所述保存有釋放的資源的資源池申請資源;為所述資源滿載級別的應用集群分配所述資源池中釋放的資源。 Optionally, the one or more modules may have the following functions: apply for resources from the resource pool where the released resources are stored; and allocate resources released from the resource pool to an application cluster at the resource full level.

本說明書中的各個實施例均採用漸進的方式來描述,每個實施例重點說明的都是與其他實施例的不同之處,各個實施例之間相同相似的部分互相參見即可。 Each embodiment in this specification is described in a gradual manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may refer to each other.

本領域內的技術人員應明白,本發明實施例的實施例可提供為方法、裝置、或電腦程式產品。因此,本發明實施例可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體態樣的實施例的形式。而且,本發明實施例可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may use a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable code. form.

在一個典型的配置中,所述電腦設備包括一個或多個處理器(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. Memory may include non-permanent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory ( flash RAM). Memory is an example of a computer-readable medium. Computer-readable media include permanent and non-permanent, removable and non-removable media. Information can be stored by any method or technology. 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), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape cartridges, magnetic tape storage, or other magnetic storage devices or any other non-transmitting media, can be used to store information that can be accessed by computing devices. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

本發明實施例是參照根據本發明實施例的方法、終端設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一個流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可編程資料處理終端設備的處理器以產生一個機器,使得透過電腦或其他可編程資料處理終端設備的處理器執行的指令產生用來實現在流程圖中的一個流程或多個流程和/或方塊圖中的一個方塊或多個方塊中指定的功能的裝置。 The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the method, the terminal device (system), and the computer program product according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and a combination of the flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to generate a machine for instructions executed by the processor of the computer or other programmable data processing terminal device Means are generated to implement the functions specified in one or more of the flowcharts and / or one or more of the blocks in the block diagrams.

這些電腦程式指令也可被儲存在能引導電腦或其他可 編程資料處理終端設備以特定方式操作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖中的一個流程或多個流程和/或方塊圖中的一個方塊或多個方塊中指定的功能。 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to operate in a specific manner, such that the generation of instructions stored in the computer-readable memory includes the manufacture of a command device The instruction device implements a function specified in one or more processes in the flowchart and / or in one or more blocks in the block diagram.

這些電腦程式指令也可被裝載到電腦或其他可編程資料處理終端設備上,使得在電腦或其他可編程終端設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可編程終端設備上執行的指令提供用來實現在流程圖中的一個流程或多個流程和/或方塊圖中的一個方塊或多個方塊中指定的功能的步驟。 These computer program instructions can also be loaded on a computer or other programmable data processing terminal device, so that a series of operation steps can be performed on the computer or other programmable terminal device to generate a computer-implemented process, so that the computer or other programmable terminal The instructions executed on the device provide steps for implementing a function specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.

儘管已描述了本發明實施例的較佳實施例,但本領域內的技術人員一旦得知了基本創造性概念,則可對這些實施例做出另外的變更和修改。所以,所附申請專利範圍意欲解釋為包括較佳實施例以及落入本發明實施例範圍的所有變更和修改。 Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make other changes and modifications to these embodiments once they know the basic inventive concepts. Therefore, the scope of the appended patent applications is intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the invention.

最後,還需要說明的是,在本文中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個實體或操作區分開來,而不一定要求或者暗示這些實體或操作之間存在有任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者終端設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者 終端設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括所述要素的過程、方法、物品或者終端設備中還存在另外的相同要素。 Finally, it should be noted that in this article, relational terms such as first and second are used only 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 OR operations. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or end device that includes a series of elements includes not only those elements but also those that are not explicitly listed Other elements, or elements inherent to such a process, method, article, or terminal. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude that there are other identical elements in the process, method, article, or terminal device including the elements.

以上對本發明所提供的一種雲端環境下應用集群資源分配的方法,一種雲端環境下應用集群資源分配的裝置,以及一種雲端環境下應用集群資源分配的系統,進行了詳細介紹,本文中應用了具體個例對本發明的原理及實施方式進行了闡述,以上實施例的說明只是用來幫助理解本發明的方法及其核心思想;同時,對於本領域的一般技術人員,依據本發明的思想,在具體實施方式及應用範圍上均會有改變之處,綜上所述,本說明書內容不應理解為對本發明的限制。 The method for allocating cluster resources in a cloud environment, a device for allocating cluster resources in a cloud environment, and a system for allocating cluster resources in a cloud environment provided by the present invention have been described in detail above. The example explains the principle and implementation of the present invention. The descriptions of the above embodiments are only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, There may be changes in the embodiment and the scope of application. In summary, the content of this description should not be construed as a limitation on the present invention.

Claims (17)

一種雲端環境下應用集群資源分配的系統,其特徵在於,該系統包括:一個或多個處理器;記憶體;和一個或多個模組,該一個或多個模組係儲存於該記憶體中並被配置成由該一個或多個處理器所執行,該一個或多個模組具有如下功能:獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;依據該資源使用率來確定各個應用集群的資源負載級別;該資源負載級別包括高佔用級別和低佔用級別;為該高佔用級別的應用集群申請資源;若為該高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;以及將該釋放的資源分配給該高佔用級別的應用集群。     A system for allocating application cluster resources in a cloud environment is characterized in that the system includes: one or more processors; a memory; and one or more modules, the one or more modules are stored in the memory And is configured to be executed by the one or more processors, and the one or more modules have the following functions: obtaining the resource utilization rate of each application cluster in a specified transaction link in the cloud environment; Determine the resource load level of each application cluster; the resource load level includes high and low occupancy levels; apply for resources for the high occupancy level application cluster; if the resource application fails for the high occupancy level application cluster, the resource load is determined according to the resource load Level to release the resources of the low-occupancy application cluster; and allocate the released resources to the high-occupancy application cluster.     一種雲端環境下應用集群資源分配的方法,其特徵在於,該方法包括:獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;依據該資源使用率來確定各個應用集群的資源負載級別;該資源負載級別包括高佔用級別和低佔用級別; 為該高佔用級別的應用集群申請資源;若為該高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;以及將該釋放的資源分配給該高佔用級別的應用集群。     A method for allocating resources of an application cluster in a cloud environment, characterized in that the method includes: obtaining resource utilization rates of each application cluster in a designated transaction link in the cloud environment; and determining resource load levels of each application cluster according to the resource utilization rates The resource load level includes a high-occupancy level and a low-occupancy level; apply for resources for the high-occupancy application cluster; if the resource application fails for the high-occupancy application cluster, release the low-occupancy application according to the resource load level The resources of the cluster; and allocating the released resources to the high-occupancy application cluster.     根據申請專利範圍第2項所述的方法,其中,該獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率的步驟包括:當訪問流量提升時,獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率。     The method according to item 2 of the scope of patent application, wherein the step of obtaining the resource utilization rate of each application cluster in the designated transaction link in the cloud environment includes: when the access traffic is increased, obtaining the designated transaction link in the cloud environment The resource utilization rate of each application cluster.     根據申請專利範圍第2項所述的方法,其中,該雲端環境下包括資源池,該為高佔用級別的應用集群申請資源的步驟包括:向該資源池申請資源;當該資源池的資源充足時,則為該高佔用級別的應用集群分配該資源池中資源;以及當該資源池的資源枯竭時,則為該高佔用級別的應用集群申請資源失敗。     The method according to item 2 of the scope of patent application, wherein the cloud environment includes a resource pool, and the step of applying for resources for a high-occupancy application cluster includes: applying for resources from the resource pool; when the resources of the resource pool are sufficient When the high-occupancy-level application cluster is allocated resources in the resource pool; and when the resources of the resource pool are exhausted, applying for resources for the high-occupancy-level application cluster fails.     根據申請專利範圍第4項所述的方法,其中,該應用集群具有對應的優先順序,該為高佔用級別的應用集群分配該資源池中資源的步驟包括:當該高佔用級別的應用集群為兩個或者兩個以上時, 按照該優先順序為高佔用級別的應用集群分配該資源池中資源。     The method according to item 4 of the scope of patent application, wherein the application cluster has a corresponding priority order, and the step of allocating resources in the resource pool to the application cluster with a high occupation level includes: when the application cluster with a high occupation level is When there are two or more, the resources in the resource pool are allocated to the application cluster with a high occupation level according to the priority order.     根據申請專利範圍第2或4項所述的方法,其中,該資源負載級別具有對應的釋放比例,該按照資源負載級別來釋放低佔用級別的應用集群的資源的步驟包括:確定低佔用級別的應用集群的資源負載級別對應的釋放比例;按照該釋放比例來釋放該低佔用級別的應用集群的資源;以及將該釋放的資源保存至資源池中。     The method according to item 2 or 4 of the scope of the patent application, wherein the resource load level has a corresponding release ratio, and the step of releasing the resources of the low-occupancy application cluster according to the resource load level includes determining a low-occupancy level. The release ratio corresponding to the resource load level of the application cluster; release the resources of the low-occupancy application cluster according to the release ratio; and save the released resources to the resource pool.     根據申請專利範圍第6項所述的方法,其中,該按照釋放比例來釋放該低佔用級別的應用集群的資源的步驟包括:獲取該低佔用級別的應用集群的目前資源;獲取該低佔用級別的應用集群的目前訪問流量;採用該目前訪問流量和預設單機極限值來計算需求資源;採用該目前資源和該需求資源來確定該低佔用級別的應用集群的空閒資源;以及按照該釋放比例來釋放該空閒資源。     The method according to item 6 of the scope of patent application, wherein the step of releasing resources of the low-occupancy-level application cluster according to the release ratio includes: obtaining current resources of the low-occupancy-level application cluster; obtaining the low-occupancy level The current access traffic of the application clusters; use the current access traffic and preset stand-alone limit values to calculate demand resources; use the current resources and the demand resources to determine the idle resources of the low-occupancy application cluster; and according to the release ratio To release the free resources.     根據申請專利範圍第2或4項所述的方法,其中,該將 釋放的資源分配給該高佔用級別的應用集群的步驟包括:向該保存有釋放的資源的資源池申請資源;以及為該高佔用級別的應用集群分配該資源池中釋放的資源。     The method according to item 2 or 4 of the scope of patent application, wherein the step of allocating the released resources to the high-occupancy application cluster includes: applying for resources from the resource pool in which the released resources are stored; and A high-occupancy application cluster allocates resources released from the resource pool.     一種雲端環境下應用集群資源分配的裝置,其特徵在於,該裝置包括:資源使用率獲取模組,用以獲取雲端環境下指定交易鏈路中各個應用集群的資源使用率;資源負載級別確定模組,用以依據該資源使用率來確定各個應用集群的資源負載級別;該資源負載級別包括高佔用級別和低佔用級別;資源申請獲取模組,用以為該高佔用級別的應用集群申請資源;資源釋放模組,用以若為該高佔用級別的應用集群申請資源失敗,則按照資源負載級別來釋放低佔用級別的應用集群的資源;以及資源分配模組,用以將該釋放的資源分配給該高佔用級別的應用集群。     A device for allocating resources of an application cluster in a cloud environment, characterized in that the device includes: a resource utilization rate acquisition module for acquiring the resource utilization rate of each application cluster in a designated transaction link in the cloud environment; a resource load level determination module A group for 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 a low-occupancy level; a resource application acquisition module for applying for resources for the high-occupancy application cluster; A resource release module for releasing the resources of the low-occupancy application cluster according to the resource load level if the resource application fails for the high-occupancy application cluster; and a resource allocation module for allocating the released resources Give this high-occupancy application cluster.     一種雲端環境下應用集群資源分配的方法,其特徵在於,該方法包括:獲取雲端環境下各個應用集群的資源負載狀態;依據該資源負載狀態來確定該應用集群的資源負載級 別;該資源負載級別包括資源滿載級別和其他級別;為該資源滿載級別的應用集群申請資源;若為該資源滿載級別的應用集群申請資源失敗,則按照資源負載級別來釋放其他級別的應用集群的資源;以及將該釋放的資源分配給該資源滿載級別的應用集群。     A method for allocating resources of an application cluster in a cloud environment, characterized in that the method includes: obtaining a resource load status of each application cluster in the cloud environment; determining a resource load level of the application cluster according to the resource load status; and the resource load level Including resource full level and other levels; apply for resources for the resource full level application cluster; if applying for resources for the resource full level application cluster fails, release the resources of other levels of application clusters according to the resource load level; and The released resources are allocated to the application cluster at the resource full level.     根據申請專利範圍第10項所述的方法,其中,該獲取雲端環境下各個應用集群的資源負載狀態的步驟包括:當訪問流量提升時,獲取雲端環境下各個應用集群的資源負載狀態。     The method according to item 10 of the scope of patent application, wherein the step of obtaining the resource load status of each application cluster in the cloud environment includes: when the access traffic is increased, obtaining the resource load status of each application cluster in the cloud environment.     根據申請專利範圍第10項所述的方法,其中,該雲端環境下包括資源池,該為資源滿載級別的應用集群申請資源的步驟包括:向該資源池申請資源;當該資源池的資源充足時,則為該資源滿載級別的應用集群分配該資源池中資源;以及當該資源池的資源枯竭時,則為該資源滿載級別的應用集群申請資源失敗。     The method according to item 10 of the scope of patent application, wherein the cloud environment includes a resource pool, and the step of applying for a resource full-level application cluster includes: applying for resources from the resource pool; when the resources of the resource pool are sufficient When the resource full-level application cluster is allocated resources in the resource pool; and when the resources of the resource pool are exhausted, the application for the resource full-level application cluster fails to apply for resources.     根據申請專利範圍第12項所述的方法,其中,該應用集群具有對應的優先順序,該為資源滿載級別的應用集群分配該資源池中資源的步驟包括:當該資源滿載級別的應用集群為兩個或者兩個以上 時,按照該優先順序為資源滿載級別的應用集群分配該資源池中資源。     The method according to item 12 of the scope of patent application, wherein the application cluster has a corresponding priority order, and the step of allocating resources in the resource pool to the application cluster at the resource full level includes: when the application cluster at the resource full level is When there are two or more, the resources in the resource pool are allocated to the application cluster at the resource full level according to the priority order.     根據申請專利範圍第10或12項所述的方法,其中,該資源負載級別具有對應的釋放比例,該按照資源負載級別來釋放其他級別的應用集群的資源的步驟包括:確定其他級別的應用集群的資源負載級別對應的釋放比例;按照該釋放比例來釋放該其他級別的應用集群的資源;以及將該釋放的資源保存至資源池中。     The method according to item 10 or 12 of the scope of patent application, wherein the resource load level has a corresponding release ratio, and the step of releasing resources of application clusters of other levels according to the resource load level includes determining application clusters of other levels The release ratio corresponding to the resource load level of; the resources of the application clusters of other levels are released according to the release ratio; and the released resources are saved to the resource pool.     根據申請專利範圍第14項所述的方法,其中,該按照釋放比例來釋放該其他應用集群的資源的步驟包括:獲取該其他級別的應用集群的目前資源;獲取該其他級別的應用集群的目前訪問流量;採用該目前訪問流量和預設單機極限值來計算需求資源;採用該目前資源和該需求資源來確定該其他級別的應用集群的空閒資源;以及按照該釋放比例來釋放該空閒資源。     The method according to item 14 of the scope of patent application, wherein the step of releasing the resources of the other application clusters according to the release ratio includes: obtaining the current resources of the other-level application clusters; obtaining the current levels of the other-level application clusters Access flow; using the current access flow and a preset stand-alone limit value to calculate a demand resource; using the current resource and the demand resource to determine idle resources of the application cluster at another level; and releasing the idle resource according to the release ratio.     根據申請專利範圍第10或12項所述的方法,其中,該將釋放的資源分配給該資源滿載級別的應用集群的步驟包 括:向該保存有釋放的資源的資源池申請資源;以及為該資源滿載級別的應用集群分配該資源池中釋放的資源。     The method according to item 10 or 12 of the scope of the patent application, wherein the step of allocating the released resources to the application cluster at the resource full level includes: applying for resources from the resource pool in which the released resources are stored; and The application cluster at the resource full level allocates the resources released in the resource pool.     一種雲端環境下應用集群資源分配的裝置,其特徵在於,該裝置包括:資源負載狀態獲取模組,用以獲取雲端環境下各個應用集群的資源負載狀態;資源負載級別確定模組,用以依據該資源負載狀態來確定該應用集群的資源負載級別;該資源負載級別包括資源滿載級別和其他級別;資源申請模組,用以為該資源滿載級別的應用集群申請資源;資源釋放模組,用以在為該資源滿載級別的應用集群申請資源失敗時,按照資源負載級別來釋放其他級別的應用集群的資源;以及釋放資源分配模組,用以將該釋放的資源分配給該資源滿載級別的應用集群。     A device for allocating resources of an application cluster in a cloud environment is characterized in that the device includes: a resource load status acquisition module for acquiring the resource load status of each application cluster in the cloud environment; a resource load level determination module for The resource load status determines the resource load level of the application cluster; the resource load level includes a resource full level and other levels; a resource application module for applying for resources for the application cluster at the resource full level; a resource release module for When failing to apply for resources for an application cluster at the resource full level, release resources at other levels of the application cluster according to the resource load level; and release a resource allocation module to allocate the released resources to applications at the resource full level Cluster.    
TW106127139A 2016-11-08 2017-08-10 Method, device and system for application cluster resource allocation in cloud environment TWI755415B (en)

Applications Claiming Priority (3)

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
??201610982629.X 2016-11-08
CN201610982629.X 2016-11-08

Publications (2)

Publication Number Publication Date
TW201818244A true TW201818244A (en) 2018-05-16
TWI755415B TWI755415B (en) 2022-02-21

Family

ID=62109433

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106127139A TWI755415B (en) 2016-11-08 2017-08-10 Method, device and system for application cluster resource allocation in cloud environment

Country Status (3)

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

Families Citing this family (8)

* 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
CN112199251B (en) * 2020-09-25 2022-04-29 同程网络科技股份有限公司 Method, system and device for realizing dynamic increase and decrease of servers through timing tasks
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

Family Cites Families (15)

* 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
US9262231B2 (en) * 2012-08-07 2016-02-16 Advanced Micro Devices, Inc. System and method for modifying a hardware configuration of a cloud computing 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
CN102929715B (en) * 2012-10-31 2015-05-06 曙光云计算技术有限公司 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
CN104079503B (en) * 2013-03-27 2018-07-20 华为技术有限公司 A kind of resource allocation methods and device
CN103533086B (en) * 2013-10-31 2017-02-01 中国科学院计算机网络信息中心 Uniform resource scheduling method in cloud computing system
CN103763346B (en) * 2013-12-31 2017-07-25 华为技术有限公司 A kind of distributed resource scheduling method and device
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
CN106033371B (en) * 2015-03-13 2019-06-21 杭州海康威视数字技术股份有限公司 A kind of dispatching method and system of video analytic tasks
CN105955826A (en) * 2016-05-10 2016-09-21 广东睿江云计算股份有限公司 Control method and device of quality of service in cloud host system

Also Published As

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

Similar Documents

Publication Publication Date Title
TWI755415B (en) Method, device and system for application cluster resource allocation in cloud environment
JP6219512B2 (en) Virtual hadoop manager
US8910153B2 (en) Managing virtualized accelerators using admission control, load balancing and scheduling
EP2901312B1 (en) Real time optimization of compute infrastructure in a virtualized environment
EP3483730B1 (en) Resource allocation method and resource manager
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
TW201818261A (en) Application capacity enlargement method, apparatus and system
CN109257399B (en) Cloud platform application program management method, management platform and storage medium
JP2014527221A (en) Application resource manager on the cloud
US8959367B2 (en) Energy based resource allocation across virtualized machines and data centers
US20190087236A1 (en) Resource scheduling device, system, and method
WO2019105379A1 (en) Resource management method and apparatus, electronic device, and storage medium
TWI671708B (en) Flow rate control method and device
CN107251007B (en) Cluster computing service ensuring device and method
JP2015513732A (en) Method and apparatus for coordinating I / O channels on a virtual platform
JP2021518936A (en) Hybrid system-on-chip for power and performance prediction and control
WO2018158819A1 (en) Distributed database system and resource management method for distributed database system
CN103488538B (en) Application extension device and application extension method in cloud computing system
CN113168344A (en) Distributed resource management by improving cluster diversity
CN112905334A (en) Resource management method, device, electronic equipment and storage medium
Fan et al. A heterogeneity-aware data distribution and rebalance method in Hadoop cluster
CN104518897A (en) Resource management optimization processing method and resource management optimization processing device for virtual firewalls
CN108574600B (en) Service quality guarantee method for power consumption and resource competition cooperative control of cloud computing server
US10209749B2 (en) Workload allocation based on downstream thermal impacts
JP2006195985A (en) Method for controlling resource utilization rate and computer system