WO2011020363A1 - Method and system for realizing load balance and diameter client - Google Patents

Method and system for realizing load balance and diameter client Download PDF

Info

Publication number
WO2011020363A1
WO2011020363A1 PCT/CN2010/073675 CN2010073675W WO2011020363A1 WO 2011020363 A1 WO2011020363 A1 WO 2011020363A1 CN 2010073675 W CN2010073675 W CN 2010073675W WO 2011020363 A1 WO2011020363 A1 WO 2011020363A1
Authority
WO
WIPO (PCT)
Prior art keywords
diameter
server
client
threshold
preset
Prior art date
Application number
PCT/CN2010/073675
Other languages
French (fr)
Chinese (zh)
Inventor
甘斌
宋大猛
陈刚
徐键
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011020363A1 publication Critical patent/WO2011020363A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • H04L12/2863Arrangements for combining access network resources elements, e.g. channel bonding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • H04L47/726Reserving resources in multiple paths to be used simultaneously
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Definitions

  • the main object of the present invention is to provide a method and system for implementing load balancing and a Diameter client. Solve the above problem.
  • a load balancing implementation method including: in a process of communicating between a Diameter client and a first Diameter server, if it is determined that a load of the first Diameter server exceeds The preset first threshold, the Diameter client sends a partial request message in all the request messages to be sent to the second Diameter server according to a predetermined ratio.
  • the Diameter client 302 may again send all Diameter request messages to be sent to the Diameter server 304.
  • the Diameter client 302 monitors the communication traffic with the Diameter server 304 through a preset traffic threshold. If the traffic exceeds a preset traffic threshold, the load of the Diameter server 304 is considered to exceed the pre-load. Threshold, need to fail over; or The Diameter client 302 receives the error response returned by the Diameter server 304, and the response carries the information of the DIAMETER TOO BUSY. The load of the Diameter server 304 is also considered to exceed the threshold, and a failover is required.
  • the Diameter client All the request messages to be sent when the terminal determines that the load of the first Diameter server is too large. A part of the request message is sent to the second Diameter server, thereby flexibly implementing load sharing and improving resource utilization.
  • the failover is avoided only in the event of a failure of the first Diameter server, which reduces the possibility of message transmission failure.
  • the load balancing implementation method according to the embodiment of the present invention does not affect the original failover/failback function, that is, the failover and fault backtracking operations can still be performed when the first Diameter server fails.
  • a Diameter client is provided.
  • Figure 5 is a Diameter client in accordance with an embodiment of the present invention.
  • the Diameter client includes: a receiving module 502, configured to receive a response message from a first Diameter server; and a detecting module 504, configured to detect a communication between a Diameter client and a first Diameter server Whether the traffic exceeds a preset threshold, where the threshold may be preset according to an actual situation, for example, the traffic threshold is 80 Mbps; the equalization module 506 is configured to: when the response message carries information indicating that the server is busy, or in the detection module 504: When detecting that the communication traffic between the Diameter client and the first Diameter server exceeds the foregoing preset threshold, send a partial request message in all request messages to be sent to the second Diameter server according to a predetermined ratio, where the predetermined The ratio can be set according to the actual situation, for example, one-half.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method and system for realizing load balance and a Diameter client are provided by the invention, therein, the method for realizing load balance includes: during the communication between the Diameter client and a first Diameter server, if it is determined that the load of the first Diameter server exceeds a pre-set first threshold, the Diameter client transmits the partial request messages of all the request messages need to be transmitted to a second Diameter server according to a predetermined rate. When the Diameter client has determined the first Diameter server is overload, it transmits the partial request messages of all the request messages to the second Diameter server, accordingly, the problem is resolved that the resource utilization ratio is not high resulted from a method for realizing load balance in the art, the load balance is realized flexibly and the resource utilization ratio is enhanced.

Description

负载均衡的实现方法和系统以及 Diameter客户端 技术领域 本发明涉及通信领域, 具体而言, 涉及一种负载均衡的实现方法和系统 以及 Diameter客户端。 背景技术 自网络通信技术诞生以来, 认证、 ·ί受权及计费 (AAA, Authentication, Authorization、 Accounting ) 体制已成为通信网络运营的基石出。 目前,随着第三代移动通信系统向基于全 IP的网络架构的演进, Diameter 协议已成为新一代的 AAA技术, 且由于 Diameter协议具有强大的可扩展性 和安全性而备受关注, 国际电信联盟 (ITU )、 第三代合作伙伴计划 (3GPP, 3rd Generation Partnership Project ) 和第三代合作伙伴计划 2 ( 3GPP2 ) 等国 际标准组织已正式将 Diameter协议作为下一代网络 ( NGN, Next Generation Network ),宽带码分多址( WCDMA, Wideband CDMA )和码分多址( CDMA, Code Division Multiple Access ) 2000等未来通信网络的首选 AAA协议。 越来越多的运营商选择 Diameter协议作为 AAA首选协议。 Diameter协 议相对于之前的 Radius 协议具有更好的安全性和扩展性。 统一的 Diameter 接口增加了不同厂商之间设备的互通性。 当越来越多的传统运营商转向使用 Diameter协议的时候, 不可避免的出 现一种新的需求, 就是进行认证, 授权, 计费等消息越来越多, 出现了负载 均衡的需求。这种负载均衡不仅仅体现在客户端, 更多的是体现在服务器端。 Diameter服务器可能需要处理多个客户端发送的 Diameter消息。 现有技术实现负载均衡的方法比较多, 通常的做法是通过人为控制或者 操作维护配置来实现一定程度的负载均衡。 例如通过配置一定的分配策略在 不同服务器之间实现负载均衡。 这些方法普遍存在需要人工千涉, 并且即使在流量根本不大的情况下也 会按照既定策略强制进行负荷分担, 造成对端服务器的不必要的处理负担, 并使得资源利用率不高。 此外, 由于 Diameter协议相比 Radius协议明确提出了 Failover/failbackThe present invention relates to the field of communications, and in particular to a method and system for implementing load balancing and a Diameter client. BACKGROUND Since the birth of network communication technology, authentication, authentication, and accounting (AAA, Authentication, Authorization, Accounting) systems have become the cornerstone of communication network operations. At present, with the evolution of the third-generation mobile communication system to the all-IP-based network architecture, the Diameter protocol has become a new generation of AAA technology, and the Diameter protocol has attracted much attention due to its powerful scalability and security. International standards organizations such as the Alliance (ITU), the 3rd Generation Partnership Project (3GPP), and the 3rd Generation Partnership Project 2 (3GPP2) have officially adopted the Diameter protocol as the Next Generation Network (NGN). The preferred AAA protocol for future communication networks such as Wideband Code Division Multiple Access (CDMA) and Code Division Multiple Access (CDMA). More and more operators choose the Diameter protocol as the AAA preferred protocol. The Diameter protocol has better security and scalability than the previous Radius protocol. The unified Diameter interface increases the interoperability of devices between different vendors. As more and more traditional operators turn to the Diameter protocol, there is an inevitable need for a new demand for authentication, authorization, billing, etc., and load balancing needs. This load balancing is not only reflected in the client, but more on the server side. The Diameter server may need to process Diameter messages sent by multiple clients. There are many methods for implementing load balancing in the prior art. The usual practice is to achieve a certain degree of load balancing through human control or operation and maintenance configuration. For example, load balancing is implemented between different servers by configuring a certain allocation policy. These methods are ubiquitous and require manual intervention, and even if the traffic is not large at all, the load sharing is forced according to the established policy, which causes unnecessary processing load on the peer server and makes resource utilization low. In addition, the Diameter protocol clearly proposes Failover/failback compared to the Radius protocol.
(故障切换 /故障回溯)机制。 协议中描述的故障切换机制是指当本节点检测 到传输失败时, 如果可能的话, 所有未收到响应的请求消息会被重新发送至 备选代理。 当本节点检测到原传输恢复, 后续消息将被发送至该对等端, 此 过程称为故障回溯。 图 1是根据现有技术的 Failover/failback处理流程图。 如图 1所示, 发送 节点发送请求消息时发送故障切换的流程包括以下步骤: 步骤 S 102: 发送节点需要发送消息时, 根据请求消息中的目的域名进行 路由分析, 获得下一跳节点对应的链路; 步骤 S 104: 发送节点将请求消息发往下一跳, 然后将请求消息緩存到本 地请求消息队列; 步骤 S 106: 发送节点定时检测链路状态, 如果链路状态正常, 例如没有 发生中断故障, 则转至步骤 S 112, 否则, 转至步骤 108, 以便启动故障切换; 步骤 S 108: 发送节点扫描消息队列, 通过目的域名重新进行路由分析, 获得备选对等端对应的链路; 步骤 S 110, 发送节点发送消息到备选对等端; 步骤 S 112: 发送节点收到请求消息对应的响应消息, 将该请求消息从本 地緩存的消息队列中移出。 启动故障切换后, 一旦主用对等端恢复正常, 则后续消息发往主用对等 端。 上述现有技术中, 启动故障切换的时机必须是主用月艮务器发生故障了, 例如链路中断, 也就是说只有当故障发生的时候才进行故障切换操作。 这种 负载均衡的实现方法往往会造成一条链路及服务器超负荷运行, 而另一条链 路及服务器却得不到充分利用, 造成资源利用不足。 针对现有技术中负载均衡实现方法造成的资源利用率不高的问题, 目前 尚未提出有效的解决方案。 发明内容 针对现有技术中负载均衡实现方法造成的资源利用率不高的问题而提出 本发明, 为此, 本发明的主要目的在于提供一种负载均衡的实现方法和系统 以及 Diameter客户端, 以解决上述问题。 为了实现上述目的, 根据本发明的一个方面, 提供了一种负载均衡的实 现方法, 其包括: 在 Diameter客户端与第一 Diameter服务器进行通信的过程 中,如果确定出第一 Diameter服务器的负荷超过预设的第一阈值,则 Diameter 客户端按照预定的比例将要发送的全部请求消息中的部分请求消息发送给第 二 Diameter月艮务器。 根据本发明的另一个方面, 提供了一种 Diameter客户端, 其包括: 接收 模块, 用于接收来自第一 Diameter服务器的响应消息; 检测模块, 用于检测 Diameter 客户端与第一 Diameter月艮务器之间的通信流量是否超过预设的阈 值; 均衡模块, 用于在响应消息携带有指示服务器忙碌的信息时, 或在检测 模块检测出 Diameter客户端与第一 Diameter服务器之间的通信流量超过预设 的阈值时, 按照预定的比例将要发送的全部请求消息中的部分请求消息发送 给第二 Diameter服务器。 根据本发明的又一个方面, 提供了一种负载均衡的实现系统, 其包括 Diameter客户端、 第一 Diameter月艮务器和第二 Diameter月艮务器。 上述 Diameter客户端包括: 第一接收模块, 用于接收来自第一 Diameter 服务器的响应消息;第一检测模块,用于检测 Diameter客户端与第一 Diameter 服务器之间的通信流量是否超过预设的第一阈值; 均衡模块, 用于在响应消 息携带有指示服务器忙碌的信息时,或在第一检测模块检测出 Diameter客户 端与第一 Diameter服务器之间的通信流量超过预设的第一阈值时,按照预定 的比例将要发送的全部请求消息中的部分请求消息发送给第二 Diameter服务 器。 上述第一 Diameter服务器包括: 第二接收模块, 用于接收来自 Diameter 客户端的请求消息; 第二检测模块, 用于检测自身的开销是否超过预设的第 二阈值; 发送模块, 用于在第二检测模块检测出自身的开销超过预设的第二 阈值时, 向 Diameter客户端发送携带有指示服务器忙碌的信息的响应消息。 根据本发明, Diameter客户端在确定出第一 Diameter服务器的负荷过大 时将要发送的全部请求消息中的部分请求消息发送给第二 Diameter服务器, 从而灵活地实现负荷分担, 提高了资源利用率。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的 不当限定。 在附图中: 图 1是才艮据现有技术的 Failover/failback处理的流程图; 图 2是 居本发明实施例的负载均衡的实现方法的流程图; 图 3是根据本发明实施例的负载均衡的实现系统的示意图; 图 4是 居本发明实施例的负载均衡的实现方法的优选流程图; 图 5是根据本发明实施例的 Diameter客户端; 图 6是图 3所示的负载均衡实现系统的结构图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 考虑到现有技术中负载均衡实现方法造成的资源利用率不高的问题, 根 据本发明, Diameter客户端在确定出第一 Diameter服务器的负荷过大时将要 发送的全部请求消息中的部分请求消息发送给第二 Diameter服务器,从而灵 活地实现负荷分担, 提高了资源利用率。 方法实施例 根据本发明, 提供了一种负载均衡的实现方法。 图 2是 居本发明的负载均衡的实现方法的流程图。 如图 2所示, 该方 法包括如下的步骤 S202至步骤 S206: 步骤 S202 , Diameter客户端与第一 Diameter服务器进行通信。 例如, Diameter客户端将所有的请求消息发送给第一 Diameter服务器。 步骤 S204 , 对第一 Diameter 服务器的负荷情况进行判断。 如果第一 Diameter服务器的负荷超过预设的阈值, 则转至步骤 S206; 否则, 转至步骤 S202, 这里, 上述阈值可以 居实际情况来预先设定。 可以通过两种方式对第一 Diameter 服务器的负荷情况进行判断: 1 )(failover/failback) mechanism. The failover mechanism described in the protocol means that when the node detects a transmission failure, if possible, all request messages that do not receive a response are resent to the alternate agent. When the node detects the original transmission recovery, subsequent messages will be sent to the peer. This process is called fault backtracking. 1 is a flow chart of a Failover/failback process according to the prior art. As shown in FIG. 1 , the process of sending a failover when a sending node sends a request message includes the following steps: Step S102: When a sending node needs to send a message, perform routing analysis according to the destination domain name in the request message, and obtain a corresponding next hop node. Link S104: The sending node sends the request message to the next hop, and then caches the request message to the local request message queue. Step S106: The sending node periodically detects the link status, if the link status is normal, for example, does not occur. If the fault is interrupted, the process goes to step S112. Otherwise, the process goes to step 108 to start the failover. Step S108: The sending node scans the message queue, and performs route analysis again through the destination domain name to obtain the link corresponding to the candidate peer. Step S110: The sending node sends a message to the candidate peer. Step S112: The sending node receives the response message corresponding to the request message, and removes the request message from the locally cached message queue. After the failover is initiated, once the primary peer returns to normal, subsequent messages are sent to the primary peer. In the above prior art, the timing of initiating the failover must be a failure of the primary server, such as a link interruption, that is, the failover operation is performed only when the failure occurs. This kind of load balancing implementation often causes one link and server to be overloaded, while the other link and server are not fully utilized, resulting in insufficient resource utilization. In view of the problem that the resource utilization caused by the load balancing implementation method in the prior art is not high, an effective solution has not been proposed yet. SUMMARY OF THE INVENTION The present invention has been made in view of the problem of low resource utilization caused by the load balancing implementation method in the prior art. To this end, the main object of the present invention is to provide a method and system for implementing load balancing and a Diameter client. Solve the above problem. In order to achieve the above object, according to an aspect of the present invention, a load balancing implementation method is provided, including: in a process of communicating between a Diameter client and a first Diameter server, if it is determined that a load of the first Diameter server exceeds The preset first threshold, the Diameter client sends a partial request message in all the request messages to be sent to the second Diameter server according to a predetermined ratio. According to another aspect of the present invention, a Diameter client is provided, including: a receiving module, configured to receive a response message from a first Diameter server; and a detecting module, configured to detect a Diameter client and a first Diameter client Whether the communication traffic between the devices exceeds a preset threshold; the equalization module is configured to: when the response message carries information indicating that the server is busy, or when the detecting module detects that the communication traffic between the Diameter client and the first Diameter server exceeds When the threshold is preset, part of the request messages in all the request messages to be sent are sent to the second Diameter server according to a predetermined ratio. According to still another aspect of the present invention, a load balancing implementation system is provided, including a Diameter client, a first Diameter server, and a second Diameter server. The above-mentioned Diameter client includes: a first receiving module, configured to receive a response message from the first Diameter server; and a first detecting module, configured to detect whether the communication traffic between the Diameter client and the first Diameter server exceeds a preset number a thresholding module, configured to: when the response message carries information indicating that the server is busy, or when the first detecting module detects that the communication traffic between the Diameter client and the first Diameter server exceeds a preset first threshold, A part of the request messages in all the request messages to be sent are sent to the second Diameter server according to a predetermined ratio. The first Diameter server includes: a second receiving module, configured to receive a request message from a Diameter client; a second detecting module, configured to detect whether an overhead of the device exceeds a preset second threshold; and a sending module, configured to be in the second When the detection module detects that its own overhead exceeds the preset second threshold, the detection module sends a response message carrying the information indicating that the server is busy to the Diameter client. According to the present invention, the Diameter client determines that the load of the first Diameter server is too large A part of the request messages in all the request messages to be sent are sent to the second Diameter server, thereby flexibly implementing load sharing and improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawings: FIG. 1 is a flowchart of a Failover/failback process according to the prior art; FIG. 2 is a flowchart of a method for implementing load balancing according to an embodiment of the present invention; FIG. 3 is a flowchart according to an embodiment of the present invention. FIG. 4 is a preferred flowchart of a method for implementing load balancing according to an embodiment of the present invention; FIG. 5 is a Diameter client according to an embodiment of the present invention; FIG. 6 is a load balancing diagram shown in FIG. Implement the structural diagram of the system. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. Considering the problem of low resource utilization caused by the load balancing implementation method in the prior art, according to the present invention, the Diameter client determines a partial request message in all request messages to be sent when the load of the first Diameter server is excessively large. It is sent to the second Diameter server, which flexibly realizes load sharing and improves resource utilization. Method Embodiments According to the present invention, a method of implementing load balancing is provided. 2 is a flow chart of a method of implementing load balancing in accordance with the present invention. As shown in FIG. 2, the method includes the following steps S202 to S206: Step S202, the Diameter client communicates with the first Diameter server. For example, the Diameter client sends all request messages to the first Diameter server. Step S204: Determine a load condition of the first Diameter server. If the load of the first Diameter server exceeds the preset threshold, then go to step S206; otherwise, go to step S202, where the threshold may be preset in the actual situation. There are two ways to judge the load of the first Diameter server: 1)
Diameter客户端检测到其与第一 Diameter服务器之间的通信流量超过预设的 流量阈值, 则确定出第一 Diameter服务器的负荷超过预设的阈值, 这里, 流 量阈值可以 居实际情况来预先设定, 第一 Diameter月艮务器的负荷超过预设 的阈值可以诸如, CPU 占用率超过预设的阈值, 例如, CPU 占用率超过了 80%, 或者, 占用的内存资源超过了预设的阈值, 例如, 占用的内存资源超 过了总量的 80%; 2 ) Diameter客户端接收到来自第一 Diameter服务器的响 应消息, 则判断出第一 Diameter服务器的负荷超过预设的阈值, 其中, 第一 Diameter服务器在自身的开销超过预设的阈值时, 发送上述的响应消息, 该 响应消息携带有标记服务器忙碌的信息, 这里, 开销超过预设的阈值可以诸 如, CPU 占用率超过预设的阈值, 例如, CPU 占用率超过了 80%, 或者, 占用的内存资源超过了预设的阈值,例如,占用的内存资源超过了总量的 80% 等。 步骤 S206, Diameter客户端按照预定的比例将要发送的全部请求消息中 的部分请求消息发送给第二 Diameter月艮务器。 上述预定的比例可以 居实际情况来预先设定, 例如, 二分之一, 即,The Diameter client detects that the communication traffic between the first Diameter server and the first Diameter server exceeds a preset traffic threshold, and determines that the load of the first Diameter server exceeds a preset threshold. Here, the traffic threshold may be preset according to actual conditions. The load of the first Diameter server exceeds a preset threshold, for example, the CPU usage exceeds a preset threshold, for example, the CPU usage exceeds 80%, or the occupied memory resource exceeds a preset threshold. For example, the occupied memory resource exceeds 80% of the total amount; 2) the Diameter client receives the response message from the first Diameter server, and determines that the load of the first Diameter server exceeds a preset threshold, where the first Diameter When the server exceeds the preset threshold, the server sends the response message, where the response message carries the information that the tag server is busy. Here, the overhead exceeds a preset threshold, for example, the CPU usage exceeds a preset threshold, for example, , CPU usage exceeds 80%, or the memory resources occupied exceed The threshold value is set, for example, memory resources occupied by more than 80% of the total and the like. Step S206: The Diameter client sends a part of the request messages in all the request messages to be sent to the second Diameter server according to a predetermined ratio. The predetermined ratio may be preset in the actual situation, for example, one-half, that is,
Diameter客户端将要发送的全部请求消息中的二分之一发送给第二 Diameter 服务器。 随后, Diameter客户端通过流量监测发现第一 Diameter服务器的负荷情 况恢复到正常水平, 则启动故障回溯过程, 将要发送的所有请求消息发送到 第一 Diameter月艮务器上进行处理。 根据本发明, Diameter客户端在确定出第一 Diameter服务器的负荷过大 时将要发送的全部请求消息中的部分请求消息发送给第二 Diameter服务器, 从而灵活地实现负荷分担, 提高了资源利用率。 此外, 避免了只在第一 Diameter服务器发生故障的情况下才进行故障切换, 降低了消息发送失败的 可能性。 另外, 根据本发明实施例的负载均衡实现方法不会影响原有 Failover/failback的功能, 即, 当在第一 Diameter服务器发生故障的情况下仍 然可以执行故障切换和故障回溯操作。 下面结合附图及具体实施例对本发明作进一步详细说明。 图 3是才艮据本发明实施例的负载均衡的实现系统的示意图。如图 3所示, 该系统包括: Diameter客户端( Diameter Client )302、 Diameter月艮务器( Diameter Server ) 304、 Diameter月艮务器 306。 其中, 所述 Diameter客户端 302通过 Diameter十办议向 Diameter月艮务器 304或 Diameter月艮务器 306发送 Diameter认证 ·ί受权计费请求消息,或者接收 Diameter月艮务器 304或 Diameter月艮务器 306返回的 Diameter认证 ·ί受权计费响 应消息。 这里, 所述 Diameter客户端 302可以为 S-CSCF ( Serving- Call Session Control Function , 服务呼叫会话控制功能) 或 GGSN ( Gateway GPRS Supporting Node, 网关 GPRS支持节点) 等。 对于 Diameter客户端 302而言, Diameter客户端 302检测 Diameter月艮务 器 304的负荷情况, 在确定 Diameter服务器 304负荷情况正常时, 将相关的 认证 ·ί受权计费请求消息发送到 Diameter月艮务器 304, 或者从 Diameter月艮务器 304接收返回的 Diameter认证 ·ί受权计费响应消息。在确定 Diameter月艮务器 304 的负荷情况为异常时, 即 Diameter客户端 302检测到其与 Diameter服务器 304 之间的通信流量超过预设的流量阈值 (该流量阈值可以根据实际情况预 先设定, 例如, 流量阈值为 80Mbps ), 或者 Diameter月艮务器 304返回携带有 DIAMETER TOO BUSY信息的响应消息(其中, Diameter月艮务器 304检测 到自身的开销超过预设的阈值时, 发送上述的响应消息, 该响应消息表示 Diameter服务器 304忙碌;), 则 Diameter客户端 302按照预定的比例将要发 送的全部 Diameter请求消息中的部分请求消息发送到 Diameter月艮务器 306, 并从 Diameter月艮务器 306接) 返回的 Diameter响应消息。 在确定 Diameter 月艮务器 304的负荷情况恢复正常时, Diameter客户端 302可以再次将要发送 的所有 Diameter请求消息发送至 Diameter月艮务器 304。 这里, Diameter客户端 302通过预先设定的流量阈值来监测其与 Diameter 月艮务器 304之间的通讯流量, 一旦通讯流量超过了预先设定的流量阈值, 则 认为 Diameter服务器 304的负荷超过预先的阈值, 需要进行故障切换; 或者 Diameter客户端 302接收到 Diameter月艮务器 304返回的错误响应,该响应携 带有标 ΐ己 DIAMETER TOO BUSY的信息,则同样认为 Diameter月艮务器 304 的负荷超过阈值, 需要进行故障切换。 在判断需要进行故障切换后, 上述 Diameter客户端 302可以按照预定的 比例将要发送的所有请求消息中的部分请求消息发往 Diameter服务器 306 , 其中, 上述预定的比例可以根据实际情况来预先设定, 例如, 将比例设置为 二分之一。 对于 Diameter月艮务器 304而言, Diameter月艮务器 304接收 Diameter客户 端 302发送的 Diameter认证授权计费请求消息, 并根据本地策略处理请求消 息, 回复响应消息。 进一步, Diameter服务器 304在本地接收消息过多, 开销超过阈值 (这 里, 阈值可以根据实际情况来预先设定) 时, 可以通过给来自 Diameter客户 端 302的请求消息回复错误响应,来通知 Diameter客户端 302进行负荷控制, 其中, 上述的错误响应携带有错误码 "DIAMETER_TOO_BUSY,,, 上述开销 超过阈值可以指的是: CPU占用率超过预设的阈值, 例如, CPU占用率超过 了 80%; 或者, 占用的内存资源超过了预设的阈值, 例如, 占用的内存资源 超过了总量的 80%。 对于 Diameter月艮务器 306而言, Diameter月艮务器 306接收 Diameter客户 端 302发送的 Diameter认证授权计费请求消息, 并根据本地策略处理请求消 息, 回复响应消息。 进一步, 所述 Diameter服务器 306需要与 Diameter服务器 304之间进 行数据同步, 以便可以与 Diameter服务器 304协同处理客户端发来的请求消 息。 本发明实施例中 Diameter月艮务器 304以及 Diameter月艮务器 306可以为 HSS ( Home Subscriber Server, 归属用户月艮务器)或者 OCS ( Online Charging System , 在线计费系统 )。 基于上述描述的系统, 对根据本发明实施例的负载均衡的实现方法进行 详细描述。 图 4是才艮据本发明实施例的负载均衡的实现方法的流程图。如图 4所示, 该方法主要包括以下步 4聚: 步骤 S402: Diameter客户端 302判断与作为主用服务器的 Diameter服 务器 304之间通讯正常, 这里判断通讯正常的方法可以是通过 Diameter链路 检测消息, 也可以是通过业务交互消息来进行。 步 4聚 S404: Diameter客户端 302将所有的请求消息都发送到 Diameter 月艮务器 304。 步骤 S406: Diameter客户端 302在与 Diameter月艮务器 304通信的过程 中检测其与 Diameter服务器 304之间的通讯流量是否超过预先设定的流量阈 值。 如果通讯流量超过预设的流量阈值, 则说明 Diameter服务器 304超负荷 运行, 即, Diameter服务器 304的负荷超过阈值, 转至步骤 S408; 否则, 说 明 Diameter服务器 304的负荷情况正常, 转至步骤 S412。 步骤 S408: 由于 Diameter服务器 304的负荷过大, 所以需要进行负载 均衡控制。 这时, 启动 Failover机制, 按照预先设定的比例将要发送的全部 请求消息中的一部分发往备用服务器, 即, Diameter服务器 306。 步骤 S410: Diameter客户端 302接收从 Diameter月艮务器 306返回的响 应消息, 继续处理。 步骤 S412: Diameter客户端 302判断出其与 Diameter月艮务器 304之间 的流量氏于流量阈值, 则继续正常处理, 并接收主用月艮务器, 即, Diameter 月艮务器 304返回的响应消息。 步骤 S414: Diameter 客户端 302 判断响应消息是否携带有The Diameter client sends one-half of all the request messages to be sent to the second Diameter server. Then, the Diameter client discovers that the load condition of the first Diameter server is restored to a normal level through traffic monitoring, and starts the fault backtracking process, and sends all the request messages to be sent to the first Diameter server for processing. According to the present invention, the Diameter client sends a partial request message in all the request messages to be sent to the second Diameter server when determining that the load of the first Diameter server is too large, thereby flexibly implementing load sharing and improving resource utilization. In addition, the failover is avoided only in the event of a failure of the first Diameter server, which reduces the possibility of message transmission failure. In addition, the load balancing implementation method according to the embodiment of the present invention does not affect the original The function of Failover/failback, that is, failover and failback operations can still be performed in the event of a failure of the first Diameter server. The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. 3 is a schematic diagram of an implementation system of load balancing according to an embodiment of the present invention. As shown in FIG. 3, the system includes: a Diameter Client 302, a Diameter Server 304, and a Diameter Server 306. The Diameter client 302 sends a Diameter authentication ί Authenticated Charging Request message to the Diameter server 304 or the Diameter server 306 through the Diameter ten server, or receives the Diameter server 304 or the Diameter calendar. The Diameter authentication · ί authorized charging response message returned by the server 306. Here, the Diameter client 302 may be an S-CSCF (Serving-Call Session Control Function) or a GGSN (Gateway GPRS Supporting Node). For the Diameter client 302, the Diameter client 302 detects the load condition of the Diameter server 304, and when determining that the load of the Diameter server 304 is normal, sends the relevant authentication and payment request message to the Diameter service. The device 304, or receives the returned Diameter authentication ί authorized charging response message from the Diameter server 304. When it is determined that the load condition of the Diameter server 304 is abnormal, that is, the Diameter client 302 detects that the communication traffic between the Diameter client 302 and the Diameter server 304 exceeds a preset traffic threshold (the traffic threshold may be preset according to actual conditions, For example, the traffic threshold is 80 Mbps, or the Diameter server 304 returns a response message carrying the DIAMETER TOO BUSY information (where the Diameter server 304 detects that its own overhead exceeds a preset threshold, and sends the response) The message, the response message indicates that the Diameter server 304 is busy;), then the Diameter client 302 sends a partial request message in all Diameter request messages to be sent to the Diameter server 306 according to a predetermined ratio, and from the Diameter server 306) The Diameter response message returned. Upon determining that the load condition of the Diameter server 304 is back to normal, the Diameter client 302 may again send all Diameter request messages to be sent to the Diameter server 304. Here, the Diameter client 302 monitors the communication traffic with the Diameter server 304 through a preset traffic threshold. If the traffic exceeds a preset traffic threshold, the load of the Diameter server 304 is considered to exceed the pre-load. Threshold, need to fail over; or The Diameter client 302 receives the error response returned by the Diameter server 304, and the response carries the information of the DIAMETER TOO BUSY. The load of the Diameter server 304 is also considered to exceed the threshold, and a failover is required. After determining that the failover needs to be performed, the Diameter client 302 may send a partial request message of all the request messages to be sent to the Diameter server 306 according to a predetermined ratio, wherein the predetermined ratio may be preset according to actual conditions. For example, set the scale to one-half. For the Diameter server 304, the Diameter server 304 receives the Diameter authentication authorization charging request message sent by the Diameter client 302, and processes the request message according to the local policy to reply the response message. Further, when the Diameter server 304 receives too many messages locally and the overhead exceeds the threshold (here, the threshold can be preset according to the actual situation), the Diameter client can be notified by replying an error response to the request message from the Diameter client 302. The load control is performed by the 302, wherein the error response carries the error code "DIAMETER_TOO_BUSY," and the foregoing cost exceeds the threshold, which may be: the CPU usage exceeds a preset threshold, for example, the CPU usage exceeds 80%; or The occupied memory resource exceeds a preset threshold, for example, the occupied memory resource exceeds 80% of the total amount. For the Diameter server 306, the Diameter server 306 receives the Diameter authentication sent by the Diameter client 302. Authorizing the charging request message, and processing the request message according to the local policy, replying the response message. Further, the Diameter server 306 needs to perform data synchronization with the Diameter server 304 so that the request sent by the client can be processed in cooperation with the Diameter server 304. Message. Diameter month in the embodiment of the present invention The server 304 and the Diameter server 306 may be an HSS (Home Subscriber Server) or an OCS (Online Charging System). Based on the system described above, an embodiment according to the present invention FIG. 4 is a flowchart of a method for implementing load balancing according to an embodiment of the present invention. As shown in FIG. The method mainly includes the following steps: Step S402: The Diameter client 302 determines that the communication with the Diameter server 304 as the primary server is normal. The method for determining that the communication is normal may be that the message is detected through the Diameter link, or may be passed. Business interaction messages are coming. Step 4: S304: The Diameter client 302 sends all the request messages to the Diameter server 304. Step S406: The Diameter client 302 detects whether the communication traffic between the Diameter client 302 and the Diameter server 304 exceeds a preset traffic threshold during communication with the Diameter server 304. If the communication traffic exceeds the preset traffic threshold, the Diameter server 304 is overloaded, that is, the load of the Diameter server 304 exceeds the threshold, and the process goes to step S408; otherwise, the load of the Diameter server 304 is normal, and the process goes to step S412. Step S408: Since the load of the Diameter server 304 is too large, load balancing control is required. At this time, the Failover mechanism is activated to send a part of all the request messages to be sent to the standby server, that is, the Diameter server 306, according to a preset ratio. Step S410: The Diameter client 302 receives the response message returned from the Diameter server 306 and continues processing. Step S412: The Diameter client 302 determines that the traffic flow between the Diameter client and the Diameter server 304 is at the traffic threshold, continues normal processing, and receives the primary server, that is, the Diameter server 304 returns. Response message. Step S414: The Diameter client 302 determines whether the response message carries
"DIAMETER TOO BUSY" 的信息。 若是, 则确定出 Diameter月艮务器 304 的负荷超过预定的阈值, 并转至步骤 S408; 否则, 继续处理。 随后,如果 Diameter客户端 302检测到其与作为主用服务器的 Diameter 服务器 304之间的流量回落到预设的阈值以下, 或者, 在预定的时间内没有 接收到来自 Diameter月艮务器 304的携带有 "DIAMETER_TOO_BUSY,, 信息 的响应消息, 则启动 failback机制, 将要发送的所有请求消息发往 Diameter 月艮务器 304。 综上所述,对于本发明的 Diameter客户端和负载均衡实现系统, Diameter 客户端在确定出第一 Diameter服务器的负荷过大时将要发送的全部请求消息 中的部分请求消息发送给第二 Diameter服务器, 从而灵活地实现负荷分担, 提高了资源利用率。 此外, 避免了只在第一 Diameter服务器发生故障的情况 下才进行故障切换, 降低了消息发送失败的可能性。 另外, 根据本发明实施 例的负载均衡实现方法不会影响原有 Failover/failback的功能, 即, 当在第一 Diameter服务器发生故障的情况下仍然可以执行故障切换和故障回溯操作。 装置实施例 根据本发明的实施例, 提供了一种 Diameter客户端。 图 5是根据本发明实施例的 Diameter客户端。 如图 5所示, 该 Diameter 客户端包括: 接收模块 502 , 用于接收来自第一 Diameter服务器的响应消息; 检测模块 504 , 用于检测 Diameter客户端与第一 Diameter月艮务器之间的通信 流量是否超过预设的阈值, 其中, 该阈值可以根据实际情况来预先设定, 例 如, 流量阈值为 80Mbps; 均衡模块 506 , 用于在响应消息携带有指示服务器 忙碌的信息时, 或在检测模块 504检测出 Diameter客户端与第一 Diameter 服务器之间的通信流量超过上述预设的阈值时, 按照预定的比例将要发送的 全部请求消息中的部分请求消息发送给第二 Diameter服务器, 这里, 预定的 比例可以才艮据实际情况设定, 例如为二分之一。 均衡模块 506还用于在接收模块 502在预定的时间内没有接收到来自第 一 Diameter服务器的携带有指示服务器忙碌的信息的响应消息时, 或者在检 测模块 504检测出 Diameter客户端与第一 Diameter服务器之间的通信流量低 于上述预设的阈值时 ,将要发送的全部请求消息发送给第一 Diameter^艮务器。 在第一 Diameter 艮务器在自身的开销超过预设的阈值时,发送上述的响 应消息, 该响应消息携带有标记服务器忙碌的信息, 这里, 开销超过预设的 阈值可以指的是: CPU 占用率超过预设的阈值, 例如, CPU 占用率超过了 80%; 或者, 占用的内存资源超过了预设的阈值, 例如, 占用的内存资源超 过了总量的 80%等。 系统实施例 根据本发明的实施例, 提供了一种负载均衡的实现系统。 图 6是图 2所示的负载均衡实现系统的结构图。 如图 6所示, 该实现系 统包括 Diameter客户端 302、第一 Diameter月艮务器 304和第二 Diameter月艮务 器 306。 上述 Diameter客户端 302包括: 第一接收模块 602 , 用于接收来自第一 Diameter月艮务器 304的响应消息; 第一检测模块 604 , 用于检测 Diameter客 户端 302与第一 Diameter服务器 304之间的通信流量是否超过预设的阈值, 其中, 该阈值可以才艮据实际情况来预先设定, 例如, 流量阈值为 80Mbps; 均衡模块 606 , 用于在上述响应消息携带有指示服务器忙碌的信息时, 或在 第一检测模块 604检测出 Diameter客户端 302与第一 Diameter月艮务器 304 之间的通信流量超过上述预设的阈值时, 按照预定的比例将要发送的全部请 求消息中的部分请求消息发送给第二 Diameter服务器 306 , 这里, 预定的比 例可以 居实际情况设定, 例如为二分之一。 均衡模块 606还用于在第一接收模块 602在预定的时间内没有接收到来 自第一 Diameter服务器 304的携带有指示服务器忙碌的信息的响应消息时, 或者在第一检测模块 604检测出 Diameter客户端 302与第一 Diameter月艮务 器 304之间的通信流量低于上述预设的阈值时, 将要发送的全部请求消息发 送给第一 Diameter月艮务器 304。 第一 Diameter 服务器 304 包括: 第二接收模块 612 , 用于接收来自 Diameter客户端 302的请求消息;第二检测模块 614 ,用于检测第一 Diameter 服务器 304的开销是否超过预设的阈值, 其中, 该阈值可以根据实际情况来 预先设定;第一发送模块 616 ,用于在第二检测模块 614检测出第一 Diameter 服务器 304的开销超过上述预设的阈值时, 向 Diameter客户端 302发送携带 有指示月艮务器忙碌的信息的响应消息。这里, 开销超过预设的阈值可以诸如, CPU 占用率超过预设的阈值, 例如, CPU 占用率超过了 80%, 或者, 占用 的内存资源超过了预设的阈值, 例如, 占用的内存资源超过了总量的 80%等 第二 Diameter 服务器 306 包括: 第三接收模块 622 , 用于接收来自 Diameter客户端 302的请求消息;第三检测模块 624 ,用于检测第二 Diameter 服务器 306的开销是否超过预设的阈值, 其中, 该阈值可以根据实际情况来 预先设定;第二发送模块 626 ,用于在第三检测模块 624检测出第二 Diameter 服务器 306的开销超过上述预设的阈值时, 向 Diameter客户端 302发送携带 有指示服务器忙碌的信息的响应消息。 综上所述,对于本发明的 Diameter客户端和负载均衡实现系统, Diameter 客户端在确定出第一 Diameter服务器的负荷过大时将要发送的全部请求消息 中的部分请求消息发送给第二 Diameter服务器, 从而提高了资源利用率。 此 夕卜, 避免了只在第一 Diameter服务器发生故障的情况下才进行故障切换, 降 低了消息发送失败的可能性。 另外, 根据本发明实施例的 Diameter客户端和 负载均衡实现系统不会影响原有 Failover/failback 的功能, 即, 当在第一 Diameter服务器发生故障的情况下仍然可以执行故障切换和故障回溯操作。 需要说明的是, 在附图的流程图示出的步骤可以在诸如一组计算机可执 行指令的计算机系统中执行, 并且, 虽然在流程图中示出了逻辑顺序, 但是 在某些情况下, 可以以不同于此处的顺序执行所示出或描述的步骤。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布 在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程 序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 或 者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制 作成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软 件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的 ^"神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。 Information about "DIAMETER TOO BUSY". If so, it is determined that the load of the Diameter server 304 exceeds a predetermined threshold, and the process goes to step S408; otherwise, the process continues. Subsequently, if the Diameter client 302 detects that the traffic between it and the Diameter server 304 as the primary server falls below a preset threshold, or does not receive the piggyback from the Diameter server 304 within a predetermined time. If there is a response message of "DIAMETER_TOO_BUSY,", the failback mechanism is started, and all the request messages to be sent are sent to the Diameter server 304. In summary, for the Diameter client and the load balancing implementation system of the present invention, the Diameter client All the request messages to be sent when the terminal determines that the load of the first Diameter server is too large. A part of the request message is sent to the second Diameter server, thereby flexibly implementing load sharing and improving resource utilization. In addition, the failover is avoided only in the event of a failure of the first Diameter server, which reduces the possibility of message transmission failure. In addition, the load balancing implementation method according to the embodiment of the present invention does not affect the original failover/failback function, that is, the failover and fault backtracking operations can still be performed when the first Diameter server fails. Apparatus Embodiment According to an embodiment of the present invention, a Diameter client is provided. Figure 5 is a Diameter client in accordance with an embodiment of the present invention. As shown in FIG. 5, the Diameter client includes: a receiving module 502, configured to receive a response message from a first Diameter server; and a detecting module 504, configured to detect a communication between a Diameter client and a first Diameter server Whether the traffic exceeds a preset threshold, where the threshold may be preset according to an actual situation, for example, the traffic threshold is 80 Mbps; the equalization module 506 is configured to: when the response message carries information indicating that the server is busy, or in the detection module 504: When detecting that the communication traffic between the Diameter client and the first Diameter server exceeds the foregoing preset threshold, send a partial request message in all request messages to be sent to the second Diameter server according to a predetermined ratio, where the predetermined The ratio can be set according to the actual situation, for example, one-half. The equalization module 506 is further configured to: when the receiving module 502 does not receive the response message carrying the information indicating that the server is busy from the first Diameter server within a predetermined time, or the detection module 504 detects the Diameter client and the first Diameter. When the communication traffic between the servers is lower than the preset threshold, all the request messages to be sent are sent to the first Diameter server. When the first Diameter server exceeds the preset threshold, the response message is sent, and the response message carries the information that the tag server is busy. Here, the overhead exceeds a preset threshold, which may be: CPU usage The rate exceeds the preset threshold. For example, the CPU usage exceeds 80%. Or, the occupied memory resources exceed the preset threshold. For example, the occupied memory resources exceed 80% of the total. System Embodiment According to an embodiment of the present invention, a load balancing implementation system is provided. FIG. 6 is a structural diagram of the load balancing implementation system shown in FIG. 2. As shown in FIG. 6, the implementation system includes a Diameter client 302, a first Diameter server 304, and a second Diameter server. 306. The above-mentioned Diameter client 302 includes: a first receiving module 602, configured to receive a response message from the first Diameter server 304; a first detecting module 604, configured to detect between the Diameter client 302 and the first Diameter server 304 Whether the communication traffic exceeds a preset threshold, wherein the threshold may be preset according to an actual situation, for example, the traffic threshold is 80 Mbps; and the equalization module 606 is configured to: when the response message carries information indicating that the server is busy Or when the first detecting module 604 detects that the communication traffic between the Diameter client 302 and the first Diameter server 304 exceeds the preset threshold, part of the request messages to be sent according to a predetermined ratio. The message is sent to the second Diameter server 306, where the predetermined ratio can be set, for example, one-half. The equalization module 606 is further configured to: when the first receiving module 602 does not receive the response message from the first Diameter server 304 carrying the information indicating that the server is busy, or the first detecting module 604 detects the Diameter client. When the communication traffic between the terminal 302 and the first Diameter server 304 is lower than the preset threshold, all the request messages to be sent are sent to the first Diameter server 304. The first Diameter server 304 includes: a second receiving module 612, configured to receive a request message from the Diameter client 302, and a second detecting module 614, configured to detect whether the overhead of the first Diameter server 304 exceeds a preset threshold, where The threshold may be preset according to the actual situation. The first sending module 616 is configured to send, to the Diameter client 302, when the second detecting module 614 detects that the overhead of the first Diameter server 304 exceeds the preset threshold. A response message indicating that the server is busy. Here, the overhead exceeds a preset threshold, for example, the CPU usage exceeds a preset threshold, for example, the CPU usage exceeds 80%, or the occupied memory resource exceeds a preset threshold, for example, the occupied memory resource exceeds The second Diameter server 306, which includes 80% of the total amount, includes: a third receiving module 622, configured to receive a request message from the Diameter client 302, and a third detecting module 624, configured to detect whether the overhead of the second Diameter server 306 exceeds a preset threshold, wherein the threshold may be preset according to an actual situation; the second sending module 626 is configured to: when the third detecting module 624 detects that the overhead of the second Diameter server 306 exceeds the preset threshold, The Diameter client 302 sends a response message carrying information indicating that the server is busy. In summary, for the Diameter client and the load balancing implementation system of the present invention, the Diameter client determines all the request messages to be sent when the load of the first Diameter server is too large. A part of the request message is sent to the second Diameter server, thereby improving resource utilization. In addition, it is avoided that failover is performed only when the first Diameter server fails, which reduces the possibility of message transmission failure. In addition, the Diameter client and the load balancing implementation system according to the embodiment of the present invention do not affect the original failover/failback function, that is, the failover and fault backtracking operations can still be performed when the first Diameter server fails. It should be noted that the steps shown in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and, although the logical order is shown in the flowchart, in some cases, The steps shown or described may be performed in an order different than that herein. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or they may be Multiple modules or steps are made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 一种负载均衡的实现方法, 其特征在于, 包括: A method for implementing load balancing, characterized in that it comprises:
在 Diameter客户端与第一 Diameter服务器进行通信的过程中,如果 确定所述第一 Diameter 服务器的负荷超过预设的第一阈值, 则所述 Diameter客户端按照预定的比例将要发送的全部请求消息中的部分请求 消息发送给第二 Diameter服务器。 才艮据权利要求 1所述的方法, 其特征在于, 所述确定所述第一 Diameter 服务器的负荷超过预设的第一阈值的步骤包括:  During the communication between the Diameter client and the first Diameter server, if it is determined that the load of the first Diameter server exceeds a preset first threshold, the Diameter client is to send all the request messages according to a predetermined ratio. A partial request message is sent to the second Diameter server. The method according to claim 1, wherein the step of determining that the load of the first Diameter server exceeds a preset first threshold comprises:
如果所述 Diameter客户端检测到其与所述第一 Diameter服务器之间 的通信流量超过预设的第二阈值, 则确定所述第一 Diameter月艮务器的负 荷超过所述预设的第一阈值。 才艮据权利要求 1所述的方法, 其特征在于, 所述确定所述第一 Diameter 服务器的负荷超过预设的第一阈值的步骤包括:  If the Diameter client detects that the communication traffic between the first Diameter server and the first Diameter server exceeds a preset second threshold, determining that the load of the first Diameter server exceeds the preset first Threshold. The method according to claim 1, wherein the step of determining that the load of the first Diameter server exceeds a preset first threshold comprises:
所述第一 Diameter 艮务器在检测到自身的开销超过预设的第三阈值 时向所述 Diameter客户端发送响应消息, 其中, 所述响应消息携带有标 记服务器忙碌的信息;  The first Diameter server sends a response message to the Diameter client when detecting that the overhead of the device exceeds a preset third threshold, where the response message carries information that the tag server is busy;
所述 Diameter客户端接收到来自所述第一 Diameter月艮务器的所述响 应消息, 并确定所述第一 Diameter月艮务器的负荷超过所述预设的第一阈 值。 根据权利要求 1至 3中任一项所述的方法,其特征在于,在所述 Diameter 客户端将所述部分请求消息发送给第二 Diameter月艮务器之后, 所述方法 还包括:  The Diameter client receives the response message from the first Diameter server and determines that the load of the first Diameter server exceeds the preset first threshold. The method according to any one of claims 1 to 3, wherein after the Diameter client sends the partial request message to the second Diameter server, the method further comprises:
在所述 Diameter客户端检测到其与所述第一 Diameter服务器之间的 通信流量低于预设的第四阈值时, 所述 Diameter客户端将要发送的所有 请求消息发送给所述第一 Diameter月艮务器。 根据权利要求 1至 3中任一项所述的方法,其特征在于,在所述 Diameter 客户端将所述部分请求消息发送给第二 Diameter月艮务器之后, 所述方法 还包括: 在所述 Diameter 客户端在预定的时间内没有接收到来自所述第一 Diameter 月艮务器的携带有标记月艮务器忙碌的信息的响应消息时, 所述 Diameter客户端将要发送的所有请求消息发送给所述第一 Diameter服务 器。 And when the Diameter client detects that the communication traffic between the first Diameter server and the first Diameter server is lower than a preset fourth threshold, all the request messages sent by the Diameter client are sent to the first Diameter month. Server. The method according to any one of claims 1 to 3, wherein after the Diameter client sends the partial request message to the second Diameter server, the method further comprises: And all requests that the Diameter client will send when the Diameter client does not receive a response message from the first Diameter server carrying the information that the tag server is busy within a predetermined time. A message is sent to the first Diameter server.
6. 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述请求消息 包括 Diameter认证 ·ί受权计费请求消息。 The method according to any one of claims 1 to 3, wherein the request message includes a Diameter Authentication ί Authenticated Charging Request message.
7. —种 Diameter客户端, 其特征在于, 包括: 7. A Diameter client, characterized in that it comprises:
接收模块, 用于接收来自第一 Diameter月艮务器的响应消息; 检测模块,用于检测所述 Diameter客户端与所述第一 Diameter服务 器之间的通信流量是否超过预设的阈值;  a receiving module, configured to receive a response message from the first Diameter server; and a detecting module, configured to detect whether a communication traffic between the Diameter client and the first Diameter server exceeds a preset threshold;
均衡模块, 用于在所述响应消息携带有指示服务器忙碌的信息时, 或在所述检测模块检测出所述 Diameter客户端与所述第一 Diameter月艮务 器之间的通信流量超过所述预设的阈值时, 按照预定的比例将要发送的 全部请求消息中的部分请求消息发送给第二 Diameter服务器。  An equalization module, configured to: when the response message carries information indicating that the server is busy, or when the detecting module detects that the communication traffic between the Diameter client and the first Diameter server exceeds the When the threshold is preset, part of the request messages in all the request messages to be sent are sent to the second Diameter server according to a predetermined ratio.
8. 根据权利要求 7所述的 Diameter客户端, 其特征在于, 所述均衡模块还 用于在所述接收模块在预定的时间内没有接收到来自所述第一 Diameter 服务器的携带有指示服务器忙碌的信息的响应消息时, 或者在所述检测 模块检测出所述 Diameter客户端与所述第一 Diameter服务器之间的通信 流量低于所述预设的阈值时, 将要发送的全部请求消息发送给所述第一 Diameter月艮务器。 The Diameter client according to claim 7, wherein the equalization module is further configured to: when the receiving module does not receive the indication server busy from the first Diameter server within a predetermined time When the response message of the information is sent, or when the detecting module detects that the communication traffic between the Diameter client and the first Diameter server is lower than the preset threshold, all the request messages to be sent are sent to The first Diameter server.
9. 一种负载均衡的实现系统, 其特征在于, 所述实现系统包括 Diameter客 户端、 第一 Diameter服务器和第二 Diameter服务器, 其中, A load balancing implementation system, wherein the implementation system includes a Diameter client, a first Diameter server, and a second Diameter server, where
所述 Diameter客户端包括:  The Diameter client includes:
第一接收模块, 用于接收来自所述第一 Diameter月艮务器的响应 消息;  a first receiving module, configured to receive a response message from the first Diameter server;
第一检测模块, 用于检测所述 Diameter 客户端与所述第一 Diameter服务器之间的通信流量是否超过预设的第一阈值; 均衡模块, 用于在所述响应消息携带有指示服务器忙碌的信息 时, 或在所述第一检测模块检测出所述 Diameter客户端与所述第一 Diameter服务器之间的通信流量超过所述预设的第一阈值时, 按照 预定的比例将要发送的全部请求消息中的部分请求消息发送给所述 第二 Diameter月艮务器; a first detecting module, configured to detect whether the communication traffic between the Diameter client and the first Diameter server exceeds a preset first threshold; and the equalization module is configured to: when the response message carries, indicating that the server is busy When the information is detected, or when the first detecting module detects that the communication traffic between the Diameter client and the first Diameter server exceeds the preset first threshold, Sending, in a predetermined proportion, a part of the request messages of all the request messages to be sent to the second Diameter server;
所述第一 Diameter月艮务器包括:  The first Diameter server includes:
第二接收模块,用于接收来自所述 Diameter客户端的请求消息; 第二检测模块,用于检测自身的开销是否超过预设的第二阈值; 发送模块, 用于在所述第二检测模块检测出自身的开销超过所 述预设的第二阈值时, 向所述 Diameter客户端发送携带有指示服务 器忙碌的信息的所述响应消息。  a second receiving module, configured to receive a request message from the Diameter client, a second detecting module, configured to detect whether an overhead of the device exceeds a preset second threshold, and a sending module, configured to detect, by the second detecting module When the cost of the self exceeds the preset second threshold, the response message carrying the information indicating that the server is busy is sent to the Diameter client.
10. 根据权利要求 9所述的系统, 其特征在于, 所述均衡模块还用于在所述 第一接收模块在预定的时间内没有接收到来自所述第一 Diameter月艮务器 的携带有指示服务器忙碌的信息的所述响应消息时, 或者在所述第一检 测模块检测出所述 Diameter客户端与所述第一 Diameter服务器之间的通 信流量低于所述预设的第一阈值时, 将要发送的全部请求消息发送给所 述第一 Diameter月艮务器。 The system according to claim 9, wherein the equalization module is further configured to: when the first receiving module does not receive the carried from the first Diameter server within a predetermined time, When the response message indicating the busy information of the server is used, or when the first detecting module detects that the communication traffic between the Diameter client and the first Diameter server is lower than the preset first threshold Sending all request messages to be sent to the first Diameter server.
PCT/CN2010/073675 2009-08-19 2010-06-08 Method and system for realizing load balance and diameter client WO2011020363A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910167516.4 2009-08-19
CN200910167516.4A CN101631360B (en) 2009-08-19 2009-08-19 Method, device and system for realizing load balancing

Publications (1)

Publication Number Publication Date
WO2011020363A1 true WO2011020363A1 (en) 2011-02-24

Family

ID=41576250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/073675 WO2011020363A1 (en) 2009-08-19 2010-06-08 Method and system for realizing load balance and diameter client

Country Status (2)

Country Link
CN (1) CN101631360B (en)
WO (1) WO2011020363A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294855A (en) * 2018-12-07 2020-06-16 中国移动通信集团重庆有限公司 Flow control method, device, equipment and medium
US20220182327A1 (en) * 2016-06-30 2022-06-09 Intel Corporation System to monitor and control data in a network
CN117097573A (en) * 2023-10-19 2023-11-21 深圳竹云科技股份有限公司 Firewall dynamic access control method and device under zero-trust security system

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631360B (en) * 2009-08-19 2012-05-09 中兴通讯股份有限公司 Method, device and system for realizing load balancing
CN102480378A (en) * 2010-11-26 2012-05-30 中兴通讯股份有限公司 Method and system for managing resources
CN102480477B (en) * 2010-11-30 2015-03-11 中国移动通信集团北京有限公司 Method, device and system for accessing service by client terminal
CN102209047B (en) * 2011-05-24 2012-08-22 苏州阔地网络科技有限公司 Instant messaging system and method for realizing information sharing
CN103401798B (en) * 2013-07-30 2016-12-28 北京京东尚科信息技术有限公司 A kind of multi-node communication method and device
CN103716253A (en) * 2013-12-27 2014-04-09 广州华多网络科技有限公司 Method and device for requesting data
CN105591831A (en) * 2014-10-24 2016-05-18 中兴通讯股份有限公司 Service capability detection method and apparatus
CN104699628B (en) * 2015-03-11 2018-07-27 小米科技有限责任公司 The pre-stored method and device of caching
CN104796494A (en) * 2015-05-08 2015-07-22 成都博元科技有限公司 Data transmission method for cloud platform
CN104866393A (en) * 2015-05-29 2015-08-26 四川长虹电器股份有限公司 Information processing method and first intelligent home control equipment
CN106487823A (en) * 2015-08-24 2017-03-08 上海斐讯数据通信技术有限公司 A kind of document transmission method based on SDN framework and system
CN106550342A (en) * 2015-09-23 2017-03-29 中兴通讯股份有限公司 The overload controlling method and device of charging request message
CN108933736B (en) * 2017-05-25 2023-11-14 中兴通讯股份有限公司 Balanced load processing method, server, client and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889563A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Load control method based on Diameter protocol
CN101150512A (en) * 2007-10-23 2008-03-26 中兴通讯股份有限公司 Method for load balance of communication link
CN101631360A (en) * 2009-08-19 2010-01-20 中兴通讯股份有限公司 Method, device and system for realizing load balancing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937787A (en) * 2005-09-21 2007-03-28 中兴通讯股份有限公司 Load sharing method for multi module short message system
FR2906951B1 (en) * 2006-10-04 2008-12-12 Alcatel Sa DEVICE AND METHOD FOR CONTROLLING AND SECURING A MULTIMEDIA SUBSYSTEM.
CN101447939B (en) * 2008-12-16 2011-09-28 中国移动通信集团北京有限公司 Functional distribution method and load balancer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889563A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Load control method based on Diameter protocol
CN101150512A (en) * 2007-10-23 2008-03-26 中兴通讯股份有限公司 Method for load balance of communication link
CN101631360A (en) * 2009-08-19 2010-01-20 中兴通讯股份有限公司 Method, device and system for realizing load balancing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220182327A1 (en) * 2016-06-30 2022-06-09 Intel Corporation System to monitor and control data in a network
US11722416B2 (en) * 2016-06-30 2023-08-08 Intel Corporation System to monitor and control data in a network
CN111294855A (en) * 2018-12-07 2020-06-16 中国移动通信集团重庆有限公司 Flow control method, device, equipment and medium
CN111294855B (en) * 2018-12-07 2023-04-11 中国移动通信集团重庆有限公司 Flow control method, device, equipment and medium
CN117097573A (en) * 2023-10-19 2023-11-21 深圳竹云科技股份有限公司 Firewall dynamic access control method and device under zero-trust security system
CN117097573B (en) * 2023-10-19 2024-01-30 深圳竹云科技股份有限公司 Firewall dynamic access control method and device under zero-trust security system

Also Published As

Publication number Publication date
CN101631360B (en) 2012-05-09
CN101631360A (en) 2010-01-20

Similar Documents

Publication Publication Date Title
WO2011020363A1 (en) Method and system for realizing load balance and diameter client
US9374313B2 (en) System and method to prevent endpoint device recovery flood in NGN
US9240946B2 (en) Message restriction for diameter servers
EP2069954B1 (en) Method, system, and computer program product for inhibiting message traffic to an unavailable terminating sip server
US8374079B2 (en) Proxy server, communication system, communication method and program
CN104823412B (en) Peer-to-peer brings back to life the method and device of detection
US20090144807A1 (en) Method, apparatus and system for implementing access authentication
US20070283022A1 (en) Allocation of a call state control function to a subscriber
WO2015154350A1 (en) Internet access traffic sharing method, device and terminal
US20100299551A1 (en) Message processing method, apparatus and ip communication system based on the sip protocol
US20110034157A1 (en) Method and apparatus for controlling communications
RU2012104527A (en) METHODS AND DEVICES FOR INITIATING SUBSCRIBER DATA SUPPLY IN HSS NETWORK OF MULTIMEDIA IP PROTOCOL SUBSYSTEM
JP2006279636A (en) Consistency guarantee management system for inter-client communication log
CN112925620A (en) Distributed task scheduling system and method
EP3262806A1 (en) P-cscf recovery and reregistration
CN101022454B (en) Interentity auditing method and system
WO2012126286A1 (en) Aaa server status detection method and system
EP2797285B1 (en) Method and apparatus for network communication
WO2011020369A1 (en) Method for establishing diameter link and diameter network element
US8051129B2 (en) Arrangement and method for reducing required memory usage between communication servers
WO2008049346A1 (en) Method, system and device for registering device
CN101667924B (en) Method, device and system for registration management in IMS network architecture
CN100450018C (en) Method for raising Diameter internodal communication reliability
WO2010139220A1 (en) Method and system for realizing cross-protocol failover
WO2012175140A1 (en) Gateway selection for load balancing

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

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

Country of ref document: EP

Kind code of ref document: A1