CN105337786A - Server performance detection method, apparatus and equipment - Google Patents

Server performance detection method, apparatus and equipment Download PDF

Info

Publication number
CN105337786A
CN105337786A CN201410353696.6A CN201410353696A CN105337786A CN 105337786 A CN105337786 A CN 105337786A CN 201410353696 A CN201410353696 A CN 201410353696A CN 105337786 A CN105337786 A CN 105337786A
Authority
CN
China
Prior art keywords
under test
information
server
server under
detection
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201410353696.6A
Other languages
Chinese (zh)
Other versions
CN105337786B (en
Inventor
常诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410353696.6A priority Critical patent/CN105337786B/en
Publication of CN105337786A publication Critical patent/CN105337786A/en
Application granted granted Critical
Publication of CN105337786B publication Critical patent/CN105337786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供一种服务器性能检测方法、装置及设备,所述方法包括:检测设备向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;所述检测设备接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;所述检测设备确定所述被测服务器是否处于可用状态;基于所述检测设备确定所述被测服务器处于可用状态,所述检测设备获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级。如此,就可提高服务器性能检测结果的合理性和准确性。

Embodiments of the present invention provide a server performance detection method, device, and equipment. The method includes: the detection device sends a first detection message to the server under test, and the first detection message carries first information; the detection The device receives the first response message returned by the server under test corresponding to the first detection message, the first response message carries second information, and the second information and the first information have a mapping relationship; the detection device determines whether the tested server is in an available state; based on the detection device determining that the tested server is in an available state, the detection device acquires the first detection message and the first A first interval between response messages; the detection device determines the performance level of the server under test according to the first interval. In this way, the rationality and accuracy of the server performance detection result can be improved.

Description

一种服务器性能检测方法、装置及设备A server performance detection method, device and equipment

技术领域technical field

本发明涉及通信技术领域,具体涉及一种服务器性能检测方法、装置及设备。The present invention relates to the field of communication technology, in particular to a server performance detection method, device and equipment.

背景技术Background technique

随着信息技术的不断发展以及用户访问量的逐渐增长,单一服务器的性能已无法满足大量用户的访问需求,目前大多通过部署多组服务器的方式,为用户提供稳定、可靠的网络访问服务。With the continuous development of information technology and the gradual increase of user access, the performance of a single server can no longer meet the access needs of a large number of users. At present, most of them provide users with stable and reliable network access services by deploying multiple groups of servers.

为了使这多组服务器可以为用户提供良好的访问服务,在接收到客户端用户的访问请求后,可通过服务负载均衡技术,将访问请求分配到多台服务器上,由这多台服务器共同响应该访问请求。由此可知,访问请求的响应情况主要取决于负载均衡过程中为用户分配的服务器的性能,如果为用户分配的服务器的性能好,则响应时间短,用户体验好;如果为用户分配的服务器出现故障,则会延长响应时间,降低用户体验。为了获得服务器的服务性能信息,目前存在一种检测服务器性能状态的方案,下面以DNS服务为例,对这种性能检测方案进行简单介绍:In order for these groups of servers to provide users with good access services, after receiving access requests from client users, the access requests can be distributed to multiple servers through service load balancing technology, and these multiple servers will respond together. The request should be accessed. It can be seen that the response to access requests mainly depends on the performance of the server allocated to the user during the load balancing process. If the performance of the server allocated to the user is good, the response time is short and the user experience is good; failure, it will prolong the response time and degrade the user experience. In order to obtain the service performance information of the server, there is currently a scheme for detecting the performance status of the server. The following takes the DNS service as an example to briefly introduce this performance detection scheme:

首先,负载均衡设备向一个DNS服务器发送检测报文,检测报文中携带有识别码TransactionID。然后,DNS服务器响应负载均衡设备,向其反馈应答报文,且应答报文中携带DNS服务器从检测报文中获取的识别码。最后,负载均衡设备根据识别码判断DNS服务器的性能。这主要是因为,当DNS服务器正常工作时,DNS服务器获取到的识别码应与检测报文中的识别码保持一致,故,若负载均衡设备判定应答报文中携带的识别码与检测报文中的识别码相同,则认为服务器状态为可用,可在负载均衡过程中分配给用户使用;否则,认为服务器状态为不可用,暂时不能将其分配给用户。First, the load balancing device sends a detection message to a DNS server, and the detection message carries an identification code TransactionID. Then, the DNS server responds to the load balancing device and feeds back a response message to it, and the response message carries the identification code obtained by the DNS server from the detection message. Finally, the load balancing device judges the performance of the DNS server according to the identification code. This is mainly because, when the DNS server works normally, the identification code obtained by the DNS server should be consistent with the identification code in the detection packet. Therefore, if the load balancing device determines that the identification code carried in the response packet If the identification codes are the same, the server is considered available and can be allocated to users during the load balancing process; otherwise, the server is considered unavailable and cannot be allocated to users temporarily.

由上述过程可知,目前的性能检测只是判断服务器是否可用,但众所周知的,服务器可以正常工作并不代表其可以为用户提供良好的服务。如此,若仅依据目前的性能检测结果进行负载均衡,则可能降低服务器的分配合理性,致使服务器为用户提供服务的响应时间过长,严重时还可能无法为用户提供服务。It can be seen from the above process that the current performance test is only to determine whether the server is available, but as we all know, the fact that the server can work normally does not mean that it can provide users with good services. In this way, if load balancing is performed only based on the current performance test results, the rationality of server allocation may be reduced, resulting in a long response time for the server to provide services to users, and in serious cases, it may not be able to provide services to users.

发明内容Contents of the invention

本发明实施例提供的服务器性能检测方法、装置及设备,用以提高检测服务器性能时检测结果的合理性与准确性。The server performance detection method, device and equipment provided by the embodiments of the present invention are used to improve the rationality and accuracy of the detection results when detecting the server performance.

为此,本发明实施例提供如下技术方案:For this reason, the embodiment of the present invention provides following technical scheme:

第一方面,提供了一种服务器性能检测方法,所述方法包括:In a first aspect, a method for detecting server performance is provided, the method comprising:

检测设备向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;The detection device sends a first detection message to the server under test, where the first detection message carries first information;

所述检测设备接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;The detection device receives a first response message returned by the server under test corresponding to the first detection message, the first response message carries second information, and the second information and the first information There is a mapping relationship between them;

所述检测设备确定所述被测服务器是否处于可用状态;The detection device determines whether the server under test is in an available state;

基于所述检测设备确定所述被测服务器处于可用状态,所述检测设备获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;Based on the detection device determining that the server under test is in an available state, the detection device acquires a first interval between the first detection message and the first response message;

所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级。The detection device determines the performance level of the server under test according to the first interval length.

在第一方面的第一种可能的实现方式中,所述检测设备配置有预置数据库,所述预置数据库保存有所述第一信息,则在所述检测设备向被测服务器发送第一检测报文之前,所述方法还包括:In a first possible implementation manner of the first aspect, the detection device is configured with a preset database, and the preset database stores the first information. Then, when the detection device sends the first Before detecting the message, the method also includes:

所述检测设备从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。The detection device reads the first information from the preset database, and uses the first information to generate the first detection message.

结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述预置数据库还保存有所述第一信息的第一级别信息,则所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级,包括:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the preset database also stores first-level information of the first information, and the detection The device determines the performance level of the server under test according to the first interval length, including:

所述检测设备根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级。The detection device determines the performance level of the server under test according to the first interval length and the first level information.

结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the first level information is the access frequency or the network resource identified by the first information. The category to which the first information belongs is set.

结合第一方面的第一种至第三种的任一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述预置数据库还保存有所述被测服务器的身份标识与所述第一信息的对应关系,则在所述检测设备向被测服务器发送第一检测报文之前,所述方法还包括:With reference to any of the first to third possible implementations of the first aspect, in a fourth possible implementation of the first aspect, the preset database also stores the identity of the server under test identify the corresponding relationship with the first information, before the detection device sends the first detection message to the server under test, the method further includes:

所述检测设备根据所述第一信息,从所述对应关系中选择出所述被测服务器的身份标识。The detection device selects the identity of the server under test from the corresponding relationship according to the first information.

结合第一方面的第一种至第四种的任一种可能的实现方式,在第一方面的第五种可能的实现方式中,基于所述检测设备确定所述被测服务器处于可用状态,所述方法还包括:With reference to any one of the first to fourth possible implementations of the first aspect, in a fifth possible implementation of the first aspect, based on the detection device determining that the server under test is in an available state, The method also includes:

所述检测设备向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;The detection device sends a second detection message to the server under test, and the second detection message carries third information;

所述检测设备接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The detection device receives a second response message returned by the server under test corresponding to the second detection message, the second response message carries fourth information, and the fourth information and the third information There is a mapping relationship between them;

所述检测设备获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;The detection device acquires a second interval between the second detection message and the second response message;

所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级,包括:The detection device determines the performance level of the server under test according to the first interval length, including:

所述检测设备根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,The detecting device determines the performance level of the server under test according to the second interval length, and uses the performance level determined according to the first interval length and the performance level determined according to the second interval length to calculate the the average performance rating of the server under test; or,

所述检测设备利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。The detection device uses the first interval length and the second interval length to calculate an interval duration average value, and determines the performance level of the server under test according to the interval duration average value.

结合第一方面或第一方面的第一种至第五种的任一种可能的实现方式,在第一方面的第六种可能的实现方式中,所述方法还包括:In combination with the first aspect or any of the first to fifth possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the method further includes:

基于所述检测设备确定所述被测服务器处于不可用状态,返回执行所述检测设备向被测服务器发送第一检测报文的步骤,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度长度。Based on the detection device determining that the server under test is in an unavailable state, return to the step of sending the first detection message to the server under test by the detection device until a preset condition is met; the preset condition is a preset condition Set the execution times or preset execution time length.

结合第一方面或第一方面的第一种至第六种的任一种可能的实现方式,在第一方面的第七种可能的实现方式中,所述被测服务器为DNS服务器,所述第一检测报文为DNS请求报文,所述第一响应报文为DNS应答报文,所述第一信息为第一域名,所述第二信息为IP地址。In combination with the first aspect or any of the first to sixth possible implementations of the first aspect, in a seventh possible implementation of the first aspect, the server under test is a DNS server, and the The first detection packet is a DNS request packet, the first response packet is a DNS response packet, the first information is a first domain name, and the second information is an IP address.

第二方面,提供了一种服务器性能检测装置,所述装置包括:In a second aspect, a device for detecting server performance is provided, the device comprising:

发送单元,用于向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;A sending unit, configured to send a first detection message to the server under test, where the first detection message carries first information;

接收单元,用于接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;a receiving unit, configured to receive a first response message returned by the server under test corresponding to the first detection message, where the first response message carries second information, and the second information is the same as the first There is a mapping relationship between information;

状态确定单元,用于确定所述被测服务器是否处于可用状态;A state determining unit, configured to determine whether the tested server is in an available state;

获取单元,用于基于所述状态确定单元确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;An obtaining unit, configured to obtain a first interval between the first detection message and the first response message based on the state determination unit determining that the server under test is in an available state;

等级确定单元,用于根据所述获取单元获取的所述第一间隔时长确定所述被测服务器的性能等级。A level determining unit, configured to determine the performance level of the server under test according to the first interval duration acquired by the acquiring unit.

在第二方面的第一种可能的实现方式中,所述装置配置有预置数据库,所述预置数据库保存有所述第一信息,所述装置还包括:In a first possible implementation manner of the second aspect, the device is configured with a preset database, and the preset database stores the first information, and the device further includes:

读取单元,用于在所述发送单元向所述被测服务器发送所述第一检测报文之前,从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。a reading unit, configured to read the first information from the preset database before the sending unit sends the first detection message to the server under test, and use the first information to generate The first detection message.

结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述预置数据库还保存有所述第一信息的第一级别信息,则With reference to the first possible implementation of the second aspect, in the second possible implementation of the second aspect, the preset database also stores the first level information of the first information, then

所述等级确定单元,具体用于根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级;所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。The level determination unit is specifically configured to determine the performance level of the server under test according to the first interval duration and the first level information; the first level information is the network identified by the first information The resource is set by the access frequency or the category to which the first information belongs.

结合第二方面的第一种或第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述预置数据库还保存有所述被测服务器的身份标识与所述第一信息的对应关系,则在所述检测设备向被测服务器发送第一检测报文之前,所述装置还包括:With reference to the first or second possible implementation of the second aspect, in a third possible implementation of the second aspect, the preset database also stores the identity of the server under test and the For the corresponding relationship of the first information, before the detection device sends the first detection message to the server under test, the device further includes:

选择单元,用于在所述发送单元向所述被测服务器发送所述第一检测报文之前,根据所述第一信息,从所述对应关系中选择出所述被测服务器的身份标识。A selection unit, configured to select the identity of the server under test from the corresponding relationship according to the first information before the sending unit sends the first detection message to the server under test.

结合第二方面的第二种或第三种可能的实现方式,在第二方面的第四种可能的实现方式中,基于所述状态确定单元确定所述被测服务器处于可用状态,With reference to the second or third possible implementation of the second aspect, in a fourth possible implementation of the second aspect, based on the state determination unit determining that the server under test is in an available state,

所述发送单元,还用于向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;The sending unit is further configured to send a second detection message to the server under test, where the second detection message carries third information;

所述接收单元,还用于接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The receiving unit is further configured to receive a second response message returned by the server under test corresponding to the second detection message, the second response message carries fourth information, and the fourth information is related to the second detection message. There is a mapping relationship between the third information;

所述获取单元,还用于获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;The acquiring unit is further configured to acquire a second interval between the second detection message and the second response message;

所述等级确定单元,具体用于根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,The level determining unit is specifically configured to determine the performance level of the server under test according to the second interval length, and use the performance level determined according to the first interval length and the performance level determined according to the second interval length. The performance level calculates the average value of the performance level of the server under test; or,

所述等级确定单元,具体用于利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。The level determining unit is specifically configured to use the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value.

结合第二方面或第二方面的第一种至第四种的任一种可能的实现方式,在第二方面的第五种可能的实现方式中,所述发送单元,还用于基于所述状态确定单元确定所述被测服务器处于不可用状态,继续向所述被测服务器发送所述第一检测报文,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。With reference to the second aspect or any of the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, the sending unit is further configured to, based on the The state determination unit determines that the server under test is in an unavailable state, and continues to send the first detection message to the server under test until a preset condition is met; the preset condition is a preset number of executions or a preset Set the execution time length.

第三方面,提供一种服务器性能检测设备,所述设备包括:处理器、存储器和网络接口;In a third aspect, a server performance detection device is provided, and the device includes: a processor, a memory, and a network interface;

所述存储器,用于存储程序指令和数据;The memory is used to store program instructions and data;

所述处理器,用于读取所述存储器中存储的指令和数据,执行以下操作:The processor is configured to read instructions and data stored in the memory, and perform the following operations:

触发所述网络接口向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;triggering the network interface to send a first detection message to the server under test, where the first detection message carries first information;

通过所述网络接口接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;Receive the first response message returned by the server under test corresponding to the first detection message through the network interface, the first response message carries second information, and the second information is consistent with the first There is a mapping relationship between information;

确定所述被测服务器是否处于可用状态;determining whether the tested server is in an available state;

基于确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;Obtaining a first interval between the first detection message and the first response message based on determining that the server under test is in an available state;

根据所述第一间隔时长确定所述被测服务器的性能等级。Determine the performance level of the server under test according to the first interval length.

在第三方面的第一种可能的实现方式中,所述检测设备配置有预置数据库,所述预置数据库保存有所述第一信息,则在所述触发所述网络接口向被测服务器发送第一检测报文之前,所述处理器还用于执行以下操作:In a first possible implementation manner of the third aspect, the detection device is configured with a preset database, and the preset database stores the first information, and when the triggering the network interface sends a message to the server under test Before sending the first detection message, the processor is further configured to perform the following operations:

从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。Reading the first information from the preset database, and using the first information to generate the first detection message.

结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述预置数据库还保存有所述第一信息的第一级别信息,则所述处理器根据所述第一间隔时长确定所述被测服务器的性能等级,包括:With reference to the first possible implementation of the third aspect, in a second possible implementation of the third aspect, the preset database also stores first-level information of the first information, and the processing The controller determines the performance level of the server under test according to the first interval length, including:

根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级;其中,所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。Determine the performance level of the server under test according to the first interval length and the first level information; wherein, the first level information is the access frequency of network resources identified by the first information or the The category to which the first information belongs is set.

结合第三方面的第一种或第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述预置数据库还保存有所述被测服务器的身份标识与所述第一信息的对应关系,则在所述触发所述网络接口向被测服务器发送第一检测报文之前,所述处理器还用于执行以下操作:With reference to the first or second possible implementation of the third aspect, in a third possible implementation of the third aspect, the preset database also stores the identity of the server under test and the For the corresponding relationship of the first information, before the triggering of the network interface to send the first detection message to the server under test, the processor is further configured to perform the following operations:

根据所述第一信息,从所述对应关系中选择出所述被测服务器的身份标识。Select the identity of the server under test from the corresponding relationship according to the first information.

结合第三方面的第一种至第三种的任一种可能的实现方式,在第三方面的第四种可能的实现方式中,基于确定所述被测服务器处于可用状态,所述处理器还用于执行以下操作:With reference to any one of the first to third possible implementations of the third aspect, in a fourth possible implementation of the third aspect, based on determining that the server under test is in an available state, the processor Also used to do the following:

触发所述网络接口向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;triggering the network interface to send a second detection message to the server under test, where the second detection message carries third information;

通过所述网络接口接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The second response message returned by the server under test corresponding to the second detection message is received through the network interface, the second response message carries fourth information, and the fourth information is the same as the third There is a mapping relationship between information;

获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;Obtain a second interval between the second detection message and the second response message;

所述根据所述第一间隔时长确定所述被测服务器的性能等级,包括:The determining the performance level of the server under test according to the first interval length includes:

根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,Determine the performance level of the server under test according to the second interval length, and calculate the performance level of the server under test by using the performance level determined according to the first interval length and the performance level determined according to the second interval length. Performance Rating Mean; or,

利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。Using the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value.

结合第三方面或第三方面的第一种至第四种的任一种可能的实现方式,在第三方面的第五种可能的实现方式中,所述处理器还用于执行以下操作:With reference to the third aspect or any of the first to fourth possible implementation manners of the third aspect, in a fifth possible implementation manner of the third aspect, the processor is further configured to perform the following operations:

基于确定所述被测服务器处于不可用状态,返回执行所述触发所述网络接口向被测服务器发送第一检测报文的操作,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度长度。Based on determining that the server under test is in an unavailable state, return to execute the operation of triggering the network interface to send a first detection message to the server under test until a preset condition is met; the preset condition is a preset The number of executions or the preset execution time length.

本发明实施例的服务器性能检测方法、装置及设备,在需要进行服务器性能检测时,检测设备向被测服务器发送第一检测报文,并接收被测服务器针对第一检测报文返回的第一响应报文,如此,检测设备就可利用第一检测报文和第一响应报文确定出被测服务器的工作状态,并在被测服务器处于可用状态时,根据第一检测报文和第一响应报文之间的第一间隔时长确定被测服务器的性能等级。这主要是因为,间隔时长可在一定程度上反映被测服务器处理请求的响应速度,因此,本发明实施例就可结合被测服务器的工作状态和响应速度,确定被测服务器的更为有区分度的性能等级,提高了性能检测结果的准确性。如此,也就提高了负载均衡设备基于本发明实施例性能检测结果进行负载均衡的合理性,进而保证所分配服务器可以为客户端用户提供良好质量的访问服务。In the server performance detection method, device, and equipment of the embodiments of the present invention, when server performance detection is required, the detection device sends a first detection message to the server under test, and receives the first detection message returned by the server under test for the first detection message. Response message, so that the detection device can use the first detection message and the first response message to determine the working status of the server under test, and when the server under test is in an available state, according to the first detection message and the first The first interval between response messages determines the performance level of the server under test. This is mainly because the interval length can reflect the response speed of the server under test to a certain extent. Therefore, the embodiment of the present invention can combine the working status and response speed of the server under test to determine the more differentiated status of the server under test. The high performance level improves the accuracy of performance test results. In this way, the rationality of the load balancing device performing load balancing based on the performance detection results of the embodiments of the present invention is improved, thereby ensuring that the allocated servers can provide client users with access services of good quality.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments described in this application, and those skilled in the art can also obtain other drawings based on these drawings.

图1是本发明实施例DNS服务器性能检测的组网示意图;FIG. 1 is a schematic diagram of a network for DNS server performance detection in an embodiment of the present invention;

图2是本发明实施例递归查询的示意图;Fig. 2 is the schematic diagram of the recursive query of the embodiment of the present invention;

图3是本发明实施例服务器性能检测方法的流程示意图;3 is a schematic flow diagram of a server performance detection method according to an embodiment of the present invention;

图4-1为本发明实施例服务器性能检测过程的一种时序示意图;FIG. 4-1 is a schematic diagram of a timing sequence of a server performance detection process according to an embodiment of the present invention;

图4-2为本发明实施例服务器性能检测过程的另一种时序示意图;FIG. 4-2 is another schematic diagram of the sequence of the server performance detection process according to the embodiment of the present invention;

图4-3为本发明实施例服务器性能检测过程的再一种时序示意图;FIG. 4-3 is another schematic diagram of the sequence of the server performance detection process according to the embodiment of the present invention;

图5是本发明实施例服务器性能检测装置的构成示意图;5 is a schematic diagram of the composition of a server performance detection device according to an embodiment of the present invention;

图6是本发明实施例服务器性能检测设备的构成示意图。FIG. 6 is a schematic diagram of a server performance detection device according to an embodiment of the present invention.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和实施方式对本发明实施例作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and implementation manners.

在介绍本发明实施例技术方案之前,先对本发明的具体应用场景进行解释说明。Before introducing the technical solutions of the embodiments of the present invention, the specific application scenarios of the present invention will be explained first.

服务负载均衡技术提供了一种廉价有效透明的方法,用来扩展网络设备和服务器的带宽、增加吞吐量、加强网络数据处理能力、提高网络的灵活性和可用性。在需要进行负载均衡时,负载均衡设备会将客户端用户的访问请求分配到多台服务器上,由这多台服务器并行为客户端用户提供访问服务。Service load balancing technology provides a cheap, effective and transparent method to expand the bandwidth of network devices and servers, increase throughput, strengthen network data processing capabilities, and improve network flexibility and availability. When load balancing is required, the load balancing device will distribute the client user's access requests to multiple servers, and these multiple servers will provide client users with access services in parallel.

为了使服务器可以为客户端用户提供良好的服务,目前,主要通过服务器工作状态(可体现为可用状态、不可用状态两种)来反映服务器性能,再由负载均衡设备利用负载均衡算法,从可用状态服务器中选取分配给客户端用户的服务器。下面结合图1所示DNS(DomainNameSystem,域名系统)性能检测组网示意图,对现有的服务器性能检测过程进行解释说明,其中第一DNS服务器(128.18.52.55)作为被测服务器。In order to enable the server to provide good services for client users, at present, the server performance is mainly reflected through the server working status (which can be reflected as available status and unavailable status), and then the load balancing device uses the load balancing algorithm to start from the available status. Select the server assigned to the client user in Status Server. In the following, the existing server performance testing process will be explained in conjunction with the DNS (Domain Name System, Domain Name System) performance testing network schematic diagram shown in FIG.

首先,在确保全网接口运行正常(可以理解为接口状态为UP)的情况下,负载均衡设备(128.18.52.51)使用DNS协议向被测DNS服务器(128.18.52.55)发起DNS请求(也即上文中的检测报文),如,请求访问域名为www.huawei.com对应的服务器,此时,DNS请求中至少携带请求访问的域名、识别码(识别码由DNS请求发送方产生,用于辨识查询和响应,并将相互对应的查询和响应进行配对。识别码可标示为TransactionID)。First, under the condition of ensuring that the interface of the entire network is running normally (it can be understood that the interface status is UP), the load balancing device (128.18.52.51) uses the DNS protocol to initiate a DNS request to the DNS server under test (128.18.52.55) (that is, up The detection message in the text), for example, requesting access to the server corresponding to the domain name www.huawei.com, at this time, the DNS request carries at least the domain name requested for access and an identification code (the identification code is generated by the sender of the DNS request and used to identify query and response, and pair the corresponding query and response. The identification code can be marked as TransactionID).

其次,被测DNS服务器接收到DNS请求后,执行以下三个动作:一是,进行域名解析得到域名对应的服务器的IP地址;二是,获取DNS请求中的识别码;三是,将IP地址和识别码添加到DNS响应(也即上文中的响应报文),并将DNS响应发送至负载均衡设备。Secondly, after receiving the DNS request, the DNS server under test performs the following three actions: first, perform domain name resolution to obtain the IP address of the server corresponding to the domain name; second, obtain the identification code in the DNS request; third, convert the IP address to and the identification code are added to the DNS response (that is, the response message above), and the DNS response is sent to the load balancing device.

最后,负载均衡设备接收到DNS响应后,判断响应中的识别码是否与请求中的识别码相一致,如果一致,则判定被测DNS服务器的工作状态为可用状态;如果不一致,则判定被测DNS服务器的工作状态为不可用状态,对应于此,负载均衡设备会修正为用户分配服务器的算法,暂时不将这种处于不可用状态的DNS服务器分配给用户使用。Finally, after the load balancing device receives the DNS response, it judges whether the identification code in the response is consistent with the identification code in the request. If it is consistent, it determines that the working status of the DNS server under test is available; The working state of the DNS server is unavailable. Correspondingly, the load balancing device will modify the algorithm for assigning servers to users, and will not assign such unavailable DNS servers to users for the time being.

基于上述现有服务器性能检测方案,可保证分配给用户的服务器能为用户提供访问服务,但却无法保证其能为用户提供质量良好的访问服务。下面对影响服务器服务质量的因素进行举例说明。Based on the above-mentioned existing server performance detection scheme, it can be guaranteed that the server allocated to the user can provide the user with access service, but it cannot guarantee that the server can provide the user with good quality access service. The factors that affect the service quality of the server are illustrated below with examples.

因素一,DNS服务器本地未缓存域名与IP地址的映射关系。The first factor is that the mapping relationship between the domain name and the IP address is not cached locally on the DNS server.

客户端接收到用户输入的http://www.huawei.com后,即会向负载均衡设备为本客户端分配的DNS服务器(这种为客户端分配的DNS服务器可称为LocalDNS服务器)发送DNS请求。对应地,LocalDNS服务器接收到DNS请求后,先查询其本地缓存中是否缓存有www.huawei.com的有效映射关系:After the client receives the http://www.huawei.com entered by the user, it will send DNS to the DNS server assigned to the client by the load balancing device (the DNS server assigned to the client can be called a LocalDNS server). ask. Correspondingly, after the LocalDNS server receives the DNS request, it first checks whether there is a valid mapping relationship of www.huawei.com cached in its local cache:

如果有,则直接根据该映射关系进行域名解析,得到www.huawei.com对应的服务器的IP地址,如此,LocalDNS服务器就可以较短的时间、较少的资源消耗来响应客户端请求,为用户提供高质量的访问服务。If yes, perform domain name resolution directly according to the mapping relationship to obtain the IP address of the server corresponding to www.huawei.com. In this way, the LocalDNS server can respond to client requests in a short time and with less resource consumption, providing services for users. Provide high-quality access services.

如果没有,则进行递归查询,具体可参见图2所示查询示意图。LocalDNS服务器从本机预配置的根DNS服务器列表中选取一个根DNS服务器,并向其发送查询www.huawei.com的请求。因为根DNS服务器中记录了顶级域对应的权威DNS服务器,故在本示例中根DNS服务器会向LocalDNS服务器返回.com域对应的权威DNS服务器的IP地址。如此,LocalDNS服务器就可继续向.com域对应的权威DNS服务器发起www.huawei.com的域名解析请求,由.com域对应的权威DNS服务器向LocalDNS服务器返回huawei.com对应的授权域服务器的IP地址。最后,LocalDNS服务器继续向huawei.com对应的授权域服务器发起www.huawei.com的域名解析请求,由huawei.com对应的授权域服务器向LocalDNS服务器返回www.huawei.com对应的服务器的IP地址,进而再通过LocalDNS服务器将解析出的IP地址返回给客户端浏览器,通过浏览器向www.huawei.com对应的服务器IP地址的80端口发起HTTPGET指令,如此,服务器就可响应客户端请求,向其返回客户端用户请求的内容。If not, a recursive query is performed. For details, refer to the query schematic diagram shown in FIG. 2 . The LocalDNS server selects a root DNS server from the root DNS server list preconfigured on the machine, and sends a request to query www.huawei.com to it. Because the authoritative DNS server corresponding to the top-level domain is recorded in the root DNS server, in this example the root DNS server will return the IP address of the authoritative DNS server corresponding to the .com domain to the LocalDNS server. In this way, the LocalDNS server can continue to initiate a domain name resolution request for www.huawei.com to the authoritative DNS server corresponding to the .com domain, and the authoritative DNS server corresponding to the .com domain returns the IP address of the authorized domain server corresponding to huawei.com to the LocalDNS server address. Finally, the LocalDNS server continues to initiate a domain name resolution request for www.huawei.com to the authorized domain server corresponding to huawei.com, and the authorized domain server corresponding to huawei.com returns the IP address of the server corresponding to www.huawei.com to the LocalDNS server. Then, the resolved IP address is returned to the client browser through the LocalDNS server, and the browser initiates an HTTP GET command to port 80 of the server IP address corresponding to www.huawei.com. In this way, the server can respond to the client request and send It returns the content requested by the client user.

由上述递归查询过程可知,在LocalDNS服务器本地未缓存域名与IP地址的映射关系时,LocalDNS服务器需要花费较长的时间、较多的资源消耗来响应客户端请求,为用户提供的访问质量较差。From the above recursive query process, it can be seen that when the LocalDNS server does not cache the mapping relationship between domain names and IP addresses locally, the LocalDNS server takes a long time and consumes more resources to respond to client requests, and the access quality provided to users is poor. .

因素二,DNS服务器承载的负载较多。The second factor is that the DNS server bears a large load.

在DNS服务器为可用状态时,服务器承载负载的数量也会对服务器服务质量造成影响。一般情况下,服务器承载负载的数量与服务器响应时长成反比关系,即,服务器承载负载的数量越少,其响应客户端请求的时间越短;反之则响应时间越长。仍以图1所示性能检测组网示意图为例,第一DNS服务器(128.18.52.55)承载的负载数已接近满荷,第二DNS服务器(128.18.52.56)相对较为空闲,若二者均为可用状态,则负载均衡过程中,负载均衡设备可能会将这两个服务器分配给客户端。一般情况下,客户端向为其分配的服务器发送访问请求时,不会做任何加权或限制处理,如此,就可能导致第一DNS服务器上不断加入新的负载,并不断增加新的DNS请求,致使第一DNS服务器过载甚至崩溃。When the DNS server is available, the amount of load on the server will also affect the quality of service of the server. In general, the amount of load on the server is inversely proportional to the length of the server's response, that is, the less the load on the server, the shorter the time it takes to respond to client requests; otherwise, the longer the response time. Still taking the performance testing network diagram shown in Figure 1 as an example, the load carried by the first DNS server (128.18.52.55) is close to full, and the second DNS server (128.18.52.56) is relatively idle. In the available state, during the load balancing process, the load balancing device may assign these two servers to the client. Generally, when a client sends an access request to its assigned server, it will not perform any weighting or restriction processing. In this way, it may cause new loads to be continuously added to the first DNS server, and new DNS requests will be continuously added. As a result, the first DNS server is overloaded or even crashed.

综上所述可知,现有服务器性能检测方案并不能正确反映出服务器性能,如此,就会影响负载均衡过程中为客户端分配服务器的合理性,致使所分配服务器为客户端提供服务的质量较差(如响应时间长)、代价较大(如消耗资源多)。本发明实施例方案即是为此而提出,旨在提供一种新的检测服务器性能的方法,提高检测结果的准确性,从而为提高负载均衡过程的合理性、提高所分配服务器的服务质量等提供一定的技术支持。To sum up, it can be seen that the existing server performance detection scheme cannot correctly reflect the server performance, so it will affect the rationality of allocating servers to clients in the process of load balancing, resulting in the quality of services provided by the allocated servers for clients. Poor (such as long response time), high cost (such as resource consumption). The scheme of the embodiment of the present invention is proposed for this purpose, and aims to provide a new method for detecting server performance, improve the accuracy of detection results, thereby improving the rationality of the load balancing process, improving the service quality of the allocated servers, etc. Provide some technical support.

参见图3,示出了本发明实施例服务器性能检测方法的流程示意图,可包括以下步骤:Referring to FIG. 3 , it shows a schematic flowchart of a server performance detection method according to an embodiment of the present invention, which may include the following steps:

步骤101,检测设备向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息。Step 101, the detection device sends a first detection message to the server under test, where the first detection message carries first information.

为了提高服务器性能检测的准确性,本发明实施例除了要检测服务器工作状态之外,还要检测服务器的响应速度,并根据这两方面信息确定服务器的性能等级。具体地,可通过服务器响应访问请求的时间来反映其响应速度,为此,检测设备可先向被测服务器发送第一检测报文,并等待接收被测服务器针对该第一检测报文返回的第一响应,将第一检测报文和第一响应报文之间的间隔时长作为服务器响应访问请求的时间。In order to improve the accuracy of server performance detection, the embodiment of the present invention not only detects the working state of the server, but also detects the response speed of the server, and determines the performance level of the server according to the two aspects of information. Specifically, the response speed of the server can be reflected by the time it takes for the server to respond to the access request. To this end, the detection device can first send a first detection packet to the server under test, and wait for the response returned by the server under test for the first detection packet. For the first response, the interval between the first detection packet and the first response packet is used as the time for the server to respond to the access request.

作为一种示例,检测设备可接收外部输入的第一信息,并生成第一检测报文发送至被测服务器。以被测服务器为DNS服务器为例,检测设备接收到外部输入的域名www.huawei.com后,即可使用DNS协议生成至少携带域名www.huawei.com的DNS请求。如此方案下,检测设备就可利用外部指定的第一信息对被测服务器进行性能检测。需要说明的是,第一信息可由外部检测人员通过命令行的方式输入至检测设备,或者也可以由外部设备(如负载均衡设备、客户端等)输入至检测设备,本发明实施例对此可不做具体限定。As an example, the detection device may receive first information input from the outside, and generate a first detection message and send it to the server under test. Taking the server under test as a DNS server as an example, after receiving the external domain name www.huawei.com, the detection device can use the DNS protocol to generate a DNS request carrying at least the domain name www.huawei.com. Under such a solution, the detection device can use the externally specified first information to perform performance detection on the server under test. It should be noted that the first information can be input to the detection device by an external detection personnel through a command line, or can also be input to the detection device by an external device (such as a load balancing device, a client, etc.), which is not required in this embodiment of the present invention. Be specific.

或者,作为一种示例,检测设备还可配置一预置数据库,且该预置数据库内保存有第一信息,这样,在需要进行性能检测时,检测设备可从预置数据中读取第一信息,生成第一检测报文发送至被测服务器。以被测服务器为DNS服务器为例,检测设备接收到外部输入的触发信息,即可从数据库中读取第一信息(如,www.huawei.com),并使用DNS协议生成至少携带www.huawei.com的DNS请求。如此方案,检测设备就可随机从数据库中读取第一信息,并主动利用第一信息对被测服务器进行性能检测。需要说明的是,触发信息可以是一条外部输入的触发指令,或者也可以是一条外部输入的DNS请求(该DNS请求携带的域名与第一检测报文携带的域名不同,如作为触发信息的DNS请求携带的域名为www.baidu.com,检测设备接收到触发信息后从数据库中读取域名www.huawei.com,并替换掉原DNS请求中的www.baidu.com,生成第一检测报文)。同样地,触发信息可由外部设备或外部检测人员输入,本发明实施例对触发信息的输入来源、表现形式等均可不做具体限定。Or, as an example, the detection device can also be configured with a preset database, and the first information is stored in the preset database, so that when performance detection is required, the detection device can read the first information from the preset data. information, generate a first detection packet and send it to the server under test. Taking the server under test as an example of a DNS server, the detection device can read the first information (for example, www.huawei.com) from the database after receiving the trigger information input from the outside, and use the DNS protocol to generate at least www.huawei. DNS requests for .com. With such a solution, the detection device can randomly read the first information from the database, and actively use the first information to perform performance detection on the server under test. It should be noted that the trigger information can be an externally input trigger instruction, or an externally input DNS request (the domain name carried by the DNS request is different from the domain name carried by the first detection message, such as the DNS The domain name carried in the request is www.baidu.com. After receiving the trigger information, the detection device reads the domain name www.huawei.com from the database, replaces www.baidu.com in the original DNS request, and generates the first detection packet ). Likewise, the trigger information may be input by an external device or an external inspector, and the embodiment of the present invention does not specifically limit the input source and expression form of the trigger information.

步骤102,所述检测设备接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系。Step 102, the detection device receives a first response message returned by the server under test corresponding to the first detection message, the first response message carries second information, and the second information is consistent with the There is a mapping relationship between the first information.

检测设备向被测服务器发送第一检测报文后,开始等待接收被测服务器向其反馈的第一响应报文,其中,第一响应报文中至少携带有第二信息,且第二信息与第一检测报文中的第一信息之间具有映射关系。仍以被测服务器为DNS服务器为例,第一检测报文为DNS请求,第一信息为请求访问的域名,第一响应报文为DNS应答报文,第二信息为提供域名对应服务的服务器的IP地址,映射关系为域名与IP地址之间的映射关系。After the detection device sends the first detection message to the server under test, it starts to wait for the first response message fed back by the server under test, wherein the first response message carries at least second information, and the second information is consistent with There is a mapping relationship between the first information in the first detection message. Still taking the server under test as a DNS server as an example, the first detection message is a DNS request, the first information is the domain name requested to access, the first response message is a DNS response message, and the second information is the server that provides services corresponding to the domain name IP address, the mapping relationship is the mapping relationship between domain names and IP addresses.

步骤103,所述检测设备确定所述被测服务器是否处于可用状态。Step 103, the detection device determines whether the server under test is in an available state.

检测设备向被测服务器发送第一检测报文,并接收到被测服务器返回的第一响应报文后,即可执行步骤103确定被测服务器的工作状态是否为可用状态。After the detection device sends the first detection message to the server under test and receives the first response message returned by the server under test, step 103 can be performed to determine whether the working state of the server under test is available.

作为一种示例,检测设备可根据识别码来确定被测服务器的工作状态。即,第一检测报文中除第一信息之外还携带识别码,第一响应报文中除第二信息之外还携带识别码,如此,检测设备就可按照上文所做介绍,根据识别码判断被测服务器工作状态是否为可用状态,具体过程此处不再进行赘述。As an example, the detection device may determine the working status of the server under test according to the identification code. That is, the first detection message carries an identification code in addition to the first information, and the first response message carries an identification code in addition to the second information. In this way, the detection device can follow the above introduction, according to The identification code judges whether the working status of the server under test is available, and the specific process will not be repeated here.

或者,作为一种示例,检测设备还可根据外部输入的指示信息,确定被测服务器的工作状态。具体地,外部设备(如,负载均衡设备、客户端等)可以按照上文所做介绍,根据第一检测报文和第一响应报文中携带的识别码判断被测服务器的工作状态,并将判断结果添加到指示信息中发送至检测设备;或者,外部检测人员在知晓被测服务器工作状态后,通过命令行的方式将被测服务器工作状态输入至检测设备,本发明实施例对此可不做具体限定。Or, as an example, the detection device may also determine the working state of the server under test according to the indication information input from the outside. Specifically, an external device (such as a load balancing device, a client, etc.) can judge the working status of the server under test according to the identification code carried in the first detection message and the first response message according to the above introduction, and Add the judgment result to the instruction information and send it to the detection device; or, after the external detection personnel know the working state of the server under test, they input the working state of the server under test into the detection device through the command line. Be specific.

步骤104,基于所述检测设备确定所述被测服务器处于可用状态,所述检测设备获取所述第一检测报文和所述第一响应报文之间的第一间隔时长。Step 104: Based on the detection device determining that the server under test is in an available state, the detection device acquires a first interval between the first detection message and the first response message.

步骤105,所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级。Step 105, the detection device determines the performance level of the server under test according to the first interval length.

经步骤103,若检测设备确定被测服务器处于可用状态,检测设备即可获取第一检测报文和第一响应报文之间的第一间隔时长,进而利用该第一间隔时长来确定被测服务器的性能等级。具体地,间隔时长越短,说明被测服务器的响应速度越快,性能越好;反之,则说明被测服务器的响应速度越慢,性能越差。若假设服务器性能等级越低表示服务器性能越好,则间隔时长(D)与性能等级(Y)之间的关系Y=f(D)可体现为正比例关系Y=kD,其中k为比例系数,可根据需要体现为任一正数。After step 103, if the detection device determines that the server under test is in an available state, the detection device can obtain the first interval between the first detection message and the first response message, and then use the first interval to determine the tested server. The performance class of the server. Specifically, the shorter the interval time, the faster the response speed of the server under test and the better the performance; otherwise, the slower the response speed of the server under test and the worse the performance. If it is assumed that the lower the server performance level is, the better the server performance is, then the relationship Y=f(D) between the interval duration (D) and the performance level (Y) can be expressed as a proportional relationship Y=kD, where k is a proportional coefficient, It can be expressed as any positive number as required.

作为一种示例,可将服务器性能等级划分为两级,由低到高依次为:性能好(可定义为等级1)、性能差(可定义为等级2),如此,便可设置一个间隔时长阈值,并在第一间隔时长不超过该阈值时,确定被测服务器的性能等级为性能好;在第一间隔时长超过该阈值时,确定被测服务器的性能等级为性能差。或者,还可设置一个性能阈值,即配置好k值后,根据Y=kD计算得到第一间隔时长对应的被测服务器性能值Y,并在Y不超过性能阈值时,确定被测服务器的性能等级为性能好;在Y超过性能阈值时,确定被测服务器的性能等级为性能差。具体地,阈值设置、k值配置等可根据实际使用需求而定,本发明实施例对此可不做具体限定。As an example, the server performance level can be divided into two levels, from low to high: good performance (can be defined as level 1), poor performance (can be defined as level 2), so that an interval can be set threshold, and when the first interval duration does not exceed the threshold, it is determined that the performance level of the server under test is good performance; when the first interval duration exceeds the threshold, it is determined that the performance level of the server under test is poor performance. Alternatively, a performance threshold can also be set, that is, after configuring the k value, calculate the performance value Y of the server under test corresponding to the first interval duration according to Y=kD, and determine the performance of the server under test when Y does not exceed the performance threshold The performance level is good; when Y exceeds the performance threshold, it is determined that the performance level of the server under test is poor performance. Specifically, the threshold setting, k value configuration, etc. may be determined according to actual usage requirements, which may not be specifically limited in this embodiment of the present invention.

另外,考虑到影响间隔时长的因素可能有多种,如,被测服务器本地是否缓存有映射关系、被测服务器承载负载的数量、被测服务器自身的处理能力、被测服务器与检测设备之间的网络环境等等,故,作为一种示例,还可将上述影响间隔时长的因素进行任意组合,并统计各组合下的间隔时长与服务器性能等级关系,将服务器性能等级划分为多级。如,最终划分的性能由高到低依次为:性能优(可定义为等级1)、性能良(可定义为等级2)、性能中(可定义为等级3)、性能差(可定义为等级4),且根据各组合的统计结果设置了各性能等级之间的阈值,如此,便可更为细致的确定被测服务器的性能等级。具体地,区分性能等级的阈值可体现为间隔时长阈值,如此,检测设备就可利用第一间隔时长与各间隔时长阈值相比较,确定出被测服务器的性能等级;或者,区分性能等级的阈值还可体现为性能阈值,如此,检测设备就可利用配置好的k值、第一间隔时长D计算得到被测服务器性能值Y,并使性能值Y与各性能阈值相比较,确定出被测服务器的性能等级。具体地,影响间隔时长的因素、各因素形成的组合、划分出的性能等级、阈值设置、k值配置等均可根据实际使用需求而定,本发明实施例对此可不做具体限定。In addition, considering that there may be many factors that affect the interval, such as whether there is a mapping relationship in the local cache of the server under test, the amount of load carried by the server under test, the processing capacity of the server under test itself, and the relationship between the server under test and the detection device. Therefore, as an example, the above-mentioned factors that affect the interval length can be combined arbitrarily, and the relationship between the interval length and the server performance level under each combination can be calculated, and the server performance level can be divided into multiple levels. For example, the performance of the final division from high to low is: excellent performance (can be defined as level 1), good performance (can be defined as level 2), medium performance (can be defined as level 3), poor performance (can be defined as level 4), and the thresholds between performance levels are set according to the statistical results of each combination, so that the performance level of the server under test can be determined in more detail. Specifically, the threshold for distinguishing performance levels can be embodied as an interval duration threshold, so that the detection device can compare the first interval duration with each interval duration threshold to determine the performance level of the server under test; or, the threshold for distinguishing performance levels It can also be embodied as a performance threshold. In this way, the detection device can use the configured k value and the first interval duration D to calculate the performance value Y of the server under test, and compare the performance value Y with each performance threshold to determine the value of the server under test. The performance class of the server. Specifically, the factors that affect the interval length, the combination of various factors, the divided performance level, the threshold setting, the k value configuration, etc. can all be determined according to actual usage requirements, which is not specifically limited in the embodiment of the present invention.

综上所述,本发明实施例在确定被测服务器处于可用状态后,还会结合检测报文与响应报文之间的间隔时长进一步明确被测服务器的性能等级,因为间隔时长可在一定程度上反映被测服务器处理请求的响应速度,故本发明实施例方案可提高服务器性能检测结果的准确性,从而提高负载均衡设备基于本发明实施例性能检测结果进行负载均衡的合理性,进而保证所分配服务器可以为客户端用户提供良好质量的访问服务。To sum up, in the embodiment of the present invention, after determining that the server under test is in an available state, the performance level of the server under test will be further clarified in combination with the interval between the detection message and the response message, because the interval time can vary to a certain extent. It reflects the response speed of the server under test to process the request, so the solution of the embodiment of the present invention can improve the accuracy of the server performance detection result, thereby improving the rationality of the load balancing device performing load balancing based on the performance detection result of the embodiment of the present invention, thereby ensuring that all The distribution server can provide client users with good quality access services.

需要说明的是,本发明实施例中的检测设备可以是一台独立设备,连接在客户端与被测服务器之间;或者,也可将检测设备的功能集成在负载均衡设备中,而不改变现网的连接关系,本发明实施例对此可不做具体限定。It should be noted that the detection device in the embodiment of the present invention can be an independent device connected between the client and the server under test; or, the function of the detection device can also be integrated in the load balancing device without changing The connection relationship of the live network may not be specifically limited in this embodiment of the present invention.

另外,还需要说明的是,如上文所举示例,本发明实施例中的被测服务器可体现为DNS服务器,或者,被测服务器还可体现为呼叫中心服务器、CDN(ContentDistributionNetwork,内容分发网络)中的内容分发服务器等等,可在本地缓存第一信息和第二信息映射关系的服务器。如果被测服务器为呼叫中心服务器,则第一检测报文为呼叫请求,第一信息为被呼叫用户的账号(一般可体现为被呼叫用户的电话号码),第一响应报文为呼叫响应,第二信息为被呼叫用户对应的客户端IP地址,映射关系为账号与IP地址之间的映射关系。如果被测服务器为内容分发服务器,则第一检测报文为内容访问请求,第一信息为请求访问的内容信息(可体现为内容对应的URL、关键字、标题等等),第一响应报文为内容访问响应,第二信息为缓存服务器的IP地址,映射关系为内容信息与缓存服务器IP地址之间的映射关系,需要说明的是,缓存服务器可以理解为,内容源服务器在本地的一个交互点,其从内容源服务器中获取内容信息对应的内容,并将内容缓存在本地,如此之后,客户端通过内容分发服务器提供的IP地址访问缓存服务器时,就可获得内容信息对应的内容。In addition, it should also be noted that, as the example above, the server under test in the embodiment of the present invention can be embodied as a DNS server, or the server under test can also be embodied as a call center server, CDN (ContentDistributionNetwork, content distribution network) The content distribution server and the like in the server can cache the mapping relationship between the first information and the second information locally. If the server under test is a call center server, then the first detection message is a call request, the first information is the account number of the called user (generally can be embodied as the phone number of the called user), and the first response message is a call response, The second information is the client IP address corresponding to the called user, and the mapping relationship is the mapping relationship between the account and the IP address. If the server under test is a content distribution server, the first detection message is a content access request, the first information is the content information of the requested access (which can be embodied as the URL, keywords, titles, etc. corresponding to the content), and the first response message The text is the content access response, the second information is the IP address of the cache server, and the mapping relationship is the mapping relationship between the content information and the IP address of the cache server. It should be noted that the cache server can be understood as a local content source server The interaction point obtains the content corresponding to the content information from the content source server, and caches the content locally. Then, when the client accesses the cache server through the IP address provided by the content distribution server, the content corresponding to the content information can be obtained.

下面以DNS服务器为例,对本发明实施例性能检测的过程进行解释说明。The following takes the DNS server as an example to explain the performance detection process of the embodiment of the present invention.

实施例1Example 1

针对被测DNS服务器,检测设备配置的预置数据库中保存有多个域名,具体可参见下表1所示:For the DNS server under test, multiple domain names are saved in the preset database configured by the testing device, as shown in Table 1 below for details:

编号Numbering 域名domain name 11 www.huawei.comwww.huawei.com 22 www.baidu.comwww.baidu.com 33 www.sina.comwww.sina.com 44 www.cnki.netwww.cnki.net

参见图4-1所示时序图,本实施例的性能检测过程可包括以下步骤:Referring to the sequence diagram shown in Figure 4-1, the performance detection process of this embodiment may include the following steps:

1、检测设备接收外部输入的DNS请求,该请求中携带域名www.sina.com,这样,检测设备即可被触发从预置数据库中读取一个检测用域名,如,读取的域名为www.huawei.com(即上文中的第一信息)。1. The detection device receives an externally input DNS request, which carries the domain name www.sina.com, so that the detection device can be triggered to read a detection domain name from the preset database, for example, the read domain name is www .huawei.com (that is, the first information above).

2、检测设备更改DNS请求的报文封装模式,将其中的www.sina.com更改为www.huawei.com,形成新的DNS请求。作为一种示例,检测设备可拆封DNS请求的Queries字段,并将检测用域名添加到Queries字段的Name中,形成新的DNS请求。2. The detection device changes the packet encapsulation mode of the DNS request, changing www.sina.com to www.huawei.com to form a new DNS request. As an example, the detection device may decapsulate the Queries field of the DNS request, and add the domain name used for detection to the Name of the Queries field to form a new DNS request.

3、检测设备向被测DNS服务器发送更改后的DNS请求(即上文中的第一检测报文),该请求中携带域名www.huawei.com、识别码TransactionID。3. The detection device sends a modified DNS request (that is, the first detection message above) to the DNS server under test. The request carries the domain name www.huawei.com and the identification code TransactionID.

4、被测DNS服务器接收检测设备发送的DNS请求,进行域名解析得到与www.huawei.com具有映射关系的IP地址(即上文中的第二信息),并将IP地址和从中DNS请求中获取的识别码添加到DNS应答报文(即上文中的第一响应报文)中,向检测设备发送DNS应答报文。4. The DNS server under test receives the DNS request sent by the detection device, performs domain name resolution to obtain the IP address that has a mapping relationship with www.huawei.com (that is, the second information above), and obtains the IP address and the DNS request from it. The identification code is added to the DNS response message (that is, the first response message above), and the DNS response message is sent to the detection device.

5、检测设备接收被测DNS服务器发送的DNS应答报文,并确定如下两个信息:5. The detection device receives the DNS response message sent by the DNS server under test, and determines the following two information:

(1)被测DNS服务器的工作状态Status(S),可通过比对识别码获得,此处不再赘述。作为一个示例,被测DNS服务器为不可用状态时,可记录S=0,被测DNS服务器为可用状态时,可记录S=1。(1) The working status (S) of the DNS server under test can be obtained by comparing the identification codes, and will not be repeated here. As an example, when the DNS server under test is unavailable, S=0 may be recorded, and when the DNS server under test is available, S=1 may be recorded.

(2)记录发送DNS请求的时间、接收DNS应答报文的时间,得到间隔时长Delay(D)(即上文中的第一间隔时长)。(2) Record the time of sending the DNS request and the time of receiving the DNS response message to obtain the interval duration Delay(D) (that is, the first interval duration above).

6、在确定被测DNS服务器为可用状态(即S=1)时,检测设备利用间隔时长D计算被测DNS服务器的性能值Y=kD*S,其中,k的取值可根据需要而定,一般取为正数。6. When determining that the DNS server under test is in an available state (i.e. S=1), the detection device uses the interval duration D to calculate the performance value Y=kD*S of the DNS server under test, wherein the value of k can be determined as required , generally taken as a positive number.

7、检测设备利用计算出的性能值Y与预设性能阈值相比较,得到被测DNS服务器的性能等级。如此,就完成了本发明实施例的服务器性能检测过程。7. The detection device compares the calculated performance value Y with the preset performance threshold to obtain the performance level of the DNS server under test. In this way, the server performance detection process of the embodiment of the present invention is completed.

需要说明的是,检测设备被触发开始进行性能检测后,可如实施例1所做介绍,只从预置数据库中读取一个检测用域名,并利用该域名对被测DNS服务器进行性能检测;或者,还可循环往复的进行性能检测,即按照实施例1所示方案,利用一个读取出的域名完成一次性能检测之后,还可继续从预置数据库中读取另一个域名,继续对被测DNS服务器进行性能检测,如此循环,直至利用数据库中的每个域名进行一次性能检测,或直至被控制停止性能检测过程为止。如此,便可对至少两个域名的性能检测结果进行平均处理,并将均值作为被测DNS服务器的性能检测结果,进一步提高本发明实施例性能检测结果的准确性。It should be noted that, after the detection device is triggered to perform performance detection, as described in Embodiment 1, only one domain name for detection is read from the preset database, and the domain name is used to perform performance detection on the DNS server under test; Alternatively, the performance test can also be performed in a loop, that is, according to the solution shown in Embodiment 1, after a performance test is completed using a read domain name, another domain name can be read from the preset database, and the read domain name can be continued. The test DNS server is used for performance testing, and so on, until each domain name in the database is used for performance testing, or until the performance testing process is stopped by the control. In this way, the performance detection results of at least two domain names can be averaged, and the average value can be used as the performance detection result of the DNS server under test, which further improves the accuracy of the performance detection results of the embodiment of the present invention.

另外,需要说明的是,本发明实施例中,利用某个域名进行一次性能检测后,还可重新从读取数据库读取该域名,再次利用其进行一次性能检测。这主要是因为,影响服务器性能的因素可能会随时发生变化,如,被测DNS服务器初始时并未缓存域名www.huawei.com与IP地址的映射关系,但在利用域名www.huawei.com第一次进行服务器性能检测的过程中,被测DNS服务器会通过递归查询的方式获得该映射关系,并缓存在被测DNS服务器本地,导致影响服务器性能的因素发生变化;或者,被测DNS服务器的带载情况发生变化、被测DNS服务器处理的请求数量发生变化、被测DNS服务器与检测设备之间的网络环境发生变化等等,均可能导致被测服务器的性能检测结果发生变化,故,可利用同一域名对被测DNS服务器进行多次性能检测,如此,亦可进一步提高本发明实施例性能检测结果的准确性。作为一种示例,可将某个域名对应的最后一次性能检测结果作为被测DNS服务器的性能检测结果,也可将该域名对应的多次性能检测结果的均值作为被测DNS服务器的性能检测结果,本发明实施例对此可不做具体限定。In addition, it should be noted that, in the embodiment of the present invention, after a performance test is performed by using a certain domain name, the domain name may be read from the read database again, and then used to perform a performance test again. This is mainly because factors that affect server performance may change at any time. For example, the DNS server under test did not cache the mapping relationship between the domain name www.huawei.com and the IP address at the beginning, but when using the domain name www.huawei.com During a server performance testing process, the DNS server under test will obtain the mapping relationship through recursive query, and cache it locally on the DNS server under test, resulting in changes in factors affecting server performance; or, the DNS server under test Changes in load conditions, changes in the number of requests processed by the tested DNS server, changes in the network environment between the tested DNS server and the detection device, etc., may cause changes in the performance test results of the tested server. The same domain name is used to perform multiple performance tests on the DNS server under test. In this way, the accuracy of the performance test results of the embodiment of the present invention can be further improved. As an example, the last performance test result corresponding to a domain name can be used as the performance test result of the DNS server under test, or the average value of multiple performance test results corresponding to the domain name can be used as the performance test result of the DNS server under test , which may not be specifically limited in this embodiment of the present invention.

实施例2Example 2

针对被测DNS服务器,检测设备配置的预置数据库中保存有多个域名、及每个域名对应的级别信息,具体可参见下表2所示:For the DNS server under test, multiple domain names and the level information corresponding to each domain name are saved in the preset database configured by the detection device, as shown in Table 2 below for details:

编号Numbering 域名domain name 级别信息level information 11 www.huawei.comwww.huawei.com 11 22 www.baidu.comwww.baidu.com 22 33 www.sina.comwww.sina.com 22 44 www.cnki.netwww.cnki.net 11

本实施例中,还为数据库中的域名设置一个对应的级别信息,并结合被测服务器的工作状态、间隔时长、以及级别信息来确定被测服务器的性能等级。参见图4-2所示时序图,本实施例的性能检测过程可包括以下步骤:In this embodiment, a corresponding level information is also set for the domain name in the database, and the performance level of the server under test is determined in combination with the working status, interval time, and level information of the server under test. Referring to the sequence diagram shown in Figure 4-2, the performance detection process of this embodiment may include the following steps:

步骤1~5与上文实施例1的步骤1~5相同,此处不再赘述。Steps 1 to 5 are the same as Steps 1 to 5 in Embodiment 1 above, and will not be repeated here.

6、在确定被测DNS服务器为可用状态(即S=1)时,检测设备利用间隔时长D、级别信息X计算被测DNS服务器的性能值Y=(kD+mX)*S,其中,k、m的取值可根据需要而定,一般取为正数。6. When determining that the DNS server under test is in an available state (i.e. S=1), the detection device uses the interval duration D and the level information X to calculate the performance value Y=(kD+mX)*S of the DNS server under test, where k , The value of m can be determined according to the needs, and it is generally taken as a positive number.

7、检测设备利用计算出的性能值Y与预设性能阈值相比较,得到被测DNS服务器的性能等级。如此,就完成了本发明实施例的服务器性能检测过程。7. The detection device compares the calculated performance value Y with the preset performance threshold to obtain the performance level of the DNS server under test. In this way, the server performance detection process of the embodiment of the present invention is completed.

具体地,可根据域名所标识的网络资源被访问频率设置域名的级别信息,作为一种示例,级别信息可体现为:常用(可对应级别1)、次常用(可对应级别2)、不常用(可对应级别3,表2中未体现)。或者,还可根据域名所属的类别设置域名对应的级别信息,也即,根据用户的访问习惯设置各种服务类别的级别。如,用户经常访问通信技术类网站,则可将该服务类别设置为级别1,这样,在某个域名对应的服务器可为用户提供通信技术类服务时,则可将该域名的级别信息设置为1。Specifically, the level information of the domain name can be set according to the access frequency of the network resource identified by the domain name. As an example, the level information can be embodied as: commonly used (corresponding to level 1), less commonly used (corresponding to level 2), and rarely used (Corresponding to level 3, not shown in Table 2). Alternatively, the level information corresponding to the domain name can also be set according to the category to which the domain name belongs, that is, the levels of various service categories can be set according to the user's access habits. For example, if a user frequently visits communication technology websites, the service category can be set to level 1. In this way, when the server corresponding to a domain name can provide communication technology services for users, the level information of the domain name can be set to 1.

需要说明的是,结合Y=(kD+mX)*S可知,级别信息与性能等级间的关系,应与间隔时长与性能等级间的关系保持一致,也就是说,若间隔时长与性能等级间成正比例关系,则级别信息与性能等级间也要成正比例关系。这种情况下,域名对应的级别信息越低(即被访问频率高、或符合用户访问习惯),检测报文与响应报文之间的间隔时长越小,计算得到的服务器性能值Y就越小,确定出的服务器性能等级就越低(即性能越好)。It should be noted that, in combination with Y=(kD+mX)*S, it can be known that the relationship between level information and performance level should be consistent with the relationship between interval duration and performance level, that is, if the interval duration and performance level If there is a proportional relationship, then there should be a proportional relationship between the level information and the performance level. In this case, the lower the level of information corresponding to the domain name (that is, the higher the frequency of access, or in line with user access habits), the shorter the interval between the detection message and the response message, and the higher the calculated server performance value Y is. The smaller the value, the lower the determined server performance level (that is, the better the performance).

此外,为域名设置级别信息的过程可由检测设备执行,也可由外部其它设备执行后加载到检测设备,本发明实施例对此可不做具体限定。In addition, the process of setting the level information for the domain name may be executed by the detection device, or may be executed by other external devices and loaded to the detection device, which is not specifically limited in this embodiment of the present invention.

另外,还需要说明的是,Y=(kD+mX)*S中的系数k、m的取值可根据实际需要自行配置。下面以两种具体场景为例,对配置k、m取值的方式进行解释说明。In addition, it should be noted that the values of the coefficients k and m in Y=(kD+mX)*S can be configured according to actual needs. The following uses two specific scenarios as examples to explain how to configure the values of k and m.

场景一,配置k、m取值来区分间隔时长、级别信息二者对计算服务器性能值Y的影响,即,通过配置k、m取值来设置间隔时长、级别信息的权重。Scenario 1: Configure the values of k and m to distinguish the impact of the interval duration and level information on the calculation server performance value Y, that is, set the weight of the interval duration and level information by configuring the values of k and m.

场景二,在间隔时长、级别信息的量级不一致时,通过配置k、m取值来保证计算出的服务器性能值Y的合理性。如,某个域名对应的级别信息X=1、间隔时长D=30ms,则可将m的取值配置为m=10,将k的取值配置为k=1,如此,计算得到的服务器性能值Y=40,使性能值Y的取值更为合理。需要说明的是,如此方式下,为了保证检测过程中计算性能值的准确性和一致性,应保持k、m取值不变,除非现网变化等原因导致间隔时长、级别信息的量级发生变化时,才调整二者的取值。Scenario 2: When the interval time and the magnitude of the level information are inconsistent, configure the values of k and m to ensure the rationality of the calculated server performance value Y. For example, if the level information corresponding to a domain name is X=1, and the interval duration D=30ms, then the value of m can be configured as m=10, and the value of k can be configured as k=1. In this way, the calculated server performance The value Y=40 makes the performance value Y more reasonable. It should be noted that, in this way, in order to ensure the accuracy and consistency of the calculated performance values during the detection process, the values of k and m should be kept unchanged, unless the interval length and the magnitude of the level information occur due to changes in the existing network. When the value changes, the values of the two are adjusted.

需要说明的是,为了进一步提高本发明实施例性能检测结果的准确性,本实施例也可如实施例1处所做介绍,利用一个读取出的域名完成一次性能检测之后,还可继续从预置数据库中读取另一个域名,继续对被测DNS服务器进行性能检测,如此循环,直至利用数据库中的每个域名进行一次性能检测,或直至被控制停止性能检测过程为止。或者,利用某个域名进行一次性能检测后,还可重新从读取数据库读取该域名,再次利用其进行一次性能检测。对此,本发明实施例均可不做具体限定。It should be noted that, in order to further improve the accuracy of the performance test results of the embodiment of the present invention, this embodiment can also be described in Embodiment 1. After a performance test is completed by using a read domain name, it can also continue from Read another domain name from the preset database, and continue to perform performance testing on the DNS server under test, and so on, until each domain name in the database is used to perform a performance test, or until the process of performance testing is stopped by the control. Or, after using a certain domain name to perform a performance test, the domain name can be read from the read database again, and then used to perform a performance test again. In this regard, the embodiments of the present invention do not make specific limitations.

实施例3Example 3

在上述实施例的基础上,检测设备配置的预置数据库中还可保存多个服务器的身份标识,以及每个服务器的身份标识与域名之间的对应关系。当然,在实施例2所示表2的基础上,数据库中还可保存每个域名对应的级别信息,具体可参见下表3所示:On the basis of the above-mentioned embodiments, the preset database configured by the detection device may also store the identities of multiple servers, and the corresponding relationship between the identities of each server and the domain name. Of course, on the basis of Table 2 shown in Embodiment 2, the level information corresponding to each domain name can also be stored in the database, as shown in Table 3 below for details:

性能检测过程可包括以下步骤:The performance testing process may include the following steps:

在上文实施例1、2所示方案的基础上,检测设备执行步骤1读取到检测用域名(即上文中的第一信息)后,还可执行如下步骤:检测设备根据所述第一信息,从所述预置数据库中保存的对应关系中选择出所述被测服务器的身份标识。这样,检测设备就可将更改后的DNS请求发送至具有选择出的身份标识的被测服务器。需要说明的是,选择被测服务器身份标识的步骤可在步骤2之前执行,也可在步骤2之后执行,或与步骤2同时执行,本发明实施例对此可不做具体限定,只要在执行步骤3之前选择出被测服务器即可。On the basis of the solutions shown in Embodiments 1 and 2 above, after the detection device performs step 1 to read the domain name for detection (that is, the first information in the above), it can also perform the following steps: the detection device according to the first information, and select the identity of the server under test from the corresponding relationships stored in the preset database. In this way, the detection device can send the modified DNS request to the server under test with the selected identity. It should be noted that the step of selecting the identity of the server under test can be performed before step 2, after step 2, or simultaneously with step 2, which is not specifically limited in this embodiment of the present invention, as long as the step 3 Select the server under test before.

也就是说,在检测设备确定出性能检测过程中使用的域名后,如,检测用域名为www.baidu.com,则可据此从预置数据库中查找该域名对应的被测服务器的身份标识1,使检测设备知晓当前的被测对象是谁,进而向具有身份标识1的被测服务器发送检测报文。或者,检测设备还可确定出多个检测用域名,如,检测用域名为www.baidu.com和www.huawei.com,则可据此查找这2个域名共同对应的被测服务器的身份标识1,进而向具有身份标识1的被测服务器发送检测报文(如此情况下,检测设备先后向被测服务器发送两个检测报文,两个检测报文分别携带不同域名)。That is to say, after the detection device determines the domain name used in the performance detection process, for example, the domain name used for detection is www.baidu.com, the identity of the server under test corresponding to the domain name can be searched from the preset database accordingly 1. Let the detection device know who the current object under test is, and then send a detection message to the server under test with ID 1. Alternatively, the detection device can also determine multiple domain names for detection, for example, if the domain names for detection are www.baidu.com and www.huawei.com, then the identity of the server under test corresponding to the two domain names can be searched accordingly 1, and then send a detection message to the server under test with identity 1 (in this case, the detection device sends two detection messages to the server under test successively, and the two detection messages carry different domain names respectively).

需要说明的是,具有不同身份标识的被测服务器可能会对应同一域名,即,多台服务器均可对某个域名进行域名解析。如上表3所举示例,具有身份标识1、2的被测服务器均对应域名www.huawei.com,则检测设备确定出性能检测过程中使用的域名www.huawei.com后,便可利用该域名分别对身份标识1、2的被测服务器进行性能检测,或者,也可预先设定检测规则,在出现这种情况时,只利用该域名对规则指定的被测服务器进行性能检测,本发明实施例对此可不做具体限定。It should be noted that the servers under test with different identities may correspond to the same domain name, that is, multiple servers can perform domain name resolution on a certain domain name. As shown in Table 3 above, the tested servers with IDs 1 and 2 correspond to the domain name www.huawei.com. After the testing device determines the domain name www.huawei.com used in the performance testing process, it can use the domain name Carry out performance detection to the server under test of identity mark 1, 2 respectively, perhaps, also can preset detection rule, when this situation occurs, only utilize this domain name to carry out performance detection to the server under test specified by rule, the present invention implements For example, there is no specific limitation on this.

同样地,为了提高本发明实施例性能检测结果的准确性,本实施例也可如实施例1处所做介绍,利用不同域名对同一被测服务器进行多次性能检测,或者也可利用同一域名对同一被测服务器进行多次性能检测,本发明实施例对此可不做具体限定。Similarly, in order to improve the accuracy of the performance test results of this embodiment of the present invention, this embodiment can also use different domain names to perform multiple performance tests on the same server under test as described in Embodiment 1, or use the same domain name Multiple performance tests are performed on the same server under test, which is not specifically limited in this embodiment of the present invention.

实施例4Example 4

如上文所做介绍,本发明实施例可利用不同域名对同一被测服务器进行多次性能检测,以提高本发明实施例性能检测结果的准确性。下面以表3所举示例为例,对利用www.baidu.com和www.huawei.com计算具有身份标识1的被测服务器的性能等级的过程进行解释说明。As introduced above, the embodiments of the present invention can use different domain names to perform multiple performance tests on the same server under test, so as to improve the accuracy of the performance test results of the embodiments of the present invention. Taking the example in Table 3 as an example, the process of calculating the performance level of the server under test with identity 1 by using www.baidu.com and www.huawei.com is explained below.

参见图4-3所示时序图,本实施例的性能检测过程可包括以下步骤:Referring to the timing diagram shown in Figure 4-3, the performance detection process of this embodiment may include the following steps:

1、检测设备接收外部输入的携带域名www.sina.com的DNS请求,并被触发从预置数据库中读取一个检测用域名,如读取的域名为www.baidu.com(即上文中的第一信息)。1. The detection device receives an externally input DNS request carrying the domain name www.sina.com, and is triggered to read a detection domain name from the preset database. For example, the read domain name is www.baidu.com (that is, the above-mentioned first message).

2、检测设备查找预置数据库,选择出域名www.baidu.com对应的服务器身份标识1,并将具有该标识的DNS服务器确定为被测DNS服务器。2. The detection device searches the preset database, selects the server ID 1 corresponding to the domain name www.baidu.com, and determines the DNS server with this ID as the DNS server to be tested.

3、检测设备更改DNS请求的报文封装模式,将其中的www.sina.com更改为www.baidu.com,形成新的DNS请求。3. The detection device changes the packet encapsulation mode of the DNS request, and changes www.sina.com to www.baidu.com to form a new DNS request.

4、检测设备向被测DNS服务器发送更改后的DNS请求(即上文中的第一检测报文),该请求中携带域名www.baidu.com、识别码TransactionID。4. The detection device sends a modified DNS request (that is, the first detection message above) to the DNS server under test, and the request carries the domain name www.baidu.com and the identification code TransactionID.

5、被测DNS服务器接收检测设备发送的DNS请求,进行域名解析得到与www.baidu.com具有映射关系的IP地址(即上文中的第二信息),并将IP地址和从中DNS请求中获取的识别码添加到DNS应答报文(即上文中的第一响应报文)中,向检测设备发送DNS应答报文。5. The DNS server under test receives the DNS request sent by the detection device, performs domain name resolution to obtain the IP address that has a mapping relationship with www.baidu.com (that is, the second information above), and obtains the IP address and the DNS request from it The identification code is added to the DNS response message (that is, the first response message above), and the DNS response message is sent to the detection device.

6、检测设备接收被测DNS服务器发送的DNS应答报文,并确定如下两个信息:6. The detection device receives the DNS response message sent by the DNS server under test, and determines the following two information:

(1)被测DNS服务器的工作状态Status(S),可通过比对识别码获得,此处不再赘述。作为一个示例,被测DNS服务器为不可用状态时,可记录S=0,被测DNS服务器为可用状态时,可记录S=1。(1) The working status (S) of the DNS server under test can be obtained by comparing the identification codes, and will not be repeated here. As an example, when the DNS server under test is unavailable, S=0 may be recorded, and when the DNS server under test is available, S=1 may be recorded.

(2)记录发送第一检测报文的时间、接收第一响应报文的时间,得到间隔时长Delay(D)(即上文中的第一间隔时长)。(2) Record the time of sending the first detection message and the time of receiving the first response message to obtain the interval duration Delay(D) (that is, the first interval duration above).

7、检测设备确定被测DNS服务器为可用状态时,利用Y=(kD+mX)*S计算第一间隔时长对应的被测DNS服务器的性能值Y1。7. When the detection device determines that the DNS server under test is available, it uses Y=(kD+mX)*S to calculate the performance value Y1 of the DNS server under test corresponding to the first interval.

8、检测设备继续从预置数据库中读取被测DNS服务器对应的其它域名,如,读取到的域名为www.huawei.com(即本发明实施例中的第三信息)8. The detection device continues to read other domain names corresponding to the DNS server under test from the preset database, for example, the read domain name is www.huawei.com (that is, the third information in the embodiment of the present invention)

9、检测设备更改DNS请求的报文封装模式,将其中的www.sina.com更改为www.huawei.com,形成新的DNS请求。9. The detection device changes the packet encapsulation mode of the DNS request, and changes www.sina.com to www.huawei.com to form a new DNS request.

10、检测设备向被测DNS服务器发送更改后的DNS请求(即本发明实施例中的第二检测报文),该请求中携带域名www.huawei.com、识别码(可与第一检测报文中的识别码相同,也可不同,本发明实施例对此可不做具体限定)。10. The detection device sends a modified DNS request (that is, the second detection message in the embodiment of the present invention) to the DNS server under test. The request carries the domain name www.huawei.com, an identification code (which can be compared with the first detection message The identification codes herein are the same or different, which is not specifically limited in this embodiment of the present invention).

11、被测DNS服务器接收检测设备发送的DNS请求,进行域名解析得到与www.huawei.com具有映射关系的IP地址(即上文中的第四信息),并将IP地址和从中DNS请求中获取的识别码添加到DNS应答报文(即本发明实施例中的第二响应报文)中,向检测设备发送DNS应答报文。11. The DNS server under test receives the DNS request sent by the detection device, performs domain name resolution to obtain the IP address that has a mapping relationship with www.huawei.com (that is, the fourth information above), and obtains the IP address and the DNS request from it. The identification code is added to the DNS response message (that is, the second response message in the embodiment of the present invention), and the DNS response message is sent to the detection device.

12、检测设备接收被测DNS服务器发送的DNS应答报文,记录发送第二检测报文的时间、接收第二响应报文的时间,得到间隔时长Delay(D)(即本发明实施例中的第二间隔时长)。需要说明的是,为了简化处理,在上次检测过程确定服务器为可用状态后,本次检测过程可不再进行工作状态检测,当然,为了保证检测结果的准确性,防止两次检测过程中服务器工作状态发生变化影响检测结果,本次检测过程亦可利用识别码再次对被测DNS服务器进行工作状态检测,本发明实施例对此可不做具体限定。12. The detection device receives the DNS response message sent by the DNS server under test, records the time of sending the second detection message and the time of receiving the second response message, and obtains the interval duration Delay (D) (that is, in the embodiment of the present invention second interval). It should be noted that, in order to simplify the processing, after the last detection process determined that the server is in an available state, this detection process can no longer perform working status detection. Of course, in order to ensure the accuracy of the detection results, prevent the server from working during the two detection processes Changes in the status will affect the detection results. In this detection process, the identification code can also be used to detect the working status of the DNS server under test again, which is not specifically limited in this embodiment of the present invention.

13、检测设备确定被测DNS服务器为可用状态时,利用Y=(kD+mX)*S计算第二间隔时长对应的被测DNS服务器的性能值Y2。13. When the detection device determines that the DNS server under test is available, it uses Y=(kD+mX)*S to calculate the performance value Y2 of the DNS server under test corresponding to the second interval.

14、检测设备计算性能均值Y=(Y1+Y2)/2,并利用性能均值Y与预设性能阈值相比较,得到被测DNS服务器的性能等级。如此,就完成了本发明实施例的服务器性能检测过程。14. The detection device calculates the performance average value Y=(Y1+Y2)/2, and compares the performance average value Y with the preset performance threshold to obtain the performance level of the DNS server under test. In this way, the server performance detection process of the embodiment of the present invention is completed.

另外,作为一种示例,还可在记录得到第一间隔时长、第二间隔时长后,先利用二者计算间隔时长均值,再利用Y=(kD+mX)*S计算间隔时长均值对应的被测DNS服务器的性能值Y3,进而利用Y3与预设性能阈值相比较,得到被测DNS服务器的性能等级。或者,利用第一间隔时长得到被测DNS服务器的性能等级、利用第二间隔时长得到被测DNS服务器的性能等级后,对二个性能等级进行平均处理,将得到的性能等级均值作为被测DNS服务器的性能等级。In addition, as an example, after recording the first interval duration and the second interval duration, first use them to calculate the average interval duration, and then use Y=(kD+mX)*S to calculate the corresponding passive value of the interval duration average value. Measure the performance value Y3 of the DNS server, and compare Y3 with the preset performance threshold to obtain the performance level of the DNS server under test. Alternatively, after using the first interval to obtain the performance level of the DNS server under test and the second interval to obtain the performance level of the DNS server under test, the two performance levels are averaged, and the average value of the obtained performance level is used as the average value of the tested DNS server. The performance class of the server.

需要说明的是,检测设备可如本实施例所示,在计算得到第一间隔时长对应的性能值Y1后(即步骤7之后),再从预置数据库中读取其它域名;或者,也可以在更改DNS请求的报文封装模式得到新的DNS请求之后(即步骤3~7任一步骤之后),读取被测DNS服务器对应的其它域名,本发明实施例对此可不做具体限定。It should be noted that, as shown in this embodiment, the detection device can read other domain names from the preset database after calculating the performance value Y1 corresponding to the first interval duration (that is, after step 7); or, it can also After changing the packet encapsulation mode of the DNS request to obtain a new DNS request (that is, after any one of steps 3 to 7), read other domain names corresponding to the DNS server under test, which is not specifically limited in this embodiment of the present invention.

实施例5Example 5

结合上文所做介绍可知,本发明实施例只有在被测服务器的工作状态为可用状态时,才进一步利用间隔时长(或者,利用间隔时长与级别信息)确定被测服务器的性能等级;而在被测服务器工作状态为不可用状态时,则判定被测服务器出现故障,暂时不能提供访问服务。但是,在实际应用过程中,被测服务器处于不可用状态可能是服务器故障导致,也可能是由于闪断、抖动等异常情况导致。为了进一步提高本发明实施例性能检测的准确性,消除异常情况导致的性能检测结果错误,检测设备还可在上述实施例的基础上,执行以下步骤:基于所述检测设备确定所述被测服务器处于不可用状态,返回执行所述检测设备向被测服务器发送第一检测报文的步骤,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。In conjunction with the above introduction, it can be seen that the embodiment of the present invention only further uses the interval duration (or, utilizes the interval duration and level information) to determine the performance level of the server under test only when the working state of the server under test is in an available state; When the working state of the server under test is unavailable, it is determined that the server under test has failed and cannot provide access services temporarily. However, in the actual application process, the unavailable state of the server under test may be caused by a server failure, or by abnormal conditions such as flash disconnection and jitter. In order to further improve the accuracy of performance detection in the embodiments of the present invention and eliminate performance detection results errors caused by abnormal conditions, the detection device can also perform the following steps on the basis of the above embodiments: determine the server under test based on the detection device In the unavailable state, return to the step of the detection device sending the first detection message to the server under test until the preset condition is met; the preset condition is the preset execution times or the preset execution time length.

在上文实施例1处所介绍方案的基础上,若步骤5中检测设备记录被测DNS服务器的工作状态为不可用状态(即S=0),作为一种示例,检测设备可直接判定被测DNS服务器出现故障,停止性能检测过程,并暂时不再将其分配给客户端用户使用;或者,作为另一种示例,检测设备还可返回执行步骤3,继续向被测DNS服务器发送更改后的DNS请求,再次对被测DNS服务器进行工作状态检测,如果经检测被测DNS服务器当前处于可用状态,则继续执行后续确定服务器性能等级的步骤;如果经检测被测DNS服务器当前仍为不可用状态,则判断当前是否满足预设条件,如果满足,则停止性能检测过程,并暂时不再将被测DNS服务器分配给客户端用户使用;如果不满足,则继续返回执行步骤3,直至满足预设条件时为止。On the basis of the solution introduced in Embodiment 1 above, if the detection device records in step 5 that the working status of the DNS server under test is unavailable (i.e. S=0), as an example, the detection device can directly determine that the DNS server under test If the DNS server fails, stop the performance detection process, and temporarily no longer assign it to the client user; or, as another example, the detection device can return to step 3 and continue to send the changed DNS server to the tested DNS server. DNS request, check the working status of the tested DNS server again, if the detected DNS server is currently in an available state, then continue to perform the subsequent steps of determining the server performance level; if the detected DNS server is still currently unavailable , then judge whether the preset condition is currently satisfied, if so, stop the performance detection process, and temporarily no longer assign the tested DNS server to the client user; if not, continue to return to step 3 until the preset is satisfied until the condition.

与图3所示方法相对应地,本发明实施例还提供了一种服务器性能检测装置,参见图5所示示意图,所述装置可包括:Corresponding to the method shown in FIG. 3, an embodiment of the present invention also provides a server performance detection device. Referring to the schematic diagram shown in FIG. 5, the device may include:

发送单元201,用于向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;A sending unit 201, configured to send a first detection message to the server under test, where the first detection message carries first information;

接收单元202,用于接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;The receiving unit 202 is configured to receive a first response message returned by the server under test corresponding to the first detection message, where the first response message carries second information, and the second information is the same as the first detection message. There is a mapping relationship between information;

状态确定单元203,用于确定所述被测服务器是否处于可用状态;A state determination unit 203, configured to determine whether the server under test is in an available state;

获取单元204,用于基于所述状态确定单元确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;An obtaining unit 204, configured to obtain a first interval between the first detection message and the first response message based on the state determination unit determining that the server under test is in an available state;

等级确定单元205,用于根据所述获取单元获取的所述第一间隔时长确定所述被测服务器的性能等级。A level determining unit 205, configured to determine the performance level of the server under test according to the first interval length acquired by the acquiring unit.

综上所述,本发明实施例检测装置在确定被测服务器处于可用状态后,还会结合检测报文与响应报文之间的间隔时长进一步明确被测服务器的性能等级,因为间隔时长可在一定程度上反映被测服务器处理请求的响应速度,故本发明实施例方案可提高服务器性能检测结果的准确性,从而提高负载均衡设备基于本发明实施例性能检测结果进行负载均衡的合理性,进而保证所分配服务器可以为客户端用户提供良好质量的访问服务。To sum up, after the detection device in the embodiment of the present invention determines that the tested server is in an available state, it will further specify the performance level of the tested server in combination with the interval between the detection message and the response message, because the interval can be To a certain extent, it reflects the response speed of the server under test to process the request, so the solution of the embodiment of the present invention can improve the accuracy of the server performance detection result, thereby improving the rationality of the load balancing device performing load balancing based on the performance detection result of the embodiment of the present invention, and then Ensure that the assigned server can provide client users with good quality access services.

可选地,检测装置可配置有预置数据库,所述预置数据库保存有所述第一信息,如此,检测装置被触发后,就可从预置数据库中读取第一信息,并主动利用第一信息对被测服务器进行性能检测,对应于此,所述装置还包括:读取单元,用于在所述发送单元向所述被测服务器发送所述第一检测报文之前,从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。Optionally, the detection device can be configured with a preset database, and the preset database stores the first information, so that after the detection device is triggered, it can read the first information from the preset database and actively use The first information performs performance detection on the server under test. Correspondingly, the device further includes: a reading unit configured to read the first detection message from the server before the sending unit sends the first detection message to the server under test. Read the first information from the preset database, and use the first information to generate the first detection message.

具体过程可参见上文实施例1处所做介绍,此处不再赘述。另外,检测装置被触发后,可仅从预置数据库中读取第一信息,并利用第一信息对被测服务器进行性能检测;此外,检测装置还可循环往复从预置数据库中读取其它信息,对同一被测服务器进行多次性能检测;或者,还可利用同一信息对同一被测服务器进行多次性能检测,本发明实施例对此可不做具体限定,此处亦不再展开介绍。For the specific process, refer to the introduction in Embodiment 1 above, and details will not be repeated here. In addition, after the detection device is triggered, it can only read the first information from the preset database, and use the first information to perform performance detection on the server under test; in addition, the detection device can also repeatedly read other information from the preset database. Information, perform multiple performance tests on the same server under test; or, use the same information to perform multiple performance tests on the same server under test, which is not specifically limited in this embodiment of the present invention, and will not be introduced here.

可选地,所述预置数据库还保存有所述第一信息的第一级别信息,则所述等级确定单元,具体用于根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级;所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。Optionally, the preset database also stores first level information of the first information, and the level determination unit is specifically configured to determine the The performance level of the server under test; the first level information is set according to the access frequency of the network resource identified by the first information or the category to which the first information belongs.

如此,检测装置就可结合被测服务器的工作状态、间隔时长、级别信息三方面来确定被测服务器的性能等级,具体过程可参见上文实施例2处所做介绍,此处不再赘述。In this way, the detection device can determine the performance level of the server under test in combination with the working status, interval duration, and level information of the server under test. The specific process can be referred to the introduction in Embodiment 2 above, and will not be repeated here.

可选地,所述预置数据库还保存有所述被测服务器的身份标识与所述第一信息的对应关系,则在所述检测设备向被测服务器发送第一检测报文之前,所述装置还包括:选择单元,用于在所述发送单元向所述被测服务器发送所述第一检测报文之前,根据所述第一信息,从所述对应关系中选择出所述被测服务器的身份标识。Optionally, the preset database also stores the correspondence between the identity of the server under test and the first information, and before the detection device sends the first detection message to the server under test, the The device further includes: a selection unit, configured to select the server under test from the corresponding relationship according to the first information before the sending unit sends the first detection message to the server under test of identity.

如此,检测装置就可主动对不同服务器进行性能检测,具体过程可参见上文实施例3处所做介绍,此处不再赘述。In this way, the detection device can actively perform performance detection on different servers. The specific process can be referred to the introduction in Embodiment 3 above, and will not be repeated here.

可选地,基于所述状态确定单元确定所述被测服务器处于可用状态,Optionally, based on the state determination unit determining that the server under test is in an available state,

所述发送单元,还用于向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;The sending unit is further configured to send a second detection message to the server under test, where the second detection message carries third information;

所述接收单元,还用于接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The receiving unit is further configured to receive a second response message returned by the server under test corresponding to the second detection message, the second response message carries fourth information, and the fourth information is related to the second detection message. There is a mapping relationship between the third information;

所述获取单元,还用于获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;The acquiring unit is further configured to acquire a second interval between the second detection message and the second response message;

所述等级确定单元,具体用于根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,The level determining unit is specifically configured to determine the performance level of the server under test according to the second interval length, and use the performance level determined according to the first interval length and the performance level determined according to the second interval length. The performance level calculates the average value of the performance level of the server under test; or,

所述等级确定单元,具体用于利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。The level determining unit is specifically configured to use the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value.

如此,利用多个从预置数据库中读取的信息(此处可体现为第一信息、第三信息,当然,作为一种示例,还可读取更多的信息进行性能检测,本发明实施例对此不进行限定)对同一被测服务器进行多次性能检测,以提高本发明实施例性能检测结果的准确性,具体过程可参见上文实施例4处所做介绍,此处不再赘述。In this way, using a plurality of information read from the preset database (here can be embodied as the first information, the third information, of course, as an example, more information can also be read for performance testing, the implementation of the present invention This example is not limited) to perform multiple performance tests on the same server under test to improve the accuracy of the performance test results of the embodiment of the present invention. For the specific process, please refer to the introduction made in Embodiment 4 above, and will not repeat them here .

可选地,所述发送单元,还用于基于所述状态确定单元确定所述被测服务器处于不可用状态,继续向所述被测服务器发送所述第一检测报文,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。Optionally, the sending unit is further configured to continue to send the first detection message to the server under test based on the state determination unit determining that the server under test is in an unavailable state until a preset condition is met time; the preset condition is the preset execution times or the preset execution time length.

如此,就可消除异常情况导致的性能检测结果错误,提高本发明实施例性能检测结果的准确性,具体过程可参见上文实施例5处所做介绍,此处不再赘述。In this way, errors in performance test results caused by abnormal conditions can be eliminated, and the accuracy of the performance test results of the embodiment of the present invention can be improved. For the specific process, please refer to the introduction in Embodiment 5 above, and will not be repeated here.

需要说明的是,本装置实施例中提供的服务器性能检测装置,可以集成在负载均衡设备中,应用于上文附图3所示的方法实施例中,实现其中检测设备的功能。服务器性能检测装置可以实现的其他附加功能、以及与被测DNS服务器的其他交互过程,请参照方法实施例中对检测设备的描述,在这里不再赘述。It should be noted that the server performance detection device provided in this device embodiment can be integrated into a load balancing device and applied to the method embodiment shown in Figure 3 above to realize the function of the detection device. For other additional functions that can be realized by the server performance detection device, and other interaction processes with the DNS server to be tested, please refer to the description of the detection device in the method embodiments, and details will not be repeated here.

另外,上述实施例提供的检测装置在进行服务器性能检测时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。In addition, when the detection device provided by the above-mentioned embodiment performs server performance detection, it only uses the division of the above-mentioned functional modules as an example for illustration. The internal structure is divided into different functional modules to complete all or part of the functions described above.

本发明实施例还提供了服务器性能检测设备。参见图6所示示意图,服务器性能检测设备可包括:处理器301、存储器302、网络接口303、总线系统304。The embodiment of the invention also provides a server performance detection device. Referring to the schematic diagram shown in FIG. 6 , the server performance detection device may include: a processor 301 , a memory 302 , a network interface 303 , and a bus system 304 .

所述总线系统304,用于将检测设备的各个硬件组件耦合在一起。The bus system 304 is used to couple various hardware components of the detection device together.

所述网络接口303,用于实现检测设备与至少一个其它网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等方式。The network interface 303 is used to realize the communication connection between the detection device and at least one other network element, and may use the Internet, a wide area network, a local network, a metropolitan area network, and the like.

所述存储器302,用于存储程序指令和数据。The memory 302 is used for storing program instructions and data.

所述处理器301,用于读取存储器302中存储的指令和数据,执行以下操作:The processor 301 is configured to read instructions and data stored in the memory 302, and perform the following operations:

触发所述网络接口向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;triggering the network interface to send a first detection message to the server under test, where the first detection message carries first information;

通过所述网络接口接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;Receive the first response message returned by the server under test corresponding to the first detection message through the network interface, the first response message carries second information, and the second information is consistent with the first There is a mapping relationship between information;

确定所述被测服务器是否处于可用状态;determining whether the tested server is in an available state;

基于确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;Obtaining a first interval between the first detection message and the first response message based on determining that the server under test is in an available state;

根据所述第一间隔时长确定所述被测服务器的性能等级。Determine the performance level of the server under test according to the first interval length.

其中,所述处理器301可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。这些指令可以通过其中的处理器以配合实现及控制,用于执行本发明实施例揭示的方法。上述处理器还可以是通用处理器、数字信号处理器(DigitalSignalProcessing,DSP)、专用集成电路(applicationspecificintegratedcircuit)、现成可编程门阵列(FieldProgrammableGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。Wherein, the processor 301 may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. These instructions can be realized and controlled by the cooperation of the processor therein, so as to execute the methods disclosed in the embodiments of the present invention. The above-mentioned processor can also be a general-purpose processor, a digital signal processor (Digital Signal Processing, DSP), an application specific integrated circuit (application specific integrated circuit), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices , Discrete hardware components.

其中,上述通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器,解码器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。Wherein, the above general processor may be a microprocessor or the processor may be any conventional processor, decoder and the like. The steps of the methods disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.

其中,总线系统304除了包括数据总线之外,还可包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图6中将各种总线都标为总线系统304。Wherein, besides the data bus, the bus system 304 may also include a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 304 in FIG. 6 .

可选地,所述检测设备配置有预置数据库,所述预置数据库保存有所述第一信息,则在所述触发所述网络接口向被测服务器发送第一检测报文之前,所述处理器还用于执行以下操作:Optionally, the detection device is configured with a preset database, and the preset database stores the first information, and before the triggering of the network interface to send the first detection message to the server under test, the Processors are also used to:

从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。Reading the first information from the preset database, and using the first information to generate the first detection message.

可选地,所述预置数据库还保存有所述第一信息的第一级别信息,则所述处理器执行以下操作确定所述被测服务器的性能等级:Optionally, the preset database also stores first-level information of the first information, and the processor performs the following operations to determine the performance level of the server under test:

根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级;所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。Determine the performance level of the server under test according to the first interval length and the first level information; the first level information is the access frequency of network resources identified by the first information or the first The category to which the information belongs is set.

可选地,所述预置数据库还保存有所述被测服务器的身份标识与所述第一信息的对应关系,则在所述触发所述网络接口向被测服务器发送第一检测报文之前,所述处理器还用于执行以下操作:Optionally, the preset database also saves the corresponding relationship between the identity of the server under test and the first information, and before the triggering of the network interface to send the first detection message to the server under test , the processor is also used to:

根据所述第一信息,从所述对应关系中选择出所述被测服务器的身份标识。Select the identity of the server under test from the corresponding relationship according to the first information.

可选地,基于确定所述被测服务器处于可用状态,所述处理器还用于执行以下操作:Optionally, based on determining that the server under test is in an available state, the processor is further configured to perform the following operations:

触发所述网络接口向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;triggering the network interface to send a second detection message to the server under test, where the second detection message carries third information;

通过所述网络接口接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The second response message returned by the server under test corresponding to the second detection message is received through the network interface, the second response message carries fourth information, and the fourth information is the same as the third There is a mapping relationship between information;

获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;Obtain a second interval between the second detection message and the second response message;

所述处理器执行以下操作确定所述被测服务器的性能等级:The processor performs the following operations to determine the performance level of the server under test:

根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,Determine the performance level of the server under test according to the second interval length, and calculate the performance level of the server under test by using the performance level determined according to the first interval length and the performance level determined according to the second interval length. Performance Rating Mean; or,

利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。Using the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value.

可选地,所述处理器还用于执行以下操作:Optionally, the processor is also configured to perform the following operations:

基于确定所述被测服务器处于不可用状态,返回执行所述触发所述网络接口向被测服务器发送第一检测报文的步骤,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。Based on determining that the server under test is in an unavailable state, return to the step of triggering the network interface to send a first detection message to the server under test until a preset condition is met; the preset condition is a preset The number of executions or the preset execution length.

需要说明的是,本发明实施例中的被测服务器可以是DNS服务器、呼叫中心服务器、内容分发服务器等等,可在本地缓存第一信息和第二信息映射关系的服务器。如果被测服务器为DNS服务器,则所述第一检测报文为DNS请求报文,所述第一响应报文为DNS应答报文,所述第一信息为第一域名,所述第二信息为IP地址。如果被测服务器为呼叫中心服务器,则第一检测报文为呼叫请求,第一信息为被呼叫用户的账号,第一响应报文为呼叫响应,第二信息为被呼叫用户对应的客户端IP地址,映射关系为账号与IP地址之间的映射关系。如果被测服务器为内容分发服务器,则第一检测报文为内容访问请求,第一信息为请求访问的内容信息,第一响应报文为内容访问响应,第二信息为缓存服务器的IP地址,映射关系为内容信息与缓存服务器IP地址之间的映射关系。It should be noted that the server under test in the embodiment of the present invention may be a DNS server, a call center server, a content distribution server, etc., and a server that can locally cache the mapping relationship between the first information and the second information. If the server under test is a DNS server, the first detection message is a DNS request message, the first response message is a DNS response message, the first information is a first domain name, and the second information for the IP address. If the server under test is a call center server, the first detection message is a call request, the first information is the account number of the called user, the first response message is a call response, and the second information is the client IP corresponding to the called user. address, the mapping relationship is the mapping relationship between accounts and IP addresses. If the server under test is a content distribution server, the first detection message is a content access request, the first information is the content information requested to be accessed, the first response message is a content access response, and the second information is the IP address of the cache server, The mapping relationship is a mapping relationship between the content information and the IP address of the cache server.

综上所述,本发明实施例检测设备在确定被测服务器处于可用状态后,还会结合检测报文与响应报文之间的间隔时长进一步明确被测服务器的性能等级,因为间隔时长可在一定程度上反映被测服务器处理请求的响应速度,故本发明实施例方案可提高服务器性能检测结果的准确性,从而提高负载均衡设备基于本发明实施例性能检测结果进行负载均衡的合理性,进而保证所分配服务器可以为客户端用户提供良好质量的访问服务。此外,还可利用不同域名对同一被测服务器进行多次性能检测,或者,也可利用同一域名对同一被测服务器进行多次性能检测,以进一步提高本发明实施例服务器性能检测结果的准确性。To sum up, after the detection device in the embodiment of the present invention determines that the server under test is in an available state, it will further clarify the performance level of the server under test in combination with the interval time between the detection message and the response message, because the interval time can be within To a certain extent, it reflects the response speed of the server under test to process the request, so the solution of the embodiment of the present invention can improve the accuracy of the server performance detection result, thereby improving the rationality of the load balancing device performing load balancing based on the performance detection result of the embodiment of the present invention, and then Ensure that the assigned server can provide client users with good quality access services. In addition, different domain names can be used to perform multiple performance tests on the same server under test, or the same domain name can be used to perform multiple performance tests on the same server under test, so as to further improve the accuracy of the server performance test results of the embodiment of the present invention .

需要说明的是,本实施例中提供的服务器性能检测设备,可以集成在负载均衡设备中,应用于上文附图3所示的方法实施例中,实现其中检测设备的功能。服务器性能检测装置可以实现的其他附加功能、以及与被测DNS服务器的其他交互过程,请参照方法实施例中对检测设备的描述,在这里不再赘述。It should be noted that the server performance detection device provided in this embodiment can be integrated into a load balancing device and applied to the method embodiment shown in FIG. 3 above to realize the function of the detection device. For other additional functions that can be realized by the server performance detection device, and other interaction processes with the DNS server to be tested, please refer to the description of the detection device in the method embodiments, and details will not be repeated here.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如媒体网关等网络通信设备)执行本发明各个实施例或者实施例的某些部分所述的方法。From the above description of the implementation manners, it can be seen that those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general hardware platform. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , optical disk, etc., including several instructions to make a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway) execute the methods described in various embodiments or some parts of the embodiments of the present invention.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. place. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiments. The device and system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

以上所述仅是本发明的可选实施方式,并非用于限定本发明的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only optional implementations of the present invention, and are not intended to limit the protection scope of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims (12)

1.一种服务器性能检测方法,其特征在于,所述方法包括:1. A server performance detection method, characterized in that the method comprises: 检测设备向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;The detection device sends a first detection message to the server under test, where the first detection message carries first information; 所述检测设备接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;The detection device receives a first response message returned by the server under test corresponding to the first detection message, the first response message carries second information, and the second information and the first information There is a mapping relationship between them; 所述检测设备确定所述被测服务器是否处于可用状态;The detection device determines whether the server under test is in an available state; 基于所述检测设备确定所述被测服务器处于可用状态,所述检测设备获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;Based on the detection device determining that the server under test is in an available state, the detection device acquires a first interval between the first detection message and the first response message; 所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级。The detection device determines the performance level of the server under test according to the first interval length. 2.根据权利要求1所述的方法,其特征在于,所述检测设备配置有预置数据库,所述预置数据库保存有所述第一信息,则在所述检测设备向被测服务器发送第一检测报文之前,所述方法还包括:2. The method according to claim 1, wherein the detection device is configured with a preset database, and the preset database stores the first information, and the first information is sent to the server under test by the detection device. Before a detection message, the method also includes: 所述检测设备从所述预置数据库中读取所述第一信息,并利用所述第一信息生成所述第一检测报文。The detection device reads the first information from the preset database, and uses the first information to generate the first detection message. 3.根据权利要求2所述的方法,其特征在于,所述预置数据库还保存有所述第一信息的第一级别信息,则所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级,包括:3. The method according to claim 2, wherein the preset database also stores the first-level information of the first information, and the detection device determines the The performance level of the test server, including: 所述检测设备根据所述第一间隔时长和所述第一级别信息确定所述被测服务器的性能等级。The detection device determines the performance level of the server under test according to the first interval length and the first level information. 4.根据权利要求3所述的方法,其特征在于,所述第一级别信息是按照所述第一信息所标识的网络资源被访问频率或所述第一信息所属类别设置的。4 . The method according to claim 3 , wherein the first level information is set according to the frequency of network resources identified by the first information being accessed or the category to which the first information belongs. 5.根据权利要求3或4所述的方法,其特征在于,基于所述检测设备确定所述被测服务器处于可用状态,所述方法还包括:5. The method according to claim 3 or 4, wherein, based on the detection device, it is determined that the server under test is in an available state, and the method further comprises: 所述检测设备向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;The detection device sends a second detection message to the server under test, and the second detection message carries third information; 所述检测设备接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The detection device receives a second response message returned by the server under test corresponding to the second detection message, the second response message carries fourth information, and the fourth information and the third information There is a mapping relationship between them; 所述检测设备获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;The detection device acquires a second interval between the second detection message and the second response message; 所述检测设备根据所述第一间隔时长确定所述被测服务器的性能等级,包括:The detection device determines the performance level of the server under test according to the first interval length, including: 所述检测设备根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,The detecting device determines the performance level of the server under test according to the second interval length, and uses the performance level determined according to the first interval length and the performance level determined according to the second interval length to calculate the the average performance rating of the server under test; or, 所述检测设备利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。The detection device uses the first interval length and the second interval length to calculate an interval duration average value, and determines the performance level of the server under test according to the interval duration average value. 6.根据权利要求1~5任一项所述的方法,其特征在于,所述方法还包括:6. The method according to any one of claims 1 to 5, characterized in that the method further comprises: 基于所述检测设备确定所述被测服务器处于不可用状态,返回执行所述检测设备向被测服务器发送第一检测报文的步骤,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。Based on the detection device determining that the server under test is in an unavailable state, return to the step of sending the first detection message to the server under test by the detection device until a preset condition is met; the preset condition is a preset condition Set the execution times or preset execution time length. 7.根据权利要求1~6任一项所述的方法,其特征在于,所述被测服务器为DNS服务器,所述第一检测报文为DNS请求报文,所述第一响应报文为DNS应答报文,所述第一信息为第一域名,所述第二信息为IP地址。7. The method according to any one of claims 1 to 6, wherein the server under test is a DNS server, the first detection message is a DNS request message, and the first response message is In a DNS response message, the first information is a first domain name, and the second information is an IP address. 8.一种服务器性能检测装置,其特征在于,所述装置包括:8. A server performance detection device, characterized in that the device comprises: 发送单元,用于向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;A sending unit, configured to send a first detection message to the server under test, where the first detection message carries first information; 接收单元,用于接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;a receiving unit, configured to receive a first response message returned by the server under test corresponding to the first detection message, where the first response message carries second information, and the second information is the same as the first There is a mapping relationship between information; 状态确定单元,用于确定所述被测服务器是否处于可用状态;A state determining unit, configured to determine whether the tested server is in an available state; 获取单元,用于基于所述状态确定单元确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;An obtaining unit, configured to obtain a first interval between the first detection message and the first response message based on the state determination unit determining that the server under test is in an available state; 等级确定单元,用于根据所述获取单元获取的所述第一间隔时长确定所述被测服务器的性能等级。A level determining unit, configured to determine the performance level of the server under test according to the first interval duration acquired by the acquiring unit. 9.根据权利要求8所述的装置,其特征在于,基于所述状态确定单元确定所述被测服务器处于可用状态,9. The device according to claim 8, wherein, based on the state determination unit determining that the server under test is in an available state, 所述发送单元,还用于向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;The sending unit is further configured to send a second detection message to the server under test, where the second detection message carries third information; 所述接收单元,还用于接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The receiving unit is further configured to receive a second response message returned by the server under test corresponding to the second detection message, the second response message carries fourth information, and the fourth information is related to the second detection message. There is a mapping relationship between the third information; 所述获取单元,还用于获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;The acquiring unit is further configured to acquire a second interval between the second detection message and the second response message; 所述等级确定单元,具体用于根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,The level determining unit is specifically configured to determine the performance level of the server under test according to the second interval length, and use the performance level determined according to the first interval length and the performance level determined according to the second interval length. The performance level calculates the average value of the performance level of the server under test; or, 所述等级确定单元,具体用于利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。The level determining unit is specifically configured to use the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value. 10.根据权利要求8或9所述的装置,其特征在于,10. Apparatus according to claim 8 or 9, characterized in that, 所述发送单元,还用于基于所述状态确定单元确定所述被测服务器处于不可用状态,继续向所述被测服务器发送所述第一检测报文,直至满足预设条件时为止;所述预设条件为预设执行次数或预设执行时间长度。The sending unit is further configured to continue to send the first detection message to the server under test based on the state determination unit determining that the server under test is in an unavailable state until a preset condition is met; The preset condition mentioned above is the preset execution times or the preset execution time length. 11.一种服务器性能检测设备,其特征在于,所述设备包括:处理器、存储器和网络接口;11. A server performance detection device, characterized in that the device comprises: a processor, a memory, and a network interface; 所述存储器,用于存储程序指令和数据;The memory is used to store program instructions and data; 所述处理器,用于读取所述存储器中存储的指令和数据,执行以下操作:The processor is configured to read instructions and data stored in the memory, and perform the following operations: 触发所述网络接口向被测服务器发送第一检测报文,所述第一检测报文中携带第一信息;triggering the network interface to send a first detection message to the server under test, where the first detection message carries first information; 通过所述网络接口接收所述被测服务器对应所述第一检测报文返回的第一响应报文,所述第一响应报文中携带第二信息,所述第二信息与所述第一信息之间具有映射关系;Receive the first response message returned by the server under test corresponding to the first detection message through the network interface, the first response message carries second information, and the second information is consistent with the first There is a mapping relationship between information; 确定所述被测服务器是否处于可用状态;determining whether the tested server is in an available state; 基于确定所述被测服务器处于可用状态,获取所述第一检测报文和所述第一响应报文之间的第一间隔时长;Obtaining a first interval between the first detection message and the first response message based on determining that the server under test is in an available state; 根据所述第一间隔时长确定所述被测服务器的性能等级。Determine the performance level of the server under test according to the first interval length. 12.根据权利要求11所述的设备,其特征在于,基于确定所述被测服务器处于可用状态,所述处理器还用于执行以下操作:12. The device according to claim 11, wherein based on determining that the server under test is in an available state, the processor is further configured to perform the following operations: 触发所述网络接口向所述被测服务器发送第二检测报文,所述第二检测报文中携带第三信息;triggering the network interface to send a second detection message to the server under test, where the second detection message carries third information; 通过所述网络接口接收所述被测服务器对应所述第二检测报文返回的第二响应报文,所述第二响应报文中携带第四信息,所述第四信息与所述第三信息之间具有映射关系;The second response message returned by the server under test corresponding to the second detection message is received through the network interface, the second response message carries fourth information, and the fourth information is the same as the third There is a mapping relationship between information; 获取所述第二检测报文和所述第二响应报文之间的第二间隔时长;Obtain a second interval between the second detection message and the second response message; 所述根据所述第一间隔时长确定所述被测服务器的性能等级,包括:The determining the performance level of the server under test according to the first interval length includes: 根据所述第二间隔时长确定所述被测服务器的性能等级,并利用根据所述第一间隔时长确定出的性能等级和所述第二间隔时长确定出的性能等级计算所述被测服务器的性能等级均值;或者,Determine the performance level of the server under test according to the second interval length, and calculate the performance level of the server under test by using the performance level determined according to the first interval length and the performance level determined according to the second interval length. Performance Rating Mean; or, 利用所述第一间隔时长和所述第二间隔时长计算间隔时长均值,并根据所述间隔时长均值确定所述被测服务器的性能等级。Using the first interval length and the second interval length to calculate an interval duration average, and determine the performance level of the server under test according to the interval interval average value.
CN201410353696.6A 2014-07-23 2014-07-23 A server performance detection method, device and equipment Active CN105337786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410353696.6A CN105337786B (en) 2014-07-23 2014-07-23 A server performance detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410353696.6A CN105337786B (en) 2014-07-23 2014-07-23 A server performance detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN105337786A true CN105337786A (en) 2016-02-17
CN105337786B CN105337786B (en) 2019-07-19

Family

ID=55288098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410353696.6A Active CN105337786B (en) 2014-07-23 2014-07-23 A server performance detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN105337786B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341401A (en) * 2016-08-31 2017-01-18 新疆信息产业有限责任公司 Communication terminal detection service system and method
CN107071820A (en) * 2017-04-19 2017-08-18 努比亚技术有限公司 A kind of method of mobile terminal and switch contents Distributor
CN107241240A (en) * 2017-06-30 2017-10-10 广州君海网络科技有限公司 Game server state monitoring method, apparatus and system
CN109660425A (en) * 2018-12-13 2019-04-19 网宿科技股份有限公司 A kind of monitoring method determines method, monitoring device and storage medium
CN110248138A (en) * 2018-03-08 2019-09-17 华为技术有限公司 The method and apparatus for carrying out audio/video conference
CN110519789A (en) * 2019-08-02 2019-11-29 京信通信系统(中国)有限公司 Method for testing performance, device, computer equipment and storage medium
CN110519121A (en) * 2019-08-09 2019-11-29 网宿科技股份有限公司 A kind of method and device of subregion task detection
CN110691139A (en) * 2019-10-11 2020-01-14 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium
CN111049948A (en) * 2019-12-30 2020-04-21 杭州迪普科技股份有限公司 Domain name detection method and device
CN111343237A (en) * 2020-02-07 2020-06-26 广州亚美信息科技有限公司 Server cluster communication method, communication device and computer storage medium
CN112104498A (en) * 2016-11-17 2020-12-18 贵州白山云科技股份有限公司 DNS service quality evaluation method, device, medium and equipment
CN114629823A (en) * 2022-05-16 2022-06-14 鹏城实验室 Server testing and monitoring method, device, terminal device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514588A (en) * 2002-12-17 2004-07-21 �Ҵ���˾ Method and system for detecting operation risk of anode
CN1937534A (en) * 2006-09-20 2007-03-28 杭州华为三康技术有限公司 Load balance realizing method and load balance device
CN101090345A (en) * 2007-07-20 2007-12-19 哈尔滨工程大学 Performance Test Method of Network Storage System
CN102668455A (en) * 2009-09-24 2012-09-12 3Rd布兰德私人有限公司(公司注册号200719143G) Network monitoring and analysis tool
CN103138995A (en) * 2011-11-24 2013-06-05 中兴通讯股份有限公司 Method and device for server performance test
CN103560928A (en) * 2013-10-22 2014-02-05 东软集团股份有限公司 Method and system for testing forwarding performance of network equipment
CN103778050A (en) * 2013-12-30 2014-05-07 国网山东省电力公司 Database server high-availability performance detecting system
CN103888306A (en) * 2012-12-19 2014-06-25 阿里巴巴集团控股有限公司 Message forwarding system performance test method and performance test device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514588A (en) * 2002-12-17 2004-07-21 �Ҵ���˾ Method and system for detecting operation risk of anode
CN1937534A (en) * 2006-09-20 2007-03-28 杭州华为三康技术有限公司 Load balance realizing method and load balance device
CN101090345A (en) * 2007-07-20 2007-12-19 哈尔滨工程大学 Performance Test Method of Network Storage System
CN102668455A (en) * 2009-09-24 2012-09-12 3Rd布兰德私人有限公司(公司注册号200719143G) Network monitoring and analysis tool
CN103138995A (en) * 2011-11-24 2013-06-05 中兴通讯股份有限公司 Method and device for server performance test
CN103888306A (en) * 2012-12-19 2014-06-25 阿里巴巴集团控股有限公司 Message forwarding system performance test method and performance test device
CN103560928A (en) * 2013-10-22 2014-02-05 东软集团股份有限公司 Method and system for testing forwarding performance of network equipment
CN103778050A (en) * 2013-12-30 2014-05-07 国网山东省电力公司 Database server high-availability performance detecting system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341401A (en) * 2016-08-31 2017-01-18 新疆信息产业有限责任公司 Communication terminal detection service system and method
CN112104498A (en) * 2016-11-17 2020-12-18 贵州白山云科技股份有限公司 DNS service quality evaluation method, device, medium and equipment
CN112104498B (en) * 2016-11-17 2023-04-07 贵州白山云科技股份有限公司 DNS service quality evaluation method, device, medium and equipment
CN107071820A (en) * 2017-04-19 2017-08-18 努比亚技术有限公司 A kind of method of mobile terminal and switch contents Distributor
CN107241240A (en) * 2017-06-30 2017-10-10 广州君海网络科技有限公司 Game server state monitoring method, apparatus and system
CN110248138A (en) * 2018-03-08 2019-09-17 华为技术有限公司 The method and apparatus for carrying out audio/video conference
CN110248138B (en) * 2018-03-08 2021-06-29 华为技术有限公司 Method and device for audio and video conference
CN109660425A (en) * 2018-12-13 2019-04-19 网宿科技股份有限公司 A kind of monitoring method determines method, monitoring device and storage medium
CN110519789A (en) * 2019-08-02 2019-11-29 京信通信系统(中国)有限公司 Method for testing performance, device, computer equipment and storage medium
CN110519789B (en) * 2019-08-02 2023-11-28 京信网络系统股份有限公司 Performance detection method, device, computer equipment and storage medium
CN110519121B (en) * 2019-08-09 2021-08-27 网宿科技股份有限公司 Method and device for detecting regional tasks
CN110519121A (en) * 2019-08-09 2019-11-29 网宿科技股份有限公司 A kind of method and device of subregion task detection
CN110691139B (en) * 2019-10-11 2022-07-15 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium
CN110691139A (en) * 2019-10-11 2020-01-14 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium
CN111049948A (en) * 2019-12-30 2020-04-21 杭州迪普科技股份有限公司 Domain name detection method and device
CN111049948B (en) * 2019-12-30 2022-07-29 杭州迪普科技股份有限公司 Domain name detection method and device
CN111343237A (en) * 2020-02-07 2020-06-26 广州亚美信息科技有限公司 Server cluster communication method, communication device and computer storage medium
CN114629823A (en) * 2022-05-16 2022-06-14 鹏城实验室 Server testing and monitoring method, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN105337786B (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN105337786B (en) A server performance detection method, device and equipment
CN107426302B (en) Access scheduling method, device, system, terminal, server and storage medium
CN108881448B (en) API request processing method and device
WO2022068333A1 (en) Access request processing method and apparatus, electronic device, and computer-readable storage medium
CN104092650B (en) A kind of method and apparatus for distributing service request
CN108494891A (en) A kind of domain name analytic method, server and system
CN108205541B (en) Distributed network crawler task scheduling method and device
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
CN110224943B (en) Flow service current limiting method based on URL, electronic equipment and computer storage medium
CN107395783B (en) IP address processing method, system, device and electronic equipment
CN113067875B (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
CN109151512A (en) The method and device of content is obtained in CDN network
CN106027595A (en) Access log processing method and system for CDN node
CN114095567B (en) Data access request processing method and device, computer equipment and medium
JP2023089891A (en) Cluster capacity expansion method and device
CN112291365B (en) Access balance processing method, device, computer equipment and storage medium
CN108647240B (en) Method and device for counting access amount, electronic equipment and storage medium
CN111711716A (en) A method, apparatus, device and readable storage medium for domain name resolution
CN108319550A (en) A kind of test system and test method
CN110955544A (en) Method, device and system for detecting usability of web system
JP7392168B2 (en) URL refresh method, device, equipment and CDN node in CDN
CN111314502B (en) A method and device for deploying a domain name based on a domain name resolution system
CN117201612A (en) Scheduling method, device and electronic equipment for content distribution network
CN114465926B (en) Recursive server monitoring method, device, equipment and storage medium
CN111163142B (en) Domain name resolution method and related device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant