WO2010048886A1 - 一种负载均衡的方法、装置及系统 - Google Patents

一种负载均衡的方法、装置及系统 Download PDF

Info

Publication number
WO2010048886A1
WO2010048886A1 PCT/CN2009/074666 CN2009074666W WO2010048886A1 WO 2010048886 A1 WO2010048886 A1 WO 2010048886A1 CN 2009074666 W CN2009074666 W CN 2009074666W WO 2010048886 A1 WO2010048886 A1 WO 2010048886A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing unit
distribution processing
service requests
candidate
load
Prior art date
Application number
PCT/CN2009/074666
Other languages
English (en)
French (fr)
Inventor
李靖
袁芳
谭冠中
刘清顺
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010048886A1 publication Critical patent/WO2010048886A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/088Load balancing or load distribution among core entities

Definitions

  • the invention relates to a Chinese patent application filed on October 29, 2008, the Chinese Patent Application No. 200810202120.4, entitled “A Method, Apparatus and System for Load Balancing" Priority is hereby incorporated by reference in its entirety.
  • the present invention relates to the field of device integration technologies, and in particular, to a load balancing method, apparatus, and system.
  • the load balancing technology uses multiple processing units to form a resource pool, and the distribution unit uniformly controls the processing units in the resource pool. Specifically, each processing unit reports its own load status to the distribution unit. When there is a service request, the distribution unit allocates a processing unit to the service request according to a certain algorithm, and then transfers the service request to the corresponding processing unit for processing. The distribution unit also updates the load status of each processing unit to allocate processing units for subsequent service requests.
  • the distribution unit is the core of the existing load balancing technology. Once the distribution unit fails, the load balancing technology will not be implemented. Therefore, the reliability of the existing load balancing technology is not strong.
  • the present invention provides a load balancing method, apparatus and system that are easy to expand and have strong reliability.
  • a method of load balancing including: When receiving n service requests, the first distribution processing unit determines whether the current load is less than a preset load threshold, where n is a natural number;
  • the second distribution processing unit is selected as the candidate distribution processing unit Transmitting, among the n service requests, a service request other than the m service requests to the candidate distribution processing unit, where the m is a natural number and is less than n;
  • the second distribution processing unit is selected as the candidate distribution processing unit, and the n service requests are forwarded to the candidate distribution processing unit.
  • a load balancing device includes:
  • a first determining unit configured to: when receiving n service requests, determine whether the current load is less than a preset load threshold, where n is a natural number;
  • a first selecting unit configured to: if the current load is less than a preset load threshold, and allow an operation to be performed on the m service requests of the n service requests, select the second distribution processing unit as the candidate distribution processing unit;
  • a first forwarding unit configured to forward, among the n service requests, a service request other than the m service requests to the candidate distribution processing unit, where the m is a natural number and is less than n;
  • a second selecting unit configured to select a second distribution processing unit as a candidate distribution processing unit if the current load is greater than or equal to a preset load threshold
  • a load balancing system including:
  • the q distribution processing units are configured to report a load update message to each other, when the first distribution processing unit of the q distribution processing units allows an operation to be performed on the received n service requests, The first distribution processing unit performs an operation on the n service requests;
  • the first distribution processing unit when the first distribution processing unit allows an operation to be performed on m service requests among the n service requests, the first distribution processing unit performs an operation on m service requests among the n service requests ;
  • the first distribution processing unit When the first distribution processing unit refuses to perform an operation on the n service requests, selects a candidate distribution processing unit according to the load update message, and forwards the n service requests to the candidate distribution processing unit; Alternatively, when the first distribution processing unit allows an operation to be performed on the m service requests among the n service requests, the candidate distribution processing unit is selected according to the load update message, and m services are excluded from the n service requests. A service request other than the request is forwarded to the candidate distribution processing unit;
  • q is a natural number greater than 1
  • m, n are natural numbers
  • m is less than n.
  • each distribution processing unit can perform distribution and processing operations, and the number of distribution processing units can be increased as needed, without being considered for the processing capability of a certain distribution processing unit, and is easy to expand. If a distribution processing unit fails, it will not affect other distribution processing units, and the reliability is strong.
  • FIG. 1 is a flow chart of an embodiment of a method of the present invention
  • Figure 3 is a structural view of an embodiment of the apparatus of the present invention.
  • FIG. 4 is a structural diagram of an embodiment of a system of the present invention.
  • Embodiments of the present invention provide a method for load balancing, including:
  • the first distribution processing unit determines whether the current load is less than a preset load threshold, where n is a natural number
  • the second distribution processing unit is selected as the candidate distribution processing unit Transmitting, among the n service requests, a service request other than the m service requests to the candidate distribution processing unit, where the m is a natural number and is less than n;
  • the second distribution processing unit is selected as the candidate distribution processing unit, and the n service requests are forwarded to the candidate distribution processing unit.
  • FIG. 1 is a flowchart of an embodiment of a method according to the present invention, which may include:
  • Step 101 When receiving n service requests, the first distribution processing unit determines whether the current load is less than a preset load threshold, where n is a natural number;
  • Step 102 If the current load is less than a preset load threshold, and the first distribution processing unit Allowing to perform operations on m service requests in the n service requests, or, if the current load is greater than or equal to a preset load threshold, selecting a candidate distribution processing unit, m being a natural number and less than n;
  • Step 103 A service request other than m service requests among the service requests, or the n service requests are forwarded to the candidate distribution processing unit.
  • each DPU has the same function, and can process the received service request by itself, and can receive the received service request.
  • the service request is forwarded to other DPUs for processing.
  • DPUs distribution processing units
  • the load thresholds of the first DPU, the second DPU, the third DPU, and the fourth DPU may be the same or different, and each DPU may also have multiple load thresholds. In a specific embodiment, only The load thresholds of the first DPU, the second DPU, the third DPU, and the fourth DPU are the same as an example.
  • the specific embodiment may include the following steps:
  • Step 201 During the current period, when the first DPU receives n service requests, it determines whether the load of the first DPU is less than a preset load threshold LoadThd, if not, proceeds to step 202, otherwise, proceeds to step 203;
  • step 201 can also be within the set time period. At this time, the last period indicated below should be the last time period.
  • n is a natural number, and the load may be a central processor CPU occupancy rate, a bandwidth occupancy rate, a memory usage rate, or a comprehensive information of the occupancy rates.
  • Step 202 The first DPU performs a related operation on the received service request, and the process ends. If the load of the first DPU is less than the load threshold, the first DPU has the capability to process the received service request, and therefore, the first DPU Process it by itself.
  • Step 203 The first DPU selects one candidate DPU among the second DPU, the third DPU, and the fourth DPU.
  • the candidate DPU is a DPU whose load is lower than the load threshold and has the lowest load in the second DPU, the third DPU, and the fourth DPU.
  • Step 204 The first DPU calculates the number of service requests that the candidate DPU can accept, and calculates 4
  • the DPUs other than the candidate DPUs may forward the number of service requests T1 to the candidate DPUs; if the load of any DPU other than the candidate DPUs is greater than the load threshold among the four DPUs, the candidate DPUs are excluded from the four DPUs. Any DPU other than will forward the service request received by itself to the candidate DPU.
  • A1 load threshold / load of the unit service request of the candidate DPU LoadUnit - number of service requests in the load update message reported by the candidate DPU to the first DPU (1)
  • A1 is a service acceptable to the candidate DPU The number of requests.
  • LoadUnit is the default value.
  • Load Threshold / Candidate DPU's LoadUnit is the number of service requests that the candidate DPU can handle in total when the load is not greater than the load threshold.
  • first DPU, the second DPU, the third DPU, and the fourth DPU periodically report load update messages to each other, including the current load, the number of currently received service requests, and the like.
  • the number of service requests that the DPU whose load is greater than the load threshold may forward to the candidate DPU:
  • Tl ⁇ (load-load threshold) / (first [/ last cycle load-load threshold] (2) All loads are not lower than the load threshold opt / In formula (2), T1 is in 4 DPUs, In a DPU other than the candidate DPU, the number of service requests that the DPU with a load greater than the load threshold may forward to the candidate DPU.
  • Step 205 Determine whether T1 is greater than the number of service requests A1 that the candidate DPU can accept. If yes, go to step 206, otherwise, go to step 208;
  • T1 is greater than A1
  • the DPU whose load is greater than the load threshold will transfer the received service request to the candidate DPU, which may cause the load of the candidate DPU to be greater than the pre- Set the load threshold, so it is necessary to guarantee 4 DPUs, except candidate DPUs.
  • the service request that the DPU with load greater than the load threshold forwards to the candidate DPU is within the acceptable range of the candidate DPU.
  • Step 206 The first DPU updates the load of the saved candidate DPU, and updates the load of the candidate DPU to a load threshold.
  • Step 206 ensures that the first DPU will no longer use the selected candidate DPU as the candidate DPU before the load of the candidate DPU changes again.
  • Step 207 The first DPU calculates a probability value according to (T1-A1) /T1, and when any random number is less than the probability value, returns to step 203, and when any random number is greater than or equal to the probability value, enter Step 208;
  • the process returns to step 203 to re-execute the operation.
  • the process proceeds to step 208.
  • the DPU forwards the service request to the candidate DPU selected this time.
  • Step 207 is optional, and the purpose is to ensure that the load of the candidate DPU is not greater than the load threshold.
  • the first DPU may also return to step 203, or go to step 208, the probability of returning to step 203 is (T1-A1) / T1, and the probability of entering step 208 is 1-(T1-A1) / Tl.
  • Step 208 The first DPU forwards the received service request to the candidate DPU, and updates the load of the candidate DPU.
  • Load of candidate DPU candidate DPU current load + ( TlxLoadUnit ).
  • an Integrated Service Request Number (ISRN) is taken as a load in a specific embodiment.
  • ISRN Integrated Service Request Number
  • One voice service request is one ISRN
  • the second short message service request is converted into 0.3 ISRNs according to the complexity of signaling processing.
  • a number of CSPUs may be formed into a CSPU resource pool. With reference to the specific embodiments, it is assumed that there are 4 CSPUs, which are a first CSPU, a second CSPU, a third CSPU, and a fourth CSPU, respectively. Further, the load thresholds of the respective CSPUs are the same as an example.
  • Step A1 In the current period, when the first CSPU receives n service requests, it is determined whether the number of ISNRs of the first CSPU is less than the preset ISRN threshold ISRNThd, and if it is less than the preset ISRN threshold ISRNThd, the process proceeds to step A2, otherwise, go to step A3; in step A1, n is a natural number.
  • Step A2 The first CSPU performs a related operation on the received service request, and the process ends.
  • the number of ISNRs of the first CSPU is smaller than the ISNR threshold, indicating that the first CSPU has the capability to process the received service request, and therefore, the first CSPU Process the received service request itself.
  • the current processing capability of the first CSPU can process all n received service requests, all the received service requests are processed by the first CSPU, and the process ends. If the current processing capability of the first CSPU can only process m (m is a natural number, and m is less than n) service requests in n service requests, then the service request that cannot be processed by the first CSPU is transferred to step A3. When the first CSPU can only process part of the service request, m service requests can be randomly selected from the n service requests for processing, and the remaining service requests are transferred to step A3.
  • Step A3 The first CSPU selects one candidate CSPU in the second CSPU, the third CSPU, and the fourth CSPU;
  • the candidate CSPU is a CSPU with an ISNR lower than an ISNR threshold and having a minimum ISNR in the second CSPU, the third CSPU, and the fourth CSPU.
  • Step A4 The first CSPU calculates the number of service requests that the candidate CSPU can accept, and calculates the number of service requests that the CSPU other than the candidate CSPU may forward to the candidate CSPU in the four CSPUs.
  • the CSSNR of any CSPU other than the CSPU is greater than the ISNR threshold, and any CSPU other than the candidate CSPU will forward the service request received by itself to the candidate CSPU.
  • A2 the number of ISNRs that the candidate CSPU can handle in total if the ISNR is not greater than the ISNR threshold - the number of ISNRs in the load update message reported by the candidate CSPU to the first CSPU (3)
  • A2 is the number of service requests that the candidate CSPU can accept. It should be noted that the first CSPU, the second CSPU, the third CSPU, and the fourth CSPU periodically report the ISNR update message to each other, for example, 1 second, including the current ISNR, the number of currently received service requests, and the like.
  • the number of service requests that the CSPU whose ISNR is greater than the ISNR threshold may be forwarded to the candidate CSPU in the CSPU other than the candidate CSPU is calculated according to the formula (4):
  • T2 IWW of the period - IWW threshold) ( 4 )
  • D2 is the number of service requests that the CSPUs with the number of ISNRs greater than the ISNR threshold may forward to the candidate CSPU in the CSs other than the candidate CSPU.
  • Step A5 determining whether T2 is greater than the number of service requests that the candidate CSPU can accept A2. If it is greater, proceed to step A6, otherwise, proceed to step A8;
  • T2 is greater than A2
  • the CSPU whose ISNR is greater than the ISNR threshold will transfer the received service request to the candidate CSPU, which may result in ISNR of the candidate CSPU.
  • the number is greater than the ISNR threshold. Therefore, in the CSPUs other than the candidate CSPU, the CSPU whose ISNR is greater than the ISNR threshold is forwarded to the candidate CSPU within the acceptable range of the candidate CSPU.
  • Step A6 The first CSPU updates the ISNR of the saved candidate CSPU, and updates the ISNR of the candidate CSPU to an ISNR threshold.
  • Step A6 ensures that the first CSPU will no longer use the selected candidate CSPU as the candidate CSPU until the ISNR of the candidate CSPU changes again.
  • Step A7 The first CSPU calculates a probability value according to (T2-A2) /T2, and when any random number is less than the probability value, returns to step 203, and when any random number is greater than or equal to the probability value, enter Step A8;
  • the process returns to step A3 to re-execute the operation.
  • the process proceeds to step A8.
  • the CSPU forwards the service request to the candidate CSPU selected this time.
  • Step A7 is optional, and its purpose is to ensure that the load of the candidate CSPU is not greater than the load threshold.
  • the first DPU may also return to step A3, or go to step A8, the probability of returning to step A3 is (T1-A1) /T1, and the probability of entering step A8 is 1-(T1-A1) /TL Step A8:
  • the first CSPU forwards the received service request to the candidate CSPU, and updates the number of ISNRs of the candidate CSPU.
  • the ISNR of the candidate CSPU is updated as:
  • the number of ISNRs of the candidate CSPU the number of current ISNRs of the candidate CSPU + T2.
  • the BSC in the specific embodiment may also be a mobile switching center MSC and a universal media gateway UMG.
  • the DPU may also be various protocol processing units, for example: a service data unit (SDU)
  • SDU service data unit
  • the load can also be the CPU usage of the central processor, the bandwidth occupancy, the memory usage, and so on.
  • An embodiment of the present invention provides a device for load balancing, including:
  • a first determining unit configured to: when receiving n service requests, determine whether the current load is less than a preset load threshold, where n is a natural number;
  • a first selecting unit configured to: if the current load is less than a preset load threshold, and allow an operation to be performed on the m service requests of the n service requests, select the second distribution processing unit as the candidate distribution processing unit;
  • a first forwarding unit configured to forward, among the n service requests, a service request other than the m service requests to the candidate distribution processing unit, where the m is a natural number and is less than n;
  • a second selecting unit configured to select a second distribution processing unit as a candidate distribution processing unit if the current load is greater than or equal to a preset load threshold
  • the device also includes:
  • a second determining unit configured to determine whether to forward a service request other than the m service requests of the n service requests to the candidate distribution processing unit selected by the first selecting unit, and if yes, the n services The service request other than the m service requests in the request is forwarded to the candidate distribution processing unit selected by the first selection unit, otherwise, the second determination unit notifies the first selection unit to reselect the candidate distribution processing unit.
  • a third determining unit configured to determine whether to forward the n service requests to the candidate distribution processing unit selected by the second selecting unit, and if yes, forward the n service requests to the first selecting unit Candidate distribution processing unit, otherwise, the third determining unit notifies the second selection unit to reselect the candidate distribution processing unit.
  • FIG. 3 is a structural diagram of an apparatus according to an embodiment of the present invention, which may include:
  • the first determining unit 301 is configured to: when receiving the n service requests, determine whether the current load is less than a preset load threshold in the current period, where n is a natural number;
  • the selecting unit 302 is configured to: if the first determining unit 301 determines that the current load is less than a preset load threshold, and the device allows to perform operations on m service requests in the n service requests, or if current The load is greater than or equal to a preset load threshold, and the candidate distribution processing unit is selected, where m is a natural number and is less than n;
  • the forwarding unit 303 is configured to request a service request other than the m service requests among the n service requests, or forward the n service requests to the candidate distribution processing unit.
  • the selecting unit 303 may include:
  • a determining unit configured to determine, according to the received load update message, k distribution processing units whose load is less than a respective load threshold, where k is a natural number;
  • the selection unit 302 selects, as the candidate distribution processing unit, a distribution processing unit having a minimum load among the k distribution processing units determined by the determination unit.
  • the forwarding unit 303 can include:
  • a second determining unit configured to determine whether the n service requests, or service requests other than the m service requests, of the n service requests are forwarded to a candidate distribution processing unit currently selected by the selecting unit;
  • the second determining unit determines that the n service requests, or service requests other than the m service requests, of the n service requests are forwarded to the candidate distribution processing unit currently selected by the selecting unit, And the forwarding unit forwards the n service requests, or the service requests other than the m service requests of the n service requests to the currently selected candidate distribution processing unit; otherwise, the second determining unit notifies the The selection unit reselects the candidate distribution processing unit.
  • the second determining unit may include:
  • a calculating unit configured to calculate a first value and a second value, where the first value is currently selected The number of service requests that the candidate distribution processing unit actually accepts, the second value being the number of service requests that the distribution processing unit that is not less than the respective load threshold will forward the service request to the currently selected candidate distribution processing unit;
  • a comparing unit configured to compare the first value calculated by the calculating unit and the size of the second value
  • the second determining unit determines, according to the comparison performed by the comparing unit, whether to forward the n service requests, or the service requests other than the m service requests among the n service requests, to the currently selected candidate distribution. Processing unit.
  • the first determining unit 301 of the first PDU determines whether the current load is less than a preset load threshold in the current period, where n is a natural number. If the first determining unit 301 determines that the current load of the first DPU is less than a preset load threshold, and the first DPU can process all n service requests, or the first DPU can process the m service requests, the first DPU Process all n service requests or m service requests.
  • the selection unit 302 of the first DPU is in the fourth A candidate DPU is selected in the DPU.
  • the selecting unit 302 performs the selection as follows: The determining unit determines the DPU in which the load is less than the preset load threshold among the four DPUs, and selects the DPU with the smallest load as the candidate DPU currently selected.
  • the calculation unit calculates A1 according to the formula (1), calculates T1 according to the formula (2), and compares the sizes of A1 and T1.
  • T1 is less than or equal to A1
  • the forwarding unit 303 requests n service requests or other than m service requests.
  • the service request is forwarded to the currently selected candidate DPU.
  • the selection unit 302 reselects the candidate DPU.
  • T1 is greater than A1, and any random number is greater than or equal to the probability value calculated in step 207
  • the forwarding unit 303 forwards n service requests or service requests other than m service requests to the currently selected candidate DPU. In order to increase the number of DPUs as needed, it is easy to expand without considering the processing power of a certain DPU. If a DPU fails, it will not affect other DPUs, and the reliability is strong.
  • the DPU in the device embodiment may be a CSPU, and the load may be an ISRN.
  • the steps A1 to A8 provide the device embodiments of the present invention. The operations performed by each unit are described in detail.
  • the first determining unit 301 of the first CSDU determines whether the current ISNR number is less than a preset ISNR threshold in the current period, where n is a natural number. If the first determining unit 301 determines that the current ISNR of the first CSPU is less than a preset ISNR threshold, and the first CSPU can process all n service requests, or the first CSPU can process the m service requests, the first A CSPU processes all n service requests or m service requests.
  • the selection unit 302 of the first CSPU is in the fourth The candidate CSPU is selected in the CSPU.
  • the selecting unit 302 performs the selection as follows: The determining unit determines the CSPU in which the number of ISNRs is smaller than the preset ISNR threshold in the four CSPUs, and selects the CSPU with the smallest number of ISNR as the currently selected candidate CSPU.
  • the calculation unit calculates A2 according to formula (3), calculates T2 according to formula (4), compares the sizes of A2 and T2, and when T2 is less than or equal to A2, the forwarding unit 303 requests n service requests or other than m service requests. The service request is forwarded to the currently selected candidate CSPU.
  • the selection unit 302 reselects the candidate CSPU.
  • the forwarding unit 303 forwards the n service requests or service requests other than the m service requests to the currently selected candidate CSPU.
  • the number of CSPUs is increased as needed, it is not necessary to consider the processing power of a certain CSPU, and it is easy to expand. If a CSPU fails, it will not affect other CSPUs, and the reliability is strong.
  • the embodiment of the invention further provides a load balancing system, including:
  • the q distribution processing units are configured to report load update messages to each other, when the first distribution processing unit of the q distribution processing units allows for n received service requests When the operation is performed, the first distribution processing unit performs an operation on the n service requests; or, when the first distribution processing unit allows an operation to be performed on the m service requests of the n service requests, The first distribution processing unit performs an operation on the m service requests of the n service requests;
  • the first distribution processing unit refuses to perform an operation on the n service requests, selecting a candidate distribution processing unit according to the load update message, and forwarding the n service requests to the candidate distribution processing unit;
  • the candidate distribution processing unit is selected according to the load update message, and m services are excluded from the n service requests.
  • a service request other than the request is forwarded to the candidate distribution processing unit;
  • q is a natural number greater than 1
  • m, n are natural numbers
  • m is less than n.
  • the embodiment of the invention further provides a load balancing system, which is shown in FIG. 4, and includes:
  • q distribution processing units including: first distribution processing unit 401-1, second distribution processing unit
  • the first distribution is allowed when the processing unit allows itself to perform an operation on the received n service requests, or when the first distribution processing unit allows itself to perform an operation on the m service requests of the n service requests
  • the processing unit performs an operation on the n service requests or m service requests; when the first distribution processing unit denies the n service requests or allows operations on m service requests of the n service requests, Selecting a candidate distribution processing unit according to the load update message, and forwarding, to the candidate distribution processing unit, the n service requests, or service requests other than m service requests among the n service requests;
  • q is a natural number greater than 1
  • m, n are natural numbers
  • m is less than n.
  • each distribution processing unit is specifically CSPU and the load is specifically ISNR, the specific operation examples executed by each distribution processing unit are the same. For details, refer to the description of the method embodiment and the specific example of the method.
  • each distribution processing unit can perform distribution and processing operations, and the number of distribution processing units can be increased as needed, without considering The processing power of a distribution processing unit is easy to expand. If a distribution processing unit fails, it will not affect other distribution processing units, and the reliability is strong.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Description

一种负载均衡的方法、 装置及系统 本申请要求于 2008 年 10 月 29 日提交中国专利局、 申请号为 200810202120.4、 发明名称为"一种负载均衡的方法、 装置及系统"的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及设备集成技术领域, 尤其涉及一种负载均衡的方法、装置及系 统。
背景技术
随着电信设备集成度的提高,电信设备的处理能力和计算能力也相应地增 大。处理能力和计算能力的增大使得电信设备难以承担。如果抛弃现有电信设 备去做大量的硬件升级显然是不现实的,会造成资源的严重浪费。在这种情况 下, 负载均衡技术应运而生。
负载均衡技术采用多个处理单元构成资源池,由分发单元对资源池中的处 理单元统一进行控制。 具体为: 各处理单元将自身负载状况上报至分发单元, 当有服务请求时, 分发单元根据一定的算法为该服务请求分配一个处理单元, 然后将该服务请求转给相应的处理单元进行处理。分发单元还要更新各处理单 元的负载状况, 以便为后续的服务请求分配处理单元。
发明人在研究过程中,发现现有负载均衡技术至少存在以下缺点: 不易进 行扩展, 并且, 可靠性不强。 具体为: 若用户希望电信设备具有更大的处理能 力或者计算能力, 需要增加处理单元的个数, 而分发单元的能力是有限的, 其 所能控制的处理单元的个数也是有限的, 因此, 很难再增加处理单元的个数, 意即不易进行扩展。
分发单元是现有负载均衡技术的核心, 一旦分发单元发生故障, 负载均衡 技术将无法实施, 因此, 现有负载均衡技术的可靠性不强。
发明内容
有鉴于此, 本发明提供了一种负载均衡的方法、 装置及系统, 使其易于扩 展, 并且具有较强的可靠性。
一种负载均衡的方法, 包括: 当接收到 n个服务请求时,第一分发处理单元判断当前负载是否小于预设 的负载门限, 所述 n为自然数;
若当前负载小于预设的负载门限,并且所述第一分发处理单元容许对所述 n个服务请求中的 m个服务请求执行操作,则选择第二分发处理单元作为候选 分发处理单元, 将所述 n个服务请求中除 m个服务请求以外的服务请求转发 至所述候选分发处理单元, 其中所述 m为自然数并且小于 n;
或者, 若当前负载大于或等于预设的负载门限, 则选择第二分发处理单元 作为候选分发处理单元, 将所述 n个服务请求转发至所述候选分发处理单元。
一种负载均衡的装置, 包括:
第一判断单元, 用于当接收到 n个服务请求时, 判断当前负载是否小于预 设的负载门限, 所述 n为自然数;
第一选择单元, 用于若当前负载小于预设的负载门限, 并且容许对所述 n 个服务请求中的 m个服务请求执行操作, 则选择第二分发处理单元作为候选 分发处理单元;
第一转发单元, 用于将所述 n个服务请求中除 m个服务请求以外的服务 请求转发至所述候选分发处理单元, 其中所述 m为自然数并且小于 n;
第二选择单元, 用于若当前负载大于或等于预设的负载门限, 则选择第二 分发处理单元作为候选分发处理单元;
第二转发单元, 用于将所述 n个服务请求转发至所述候选分发处理单元。 一种负载均衡的系统, 包括:
q个分发处理单元, 所述 q个分发处理单元用于相互上报负载更新消息, 当所述 q个分发处理单元中的第一分发处理单元容许对接收到的 n个服务请求 执行操作时, 所述第一分发处理单元对所述 n个服务请求执行操作;
或者, 当所述第一分发处理单元容许对所述 n个服务请求中的 m个服务 请求执行操作时, 所述第一分发处理单元对所述 n个服务请求中的 m个服务 请求执行操作;
当所述第一分发处理单元拒绝对所述 n个服务请求执行操作时,根据所述 负载更新消息选择候选分发处理单元,将所述 n个服务请求转发至所述候选分 发处理单元; 或者, 当所述第一分发处理单元允许对 n个服务请求中的 m个服务请求 执行操作时,根据所述负载更新消息选择候选分发处理单元,将所述 n个服务 请求中除 m个服务请求以外的服务请求转发至所述候选分发处理单元;
其中, q为大于 1的自然数, m、 n为自然数, 且 m小于 n。
可以看出, 在本发明实施例中,各分发处理单元均可以执行分发与处理操 作, 可以根据需要增加分发处理单元的个数, 无需考虑某个分发处理单元的处 理能力, 容易扩展。 若某个分发处理单元发生故障, 不会对其它分发处理单元 造成影响, 可靠性较强。
附图说明
图 1为本发明方法实施例流程图;
图 2为本发明方法实施例具体流程图;
图 3为本发明装置实施例结构图;
图 4为本发明系统实施例结构图。
具体实施方式
为使本发明的上述特征、优点更加明显易懂, 下面结合具体实施方式对本 发明进行详细说明。
本发明实施例提供了一种负荷均衡的方法, 包括:
当接收到 n个服务请求时,第一分发处理单元判断当前负载是否小于预设 的负载门限, 所述 n为自然数;
若当前负载小于预设的负载门限,并且所述第一分发处理单元容许对所述 n个服务请求中的 m个服务请求执行操作,则选择第二分发处理单元作为候选 分发处理单元, 将所述 n个服务请求中除 m个服务请求以外的服务请求转发 至所述候选分发处理单元, 其中所述 m为自然数并且小于 n;
或者, 若当前负载大于或等于预设的负载门限, 则选择第二分发处理单元 作为候选分发处理单元, 将所述 n个服务请求转发至所述候选分发处理单元。
请参考图 1 , 为本发明方法实施例流程图, 可以包括:
步骤 101 : 当接收到 n个服务请求时, 第一分发处理单元判断当前负载是 否小于预设的负载门限, n为自然数;
步骤 102: 若当前负载小于预设的负载门限, 并且所述第一分发处理单元 容许对所述 n个服务请求中的 m个服务请求执行操作, 或者, 若当前负载大 于等于预设的负载门限, 选择候选分发处理单元, m为自然数并且小于 n; 步骤 103:将所述 n个服务请求中除 m个服务请求以外的服务请求,或者, 所述 n个服务请求转发至所述候选分发处理单元。
下面结合具体实施例对图 1所示步骤进行详细说明。
在具体实施例中, 有 q个分发处理单元(DPU, Dispatch Process Unit ) , q 为自然数, 各 DPU具有的功能相同, 既可以由自身对接收到的服务请求进行处 理, 又可以将接收到的服务请求转至其它 DPU进行处理, 为了描述方便, 在下 文中, 仅以第一 DPU的视角为例进行说明, 并且, 假设共有 4个 DPU, 分别为 第一 DPU、 第二 DPU、 第三 DPU以及第四 DPU。
还需要说明的是, 第一 DPU、 第二 DPU、 第三 DPU以及第四 DPU的负载门 限可以相同, 也可以不同, 并且, 各个 DPU还可以具有多个负载门限, 在具体 实施例中, 仅以第一 DPU、 第二 DPU、 第三 DPU以及第四 DPU的负载门限相同 为例进行说明。
请参考图 2所示, 该具体实施例可以包括以下步骤:
步骤 201 : 当前周期内, 当第一 DPU接收到 n个服务请求时, 判断第一 DPU 的负载是否小于预设的负载门限 LoadThd, 如果小于, 转入步骤 202, 否则, 转入步骤 203;
需要指出的是, 步骤 201的执行时机还可以在设置的时间段内, 此时, 下 文指出的上个周期应为上个时间段。
步骤 201中, n为自然数, 负载可以是中央处理器 CPU占用率、带宽占用率、 内存占用率或者这些占用率的综合信息等。
步骤 202: 第一 DPU对接收到的服务请求执行相关操作, 流程结束; 若第一 DPU的负载小于负载门限,说明第一 DPU自身有能力处理接收到的 服务请求, 因此, 由该第一 DPU自身进行处理。
若第一 DPU当前处理能力可以处理全部 n个接收到的服务请求, 则由第一 DPU处理全部接收到的服务请求, 流程结束。若第一 DPU当前处理能力只能处 理 n个服务请求中 m ( m为自然数)个服务请求, 则对于第一 DPU无法处理的服 务请求, 转入步骤 203。 步骤 203: 第一 DPU在第二 DPU、 第三 DPU以及第四 DPU中选择一个候选 DPU;
其中, 候选 DPU是负载低于负载门限, 并且在第二 DPU、 第三 DPU以及第 四 DPU中, 负载最低的 DPU。
步骤 204: 第一 DPU计算候选 DPU可以接受的服务请求个数, 并计算 4个
DPU中, 除候选 DPU以外的 DPU可能向候选 DPU转发服务请求的个数 T1 ; 若 4个 DPU中, 除候选 DPU以外的任一 DPU的负载大于负载门限, 则 4个 DPU中, 除候选 DPU以外的任一 DPU将向候选 DPU转发自己接收到的服务请 求。
根据公式( 1 )计算候选 DPU可以接受的服务请求个数:
A1 =负载门限 /候选 DPU的单位服务请求占用的负载 LoadUnit -候选 DPU 向第一 DPU上报的负载更新消息中的服务请求个数 ( 1 ) 公式(1 ) 中, A1为候选 DPU可以接受的服务请求个数。 LoadUnit为预设 数值。负载门限 /候选 DPU的 LoadUnit为候选 DPU在负载不大于负载门限的情况 下, 总共可以处理的服务请求个数。
需要指出的是, 第一 DPU、 第二 DPU、 第三 DPU以及第四 DPU会周期性相 互上报负载更新消息, 包括当前负载、 当前接收到的服务请求个数等。
根据公式( 2 )计算 4个 DPU中, 除候选 DPU以外的 DPU中, 负载大于负载 门限的 DPU可能向候选 DPU转发的服务请求个数:
Tl = ∑ (负载一负载门限) /(第一 [/上个周期的负载一负载门限) (2 ) 所有负载不低于负载门限的 opt/ 公式(2 )中, T1为 4个 DPU中, 除候选 DPU以外的 DPU中, 负载大于负载 门限的 DPU可能向候选 DPU转发的服务请求个数。
步骤 205:判断 T1是否大于候选 DPU可以接受的服务请求个数 A1 ,若大于, 进入步骤 206, 否则, 进入步骤 208;
若 T1大于 A1 , 则说明若 4个 DPU中, 除候选 DPU以外的 DPU中, 负载大于 负载门限的 DPU会将各自接收到的服务请求转至候选 DPU,将有可能导致候选 DPU的负载大于预设负载门限, 所以, 需要保证 4个 DPU中, 除候选 DPU以外 的 DPU中, 负载大于负载门限的 DPU向候选 DPU转发的服务请求在候选 DPU 可接受的范围内。
步骤 206: 第一 DPU将保存的候选 DPU的负载进行更新, 将候选 DPU的负 载更新为负载门限;
步骤 206保证了在候选 DPU的负载再次发生变化之前, 第一 DPU不会再将 此次选择的候选 DPU作为候选 DPU。
步骤 207: 第一 DPU根据(T1-A1 ) /T1 , 计算出概率值, 当任取的随机数 小于该概率值时, 返回步骤 203 , 当任取的随机数大于等于该概率值时, 进入 步骤 208;
当任取的随机数小于该概率值时, 第一 DPU需要重新选择一个候选 DPU, 因此, 返回步骤 203重新执行操作, 当任选的随机数大于等于该概率值时, 进 入步骤 208 , 第一 DPU将服务请求转发至此次选择的候选 DPU。
步骤 207为可选项, 其目的在于保证候选 DPU的负载不大于负载门限。 第 一 DPU还可以返回步骤 203 ,或者进入步骤 208,返回步骤 203的概率为( T1-A1 ) /T1 , 进入步骤 208的概率为 1- ( T1-A1 ) /Tl。
步骤 208: 第一 DPU将接收到的服务请求转至候选 DPU, 并更新候选 DPU 的负载。
候选 DPU的负载更新为: 候选 DPU的负载 =候选 DPU当前负载 + ( TlxLoadUnit ) 。 以根据需要增加 DPU的个数, 无需考虑某个 DPU的处理能力, 容易扩展。 若某 个 DPU发生故障, 不会对其它 DPU造成影响, 可靠性较强。
以上对本发明具体实施例进行了详细说明,下面结合一个具体实施对本发 明具体实施例进行说明。
在具体实例中, 将 CDMA2000基站控制器 BSC中的呼叫信令处理单元
( CSPU, Call Signal Process Unit )作为具体实施例中的 DPU, 将综合服务请 求次数 ( ISRN, Integrate Service Request Number )作为具体实施例中的负载。 一次语音服务请求为 1个 ISRN, —次短消息服务请求根据信令处理的复杂度折 合为 0.3个 ISRN。 为了提升 BSC的容量, 可以将若干个 CSPU组成 CSPU资源池。 结合具体实 施例, 假设共有 4个 CSPU, 分别为第一 CSPU、 第二 CSPU、 第三 CSPU以及第 四 CSPU。 并且, 以各 CSPU的负载门限均相同为例进行说明。
具体实施例可以包括以下步骤:
步骤 A1: 当前周期内,当第一 CSPU接收到 n个服务请求时,判断第一 CSPU 自身的 ISNR个数是否小于预设的 ISRN门限 ISRNThd, 如果小于预设的 ISRN门 限 ISRNThd, 则转入步骤 A2, 否则, 转入步骤 A3; 步骤 A1中, n为自然数。
步骤 A2: 第一 CSPU对接收到的服务请求执行相关操作, 流程结束; 第一 CSPU自身的 ISNR个数小于 ISNR门限, 说明第一 CSPU有能力处理接 收到的服务请求, 因此, 由第一 CSPU自身处理接收到的服务请求。
若第一 CSPU当前处理能力可以处理全部 n个接收到的服务请求,则由第一 CSPU处理全部接收到的服务请求, 流程结束。若第一 CSPU当前处理能力只能 处理 n个服务请求中 m( m为自然数,且 m小于 n )个服务请求,则对于第一 CSPU 无法处理的服务请求, 转入步骤 A3。 第一 CSPU只能处理部分服务请求时, 可 以从 n个服务请求中随机选择 m个服务请求进行处理, 其余的服务请求转入步 骤 A3。
步骤 A3: 第一 CSPU在第二 CSPU、 第三 CSPU以及第四 CSPU中选择一个 候选 CSPU;
其中, 候选 CSPU是 ISNR低于 ISNR门限, 并且在第二 CSPU、 第三 CSPU 以及第四 CSPU中, ISNR最小的 CSPU。
步骤 A4: 第一 CSPU计算候选 CSPU可以接受的服务请求个数, 并计算 4个 CSPU中, 除候选 CSPU以外的 CSPU可能向候选 CSPU转发服务请求的个数 T2; 若 4个 CSPU中, 除候选 CSPU以外的任一 CSPU的 ISNR大于 ISNR门限,贝' J4 个 CSPU中,除候选 CSPU以外的任一 CSPU将向候选 CSPU转发自己接收到的服 务请求。
根据公式(3 )计算候选 CSPU可以接受的服务请求个数:
A2 =候选 CSPU在 ISNR不大于 ISNR门限情况下总共可以处理 ISNR的个数 -候选 CSPU向第一 CSPU上报的负载更新消息中的 ISNR个数 ( 3 ) 公式(3 ) 中, A2为候选 CSPU可以接受的服务请求个数。 需要指出的是, 第一 CSPU、 第二 CSPU、 第三 CSPU以及第四 CSPU会周期性(例如: 1秒)相 互上报 ISNR更新消息, 包括当前 ISNR、 当前接收到的服务请求个数等。
根据公式( 4 )计算 4个 CSPU中, 除候选 CSPU以外的 CSPU中, ISNR个数 大于 ISNR门限的 CSPU可能向候选 CSPU转发的服务请求个数:
T2 = 个周期的 IWW—IWW门限)( 4 )
Figure imgf000010_0001
公式(4 ) 中, 丁2为4个 8?11中, 除候选 CSPU以外的 CSPU中, ISNR个数 大于 ISNR门限的 CSPU可能向候选 CSPU转发的服务请求个数。
步骤 A5:判断 T2是否大于候选 CSPU可以接受的服务请求个数 A2,若大于, 进入步骤 A6, 否则, 进入步骤 A8;
若 T2大于 A2, 则说明 4个 CSPU中, 除候选 CSPU以外的 CSPU中, ISNR个 数大于 ISNR门限的 CSPU会将各自接收到的服务请求转至候选 CSPU, 将有可 能导致候选 CSPU的 ISNR个数大于 ISNR门限, 所以, 需要保证 4个 CSPU中, 除 候选 CSPU以外的 CSPU中, ISNR个数大于 ISNR门限的 CSPU向候选 CSPU转发 的服务请求在候选 CSPU可接受的范围内。
步骤 A6: 第一 CSPU将保存的候选 CSPU的 ISNR进行更新, 将候选 CSPU 的 ISNR更新为 ISNR门限;
步骤 A6保证了在候选 CSPU的 ISNR再次发生变化之前, 第一 CSPU不会再 将此次选择的候选 CSPU作为候选 CSPU。
步骤 A7: 第一 CSPU根据(T2-A2 ) /T2, 计算出概率值, 当任取的随机数 小于该概率值时, 返回步骤 203 , 当任取的随机数大于等于该概率值时, 进入 步骤 A8;
当任取的随机数小于该概率值时, 第一 CSPU需要重新选择一个候选 CSPU, 因此, 返回步骤 A3重新执行操作, 当任取的随机数大于等于该概率值 时, 进入步骤 A8 , 第一 CSPU将服务请求转发至此次选择的候选 CSPU。
步骤 A7为可选项, 其目的在于保证候选 CSPU的负载不大于负载门限。 第 一 DPU还可以返回步骤 A3 , 或者进入步骤 A8, 返回步骤 A3的概率为 (T1-A1 ) /T1 , 进入步骤 A8的概率为 1- ( T1-A1 ) /TL 步骤 A8 : 第一 CSPU将接收到的服务请求转至候选 CSPU , 并更新候选 CSPU的 ISNR个数;
候选 CSPU的 ISNR更新为: 候选 CSPU的 ISNR个数 =候选 CSPU当前 ISNR 个数 + T2。
以上对具体实例进行了详细说明, 需要指出的是, 具体实施例中的 BSC还 可以是移动交换中心 MSC、通用媒体网关 UMG , DPU还可以是各种协议处理 单元, 例如: 业务数据单元(SDU ) , 负载还可以是中央处理器 CPU占用率、 宽带占用率、 内存占用率等等。 以根据需要增加 CSPU的个数时, 无需考虑某个 CSPU的处理能力, 容易扩展。 若某个 CSPU发生故障, 不会对其它 CSPU造成影响, 可靠性较强。
本发明实施例提供了一种负载均衡的装置, 包括:
第一判断单元, 用于当接收到 n个服务请求时, 判断当前负载是否小于预 设的负载门限, 所述 n为自然数;
第一选择单元, 用于若当前负载小于预设的负载门限, 并且容许对所述 n 个服务请求中的 m个服务请求执行操作, 则选择第二分发处理单元作为候选 分发处理单元;
第一转发单元, 用于将所述 n个服务请求中除 m个服务请求以外的服务 请求转发至所述候选分发处理单元, 其中所述 m为自然数并且小于 n;
第二选择单元, 用于若当前负载大于或等于预设的负载门限, 则选择第二 分发处理单元作为候选分发处理单元;
第二转发单元, 用于将所述 n个服务请求转发至所述候选分发处理单元。 所述装置还包括:
第二判断单元, 用于判断是否将所述 n个服务请求中除 m个服务请求以外 的服务请求转发至所述第一选择单元选择的候选分发处理单元, 若是, 则将所 述 n个服务请求中除 m个服务请求以外的服务请求转发至所述第一选择单元选 择的候选分发处理单元, 否则, 所述第二判断单元通知所述第一选择单元重新 选择候选分发处理单元。 第三判断单元, 用于判断是否将所述 n个服务请求转发至所述第二选择单 元选择的候选分发处理单元, 若是, 则将所述 n个服务请求转发至所述第一选 择单元选择的候选分发处理单元, 否则, 所述第三判断单元通知所述第二选择 单元重新选择候选分发处理单元。
请参考图 3 , 为本发明提供的装置实施例结构图, 可以包括:
第一判断单元 301 , 用于当接收到 n个服务请求时, 判断此次周期内, 当 前负载是否小于预设的负载门限, n为自然数;
选择单元 302, 用于若所述第一判断单元 301判断出当前负载小于预设的 负载门限, 并且所述装置容许对所述 n个服务请求中的 m个服务请求执行操 作, 或者, 若当前负载大于等于预设的负载门限, 选择候选分发处理单元, m 为自然数并且小于 n;
转发单元 303 ,用于将所述 n个服务请求中除 m个服务请求以外的服务请 求, 或者, 所述 n个服务请求转发至所述候选分发处理单元。
结合步骤 201至步骤 208, 选择单元 303可以包括:
确定单元, 用于根据接收到的负载更新消息, 确定负载小于各自负载门限 值的 k个分发处理单元, k为自然数;
所述选择单元 302在所述确定单元确定的 k个分发处理单元中,选择负载 为最小值的分发处理单元作为候选分发处理单元。
转发单元 303可以包括:
第二判断单元, 用于判断是否将所述 n个服务请求, 或者, 所述 n个服务 请求中除 m个服务请求以外的服务请求, 转发至所述选择单元当前选择的候 选分发处理单元;
若所述第二判断单元判断出将所述 n个服务请求,或者, 所述 n个服务请 求中除 m个服务请求以外的服务请求, 转发至所述选择单元当前选择的候选 分发处理单元, 则转发单元将所述 n个服务请求, 或者, 所述 n个服务请求中 除 m个服务请求以外的服务请求转发至当前选择的候选分发处理单元; 否则, 所述第二判断单元通知所述选择单元重新选择候选分发处理单元。
其中, 第二判断单元可以包括:
计算单元, 用于计算第一数值以及第二数值, 所述第一数值是当前选择的 候选分发处理单元实际可接受的服务请求个数,所述第二数值是负载不低于各 自负载门限的分发处理单元将向所述当前选择的候选分发处理单元转发服务 请求的个数;
比较单元,用于比较所述计算单元计算的所述第一数值以及所述第二数值 的大小;
所述第二判断单元根据所述比较单元进行的比较,判断是否将所述 n个服 务请求, 或者, 所述 n个服务请求中除 m个服务请求以外的服务请求转发至 当前选择的候选分发处理单元。
下面结合步骤 201至步骤 208, 对本发明装置实施例提供的各单元执行的 操作进行详细说明。
当第一 DPU接收到 n个服务请求时,第一 PDU的第一判断单元 301判断在本 周期内, 当前负载是否小于预设的负载门限, n为自然数。 若第一判断单元 301 判断出第一 DPU的当前负载小于预设的负载门限,并且第一 DPU可以处理全部 n个服务请求, 或者第一 DPU可以处理其中的 m个服务请求, 则第一 DPU对全 部 n个服务请求或者 m个服务请求进行处理。
当第一 DPU只能处理 m个服务请求, 或者, 第一 DPU的第一判断单元 301 判断出本周期内, 当前负载大于等于预设的负载门限, 则第一 DPU的选择单元 302在 4个 DPU中选择候选 DPU。选择单元 302进行选择具体为: 确定单元确定 4 个 DPU中, 负载小于预设的负载门限的 DPU, 并从中选择负载最小的 DPU作为 当前选择的候选 DPU。
计算单元根据公式(1 )计算 A1 , 根据公式(2 )计算 T1 , 比较单元比较 A1与 T1的大小, 当 T1小于等于 A1时, 转发单元 303将 n个服务请求或者除 m个 服务请求以外的服务请求转发至当前选择的候选 DPU。 当 T1大于 A1时, 并且, 任取随机数小于步骤 207中计算出的概率值, 则选择单元 302重新选择候选 DPU。 当 T1大于 A1时, 并且任取随机数大于等于步骤 207中计算出的概率值, 则转发单元 303将 n个服务请求或者除 m个服务请求以外的服务请求转发至当 前选择的候选 DPU。 以根据需要增加 DPU的个数, 无需考虑某个 DPU的处理能力, 容易扩展。 若某 个 DPU发生故障, 不会对其它 DPU造成影响, 可靠性较强。
以上对本发明装置实施例进行了详细说明, 结合方法具体实例, 装置实施 例中的 DPU可以为 CSPU , 负载可以是 ISRN , 下面结合方法具体实例中, 步 骤 A1至步骤 A8对本发明装置实施例提供的各单元执行的操作进行详细说明。
当第一 CSPU接收到 n个服务请求时, 第一 CSDU的第一判断单元 301判断 在本周期内, 当前 ISNR个数是否小于预设的 ISNR门限, n为自然数。 若第一判 断单元 301判断出第一 CSPU的当前 ISNR个数小于预设的 ISNR门限, 并且第一 CSPU可以处理全部 n个服务请求, 或者第一 CSPU可以处理其中的 m个服务请 求, 则第一 CSPU对全部 n个服务请求或者 m个服务请求进行处理。
当第一 CSPU只能处理 m个服务请求,或者,第一 CSPU的第一判断单元 301 判断出本周期内, 当前负载大于等于预设的 ISNR门限, 则第一 CSPU的选择单 元 302在 4个 CSPU中选择候选 CSPU。 选择单元 302进行选择具体为: 确定单元 确定 4个 CSPU中, ISNR个数小于预设的 ISNR门限的 CSPU, 并从中选择 ISNR 个数最小的 CSPU作为当前选择的候选 CSPU。
计算单元根据公式(3 )计算 A2, 根据公式(4 )计算 T2, 比较单元比较 A2与 T2的大小, 当 T2小于等于 A2时, 转发单元 303将 n个服务请求或者除 m个 服务请求以外的服务请求转发至当前选择的候选 CSPU。当 T2大于 A2时,并且, 任取随机数小于步骤 A7中计算出的概率值, 则选择单元 302重新选择候选 CSPU。 当 T2大于 A2时, 并且任取随机数大于等于步骤 A7中计算出的概率值, 则转发单元 303将 n个服务请求或者除 m个服务请求以外的服务请求转发至当 前选择的候选 CSPU。 以根据需要增加 CSPU的个数时, 无需考虑某个 CSPU的处理能力, 容易扩展。 若某个 CSPU发生故障, 不会对其它 CSPU造成影响, 可靠性较强。
本发明实施例还提供了一种负载均衡系统, 包括:
q个分发处理单元, 所述 q个分发处理单元用于相互上报负载更新消息, 当所述 q个分发处理单元中的第一分发处理单元容许对接收到的 n个服务请求 执行操作时, 所述第一分发处理单元对所述 n个服务请求执行操作; 或者, 当所述第一分发处理单元容许对所述 n个服务请求中的 m个服务 请求执行操作时, 所述第一分发处理单元对所述 n个服务请求中的 m个服务 请求执行操作;
当所述第一分发处理单元拒绝对所述 n个服务请求执行操作时,根据所述 负载更新消息选择候选分发处理单元,将所述 n个服务请求转发至所述候选分 发处理单元;
或者, 当所述第一分发处理单元允许对 n个服务请求中的 m个服务请求 执行操作时,根据所述负载更新消息选择候选分发处理单元,将所述 n个服务 请求中除 m个服务请求以外的服务请求转发至所述候选分发处理单元;
其中, q为大于 1的自然数, m、 n为自然数, 且 m小于 n。
本发明实施例还提供了一种负载均衡系统, 参见图 4, 包括:
q个分发处理单元(包括: 第一分发处理单元 401-1、 第二分发处理单元
401-2、 第三分发处理单元 401-3 第 q分发处理单元 401-q ), 所述 q个分 发处理单元用于相互上报负载更新消息,当所述 q个分发处理单元中的第一分 发处理单元容许自身对接收到的 n个服务请求执行操作时,或者, 当所述第一 分发处理单元容许自身对所述 n个服务请求中的 m个服务请求执行操作时, 所述第一分发处理单元对所述 n个服务请求或者 m个服务请求执行操作; 当所述第一分发处理单元拒绝对所述 n个服务请求或者允许对 n个服务请 求中的 m个服务请求执行操作时, 根据所述负载更新消息选择候选分发处理 单元, 将所述 n个服务请求, 或者所述 n个服务请求中除 m个服务请求以外 的服务请求转发至所述候选分发处理单元;
其中, q为大于 1的自然数, m、 n为自然数, 且 m小于 n。
假设 q等于 4, 各分发处理单元执行的操作与方法实施例相同、 当分发处理 单元具体为 CSPU, 负载具体为 ISNR时, 各分发处理单元执行的操作方法具体 实例相同。 具体请参见方法实施例以及方法具体实例的描述。
通过本发明实施例提供的负载均衡方法、装置和系统,各分发处理单元均 可以执行分发与处理操作, 可以根据需要增加分发处理单元的个数, 无需考虑 某个分发处理单元的处理能力, 容易扩展。 若某个分发处理单元发生故障, 不 会对其它分发处理单元造成影响, 可靠性较强。
最后, 还需要说明的是, 在本文中, 诸如第一和第二等之类的关系术 语仅仅用来将一个实体或者操作与另一个实体或操作区分开来, 而不一定 要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。 而 且, 术语"包括"、 "包含"或者其任何其他变体意在涵盖非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者设备不仅包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过程、 方法、 物品或者设备所固有的要素。 在没有更多限制的情况下, 由语句"包括一 个 ...... "限定的要素, 并不排除在包括所述要素的过程、 方法、 物品或者设 备中还存在另外的相同要素。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到本 发明可借助软件加必需的硬件平台的方式来实现, 当然也可以全部通过硬 件来实施, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发 明的技术方案对背景技术做出贡献的全部或者部分可以以软件产品的形式 体现出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁 碟、 光盘等, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例或者实施例的某些部分 所述的方法。
以上对本发明所提供的一种负载均衡的方法、 装置及系统进行了详细 上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对 于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范 围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限 制。

Claims

权 利 要 求
1、 一种负载均衡的方法, 其特征在于, 包括:
当接收到 n个服务请求时,第一分发处理单元判断当前负载是否小于预设 的负载门限, 所述 n为自然数;
若当前负载小于预设的负载门限,并且所述第一分发处理单元容许对所述 n个服务请求中的 m个服务请求执行操作,则选择第二分发处理单元作为候选 分发处理单元, 将所述 n个服务请求中除 m个服务请求以外的服务请求转发 至所述候选分发处理单元, 其中所述 m为自然数并且小于 n;
或者, 若当前负载大于或等于预设的负载门限, 则选择第二分发处理单元 作为候选分发处理单元, 将所述 n个服务请求转发至所述候选分发处理单元。
2、 根据权利要求 1所述的方法, 其特征在于, 所述选择第二分发处理单 元作为候选分发处理单元包括:
所述第一分发处理单元接收除所述第一分发处理单元外的其他分发处理 单元发送的负载更新消息;
根据所述负载更新消息确定负载小于各自负载门限值的 k个分发处理单 元, k为自然数;
在所述 k个分发处理单元中,选择负载为最小值的第二分发处理单元作为 候选分发处理单元。
3、 根据权利要求 1所述的方法, 其特征在于, 在将所述 n个服务请求中 除 m个服务请求以外的服务请求转发至所述候选分发处理单元之前, 所述方 法还包括:
A1、 判断是否将所述 n个服务请求中除 m个服务请求以外的服务请求转 发至候选分发处理单元;
若判断要将所述 n个服务请求中除 m个服务请求以外的服务请求转发至 候选分发处理单元, 则将所述 n个服务请求中除 m个服务请求以外的服务请 求转发至所述候选分发处理单元; 若判断不将所述 n个服务请求中除 m个服 务请求以外的服务请求转发至候选分发处理单元,则重新选择第三分发处理单 元作为候选分发处理单元, 并返回步骤 Al。
4、 根据权利要求 3所述的方法, 其特征在于, 步骤 A1包括: 计算第一数值以及第二数值,所述第一数值是当前选择的候选分发处理单 元实际可接受的服务请求个数,所述第二数值是负载不小于各自负载门限的分 发处理单元将向所述选择的候选分发处理单元转发服务请求的个数;比较所述 第一数值与所述第二数值的大小;
若所述第二数值大于所述第一数值, 且需要重新选择候选分发处理单元, 则判断不将所述 n个服务请求中除 m个服务请求以外的服务请求转发至候选 分发处理单元;
若所述第二数值大于所述第一数值, 且不需要重新选择候选分发处理单 元, 则判断要将所述 n个服务请求中除 m个服务请求以外的服务请求转发至 候选分发处理单元;
若所述第二数值小于等于所述第一数值,则判断要将所述 n个服务请求中 除 m个服务请求以外的服务请求转发至候选分发处理单元。
5、 根据权利要求 4所述的方法, 其特征在于, 若所述第二数值大于所述 第一数值, 且需要重新选择候选分发处理单元, 则判断不将所述 n个服务请求 中除 m个服务请求以外的服务请求转发至候选分发处理单元之后进一步包括: 将所述第二处理单元的负载更改为第二分发处理单元的负载门限。
6、 根据权利要求 1所述的方法, 其特征在于, 在将所述 n个服务请求转 发至所述候选分发处理单元之前, 所述方法还包括:
Bl、 判断是否将所述 n个服务请求转发至所述候选分发处理单元; 若判断要将所述 n个服务请求转发至所述候选分发处理单元, 则将所述 n 个服务请求转发至所述候选分发处理单元,若判断不将所述 n个服务请求转发 至所述候选分发处理单元,则重新选择第三分发处理单元作为候选分发处理单 元, 并返回步骤 Bl。
7、 根据权利要求 6所述的方法, 其特征在于, 步骤 B1包括:
计算第一数值以及第二数值,所述第一数值是当前选择的候选分发处理单 元实际可接受的服务请求个数,所述第二数值是负载不小于各自负载门限的分 发处理单元将向所述选择的候选分发处理单元转发服务请求的个数; 比较所述第一数值与所述第二数值的大小;
若所述第二数值大于所述第一数值, 且需要重新选择候选分发处理单元, 则判断不将所述 n个服务请求转发至所述候选分发处理单元;
若所述第二数值大于所述第一数值, 且不需要重新选择候选分发处理单 元, 则判断要将所述 n个服务请求转发至候选分发处理单元;
若所述第二数值小于等于所述第一数值,则判断要将所述 n个服务请求转 发至候选分发处理单元。
8、 根据权利要求 7所述的方法, 其特征在于, 若所述第二数值大于所述 第一数值, 且需要重新选择候选分发处理单元, 则判断不将所述 n个服务请求 转发至所述候选分发处理单元之后进一步包括:
将所述第二处理单元的负载更改为第二分发处理单元的负载门限。
9、 根据权利要求 4或 7所述的方法, 其特征在于, 计算第一数值包括: 根据所述候选分发处理单元的负载在不大于其负载门限的情况下,可以接 受的服务请求的个数,以及所述候选分发处理单元向所述第一分发处理单元上 报的服务请求个数, 计算所述第一数值;
计算第二数值包括:
根据负载不小于各自负载门限的分发处理单元各自的负载以及负载门限、 所述第一分发处理单元上一周期的负载、所述第一分发处理单元的负载门限计 算所述第二数值。
10、 一种负载均衡的装置, 其特征在于, 包括:
第一判断单元, 用于当接收到 n个服务请求时, 判断当前负载是否小于预 设的负载门限, 所述 n为自然数;
第一选择单元, 用于若当前负载小于预设的负载门限, 并且容许对所述 n 个服务请求中的 m个服务请求执行操作, 则选择第二分发处理单元作为候选 分发处理单元;
第一转发单元, 用于将所述 n个服务请求中除 m个服务请求以外的服务 请求转发至所述候选分发处理单元, 其中所述 m为自然数并且小于 n; 第二选择单元, 用于若当前负载大于或等于预设的负载门限, 则选择第二 分发处理单元作为候选分发处理单元;
第二转发单元, 用于将所述 n个服务请求转发至所述候选分发处理单元。
11、 根据权利要求 10所述的装置, 其特征在于, 所述装置还包括: 第二判断单元, 用于判断是否将所述 n个服务请求中除 m个服务请求以 外的服务请求转发至所述第一选择单元选择的候选分发处理单元, 若是, 则将 所述 n个服务请求中除 m个服务请求以外的服务请求转发至所述第一选择单 元选择的候选分发处理单元, 否则, 所述第二判断单元通知所述第一选择单元 重新选择候选分发处理单元。
12、 根据权利要求 10所述的装置, 其特征在于, 所述装置还包括: 第三判断单元,用于判断是否将所述 n个服务请求转发至所述第二选择单 元选择的候选分发处理单元, 若是, 则将所述 n个服务请求转发至所述第一选 择单元选择的候选分发处理单元, 否则, 所述第三判断单元通知所述第二选择 单元重新选择候选分发处理单元。
13、 一种负载均衡的系统, 其特征在于, 包括:
q个分发处理单元, 所述 q个分发处理单元用于相互上报负载更新消息, 当所述 q个分发处理单元中的第一分发处理单元容许对接收到的 n个服务请求 执行操作时, 所述第一分发处理单元对所述 n个服务请求执行操作;
或者, 当所述第一分发处理单元容许对所述 n个服务请求中的 m个服务 请求执行操作时, 所述第一分发处理单元对所述 n个服务请求中的 m个服务 请求执行操作;
当所述第一分发处理单元拒绝对所述 n个服务请求执行操作时,根据所述 负载更新消息选择候选分发处理单元,将所述 n个服务请求转发至所述候选分 发处理单元;
或者, 当所述第一分发处理单元允许对 n个服务请求中的 m个服务请求 执行操作时,根据所述负载更新消息选择候选分发处理单元,将所述 n个服务 请求中除 m个服务请求以外的服务请求转发至所述候选分发处理单元;
其中, q为大于 1的自然数, m、 n为自然数, 且 m小于 n。
PCT/CN2009/074666 2008-10-29 2009-10-28 一种负载均衡的方法、装置及系统 WO2010048886A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008102021204A CN101730145B (zh) 2008-10-29 2008-10-29 一种负载均衡的方法、装置及系统
CN200810202120.4 2008-10-29

Publications (1)

Publication Number Publication Date
WO2010048886A1 true WO2010048886A1 (zh) 2010-05-06

Family

ID=42128267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074666 WO2010048886A1 (zh) 2008-10-29 2009-10-28 一种负载均衡的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN101730145B (zh)
WO (1) WO2010048886A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404786B (zh) * 2010-09-14 2015-07-01 中国移动通信集团江苏有限公司 一种控制业务阻塞的方法及装置
CN102143587A (zh) * 2010-12-31 2011-08-03 华为技术有限公司 资源配置方法及设备
CN102209047B (zh) * 2011-05-24 2012-08-22 苏州阔地网络科技有限公司 一种信息共享的即时通讯系统及方法
CN104301243B (zh) * 2014-09-22 2018-06-15 华为技术有限公司 一种负载控制方法和装置
CN106358245B (zh) * 2016-11-07 2019-12-27 北京佰才邦技术有限公司 移动边缘计算应用负荷分担的方法和控制器
CN114201421B (zh) * 2022-02-17 2022-05-10 苏州浪潮智能科技有限公司 一种数据流处理方法、存储控制节点及可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119140A (zh) * 2006-08-03 2008-02-06 鼎桥通信技术有限公司 一种分层小区结构中的负载平衡方法与装置
CN101217558A (zh) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 一种业务中间件服务负载均衡方法
CN101541041A (zh) * 2009-04-23 2009-09-23 华为技术有限公司 负载分担方法、装置及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119140A (zh) * 2006-08-03 2008-02-06 鼎桥通信技术有限公司 一种分层小区结构中的负载平衡方法与装置
CN101217558A (zh) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 一种业务中间件服务负载均衡方法
CN101541041A (zh) * 2009-04-23 2009-09-23 华为技术有限公司 负载分担方法、装置及系统

Also Published As

Publication number Publication date
CN101730145B (zh) 2012-07-25
CN101730145A (zh) 2010-06-09

Similar Documents

Publication Publication Date Title
TW424377B (en) Method and apparatus for dynamically adapting a connection state in mobile communications system
KR101199054B1 (ko) 실시간 네트워크 자원 가용성에 기반한 적응형 동적 호 셋업을 위한 방법 및 장치
JP4322924B2 (ja) An間hrpdハード・ハンドオフを実行するための方法及び装置
WO2010048886A1 (zh) 一种负载均衡的方法、装置及系统
JP4567472B2 (ja) 定額制ユーザのデータ通信規制方法およびデータ通信規制制御装置
JP4904392B2 (ja) アクセス端末装置にアクセス情報を提供するための方法
EP1388266B1 (en) Method for protecting against overload in a mobile communication network
JP4841780B2 (ja) パケット交換通信ネットワークにおけるネットワーク制御ハンドオーバのための方法と装置
EP1254580B1 (en) Method and system for exchange of multicall capabilities between terminal and network
KR100425256B1 (ko) 패킷교환무선채널정체제어방법및장치
KR100533206B1 (ko) 이동국, 및 긴급호 관리 장치, 긴급호 관리 시스템 및긴급호 관리 방법
JP2008503989A (ja) 待ち時間を低減するグループ通信要求のために持続値を利用した無線通信システム
WO2015007099A1 (zh) 数据包传输方法及装置
JPH11513868A (ja) パケット交換無線チャネルトラフィック監視
US9392500B2 (en) Method, apparatus, and system for processing eMPS in a CSFB mechanism
WO2006133630A1 (fr) Procede de selection d'un noeud de prise en charge selon un etat de charge
CN104918283A (zh) 一种拥塞控制方法及设备
WO2013159677A1 (zh) 一种发现接入点的方法及站点、接入点
WO2009092187A1 (zh) 生成蜂窝网络的用户移动性模型的方法及装置
JP7066734B2 (ja) 制御プレーン接続管理方法および装置
WO2008011779A1 (fr) Procédé et dispositif d'ajustement de canaux de messagerie et de canaux d'accès d'une interface hertzienne dans un système de communication
WO2022152157A1 (zh) 一种通信方法及装置
JP2022177077A (ja) 通信端末、及びプログラム
JP5466240B2 (ja) 効率よい接続のための推奨システム、推奨方法、サービスサーバー、終端端末、接続方法および記憶媒体
WO2007090328A1 (fr) Procédé d'attribution de paramètres de liaison pour une liaison

Legal Events

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

Ref document number: 09823078

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09823078

Country of ref document: EP

Kind code of ref document: A1