CN105337786B - A kind of server performance detection method, device and equipment - Google Patents

A kind of server performance detection method, device and equipment Download PDF

Info

Publication number
CN105337786B
CN105337786B CN201410353696.6A CN201410353696A CN105337786B CN 105337786 B CN105337786 B CN 105337786B CN 201410353696 A CN201410353696 A CN 201410353696A CN 105337786 B CN105337786 B CN 105337786B
Authority
CN
China
Prior art keywords
server
information
tested
detection
performance
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.)
Active
Application number
CN201410353696.6A
Other languages
Chinese (zh)
Other versions
CN105337786A (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

The embodiment of the present invention provides a kind of server performance detection method, device and equipment, which comprises detection device sends the first detection messages to tested server, carries the first information in first detection messages;The detection device receives the tested server and corresponds to the first response message that first detection messages return, and carries the second information in first response message, has mapping relations between second information and the first information;The detection device determines whether the tested server is in available mode;Determine that the tested server is in available mode based on the detection device, the detection device obtains the first interval duration between first detection messages and first response message;The detection device determines the performance rate of the tested server according to first interval duration.In this way, the reasonability and accuracy of server performance testing result just can be improved.

Description

A kind of server performance detection method, device and equipment
Technical field
The present invention relates to fields of communication technology, and in particular to a kind of server performance detection method, device and equipment.
Background technique
With the continuous development of information technology and the gradually growth of user's amount of access, the performance of single server can not Meet the requirements for access of a large number of users, at present mostly by way of disposing multiple groups server, is provided for user and stablize, is reliable Network access service.
In order to allow this multiple groups server to provide good access service for user, in the visit for receiving client user After asking request, access request can be assigned on multiple servers by service load balancing technology, be total to by this multiple servers It is same to respond the access request.It follows that the response condition of access request depends primarily on during load balancing as user point The performance for the server matched, good if it is the performance of the server of user's distribution, the response time is short, and user experience is good;If Server for user's distribution breaks down, then can extend the response time, reduces user experience.In order to obtain the service of server Performance information, presently, there are a kind of schemes of detection service device performance state, below by taking DNS service as an example, examine to this performance Survey scheme is simply introduced:
Firstly, load-balancing device sends detection messages to a dns server, identification code is carried in detection messages Transaction ID.Then, dns server responsive load equalizing equipment feeds back response message to it, and takes in response message The identification code obtained from detection messages with dns server.Finally, load-balancing device judges dns server according to identification code Performance.This is primarily due to, and when dns server works normally, the identification code that dns server is got should be with detection messages In identification code be consistent, therefore, if load-balancing device determines in response message in the identification code and detection messages that carry Identification code is identical, then it is assumed that server state be it is available, can be distributed to during load balancing user use;Otherwise it is assumed that Server state be it is unavailable, cannot temporarily assign them to user.
By the above process it is found that current performance detection only judges whether server can be used, it is known that, service Device, which can work normally, not to be represented it and can provide good service for user.In this way, if only in accordance with current performance detection As a result load balancing is carried out, then may be decreased the distribution reasonability of server, server is caused to provide the response of service for user Overlong time is also possible to that service can not be provided for user when serious.
Summary of the invention
Server performance detection method, device and equipment provided in an embodiment of the present invention, to improve detection service device The reasonability and accuracy of testing result when energy.
For this purpose, the embodiment of the present invention provides the following technical solutions:
In a first aspect, providing a kind of server performance detection method, which comprises
Detection device sends the first detection messages to tested server, carries the first information in first detection messages;
The detection device receives the tested server and corresponds to the first response message that first detection messages return, The second information is carried in first response message, and there are mapping relations between second information and the first information;
The detection device determines whether the tested server is in available mode;
Determine that the tested server is in available mode based on the detection device, the detection device obtains described the The first interval duration between one detection messages and first response message;
The detection device determines the performance rate of the tested server according to first interval duration.
In the first possible implementation of the first aspect, the detection device is configured with initialized data base, described Initialized data base preserves the first information, then the detection device to tested server send the first detection messages it Before, the method also includes:
The detection device reads the first information from the initialized data base, and is generated using the first information First detection messages.
The possible implementation of with reference to first aspect the first, in second of possible implementation of first aspect In, the initialized data base also preserves the first level information of the first information, then the detection device is according to described One interval duration determines the performance rate of the tested server, comprising:
The detection device determines the tested server according to the first interval duration and the first level information Performance rate.
The possible implementation of second with reference to first aspect, in the third possible implementation of first aspect In, the first level information is that the Internet resources identified according to the first information are accessed frequency or the first information Generic setting.
With reference to first aspect the first is to the third any possible implementation, at the 4th kind of first aspect In possible implementation, the initialized data base also preserve the tested server identity and the first information Corresponding relationship, then the detection device to tested server send the first detection messages before, the method also includes:
The detection device selects the body of the tested server according to the first information from the corresponding relationship Part mark.
Any possible implementation of with reference to first aspect the first to the 4th kind, at the 5th kind of first aspect In possible implementation, determine that the tested server is in available mode based on the detection device, the method is also wrapped It includes:
The detection device sends the second detection messages to the tested server, and the is carried in second detection messages Three information;
The detection device receives the tested server and corresponds to the second response message that second detection messages return, The 4th information is carried in second response message, and there are mapping relations between the 4th information and the third information;
The detection device obtains the second interval duration between second detection messages and second response message;
The detection device determines the performance rate of the tested server according to first interval duration, comprising:
The detection device determines the performance rate of the tested server according to second interval duration, and utilizes root Described in the performance rate that the performance rate and second interval duration determined according to first interval duration are determined calculates The performance rate mean value of tested server;Alternatively,
The detection device is spaced duration calculation interval duration mean value using the first interval duration and described second, and The performance rate of the tested server is determined according to the interval duration mean value.
With reference to first aspect or first aspect the first to the 5th kind of any possible implementation, in first party In the 6th kind of possible implementation in face, the method also includes:
It determines that the tested server is in down state based on the detection device, returns and execute the detection device The step of sending the first detection messages to tested server, until when meeting preset condition;The preset condition is default Execute number or default execution time span length.
With reference to first aspect or first aspect the first to the 6th kind of any possible implementation, in first party In the 7th kind of possible implementation in face, the tested server is dns server, and first detection messages are asked for DNS Message is sought, first response message is DNS response message, and the first information is the first domain name, and second information is IP Address.
Second aspect, provides a kind of server performance detection device, and described device includes:
Transmission unit carries first in first detection messages for sending the first detection messages to tested server Information;
Receiving unit corresponds to the first response report that first detection messages return for receiving the tested server Text carries the second information in first response message, has mapping relations between second information and the first information;
Status determining unit, for determining whether the tested server is in available mode;
Acquiring unit is obtained for determining that the tested server is in available mode based on the status determining unit The first interval duration between first detection messages and first response message;
Level de-termination unit, first interval duration for being obtained according to the acquiring unit determine the tested clothes The performance rate of business device.
In the first possible implementation of the second aspect, described device is configured with initialized data base, described preset Database preserves the first information, described device further include:
Reading unit is used for before the transmission unit sends first detection messages to the tested server, The first information is read from the initialized data base, and generates first detection messages using the first information.
In conjunction with the first possible implementation of second aspect, in second of possible implementation of second aspect In, the initialized data base also preserves the first level information of the first information, then
The level de-termination unit, specifically for determining institute according to the first interval duration and the first level information State the performance rate of tested server;The first level information is that the Internet resources identified according to the first information are interviewed Ask what frequency or the first information generic were arranged.
In conjunction with the first or second of possible implementation of second aspect, in the third possible reality of second aspect In existing mode, the initialized data base also preserves the identity pass corresponding with the first information of the tested server System, then before the detection device sends the first detection messages to tested server, described device further include:
Selecting unit is used for before the transmission unit sends first detection messages to the tested server, According to the first information, the identity of the tested server is selected from the corresponding relationship.
In conjunction with second of second aspect or the third possible implementation, in the 4th kind of possible reality of second aspect In existing mode, determine that the tested server is in available mode based on the status determining unit,
The transmission unit is also used to send the second detection messages, second detection messages to the tested server Middle carrying third information;
The receiving unit is also used to receive the tested server and corresponds to the second sound that second detection messages return Message is answered, the 4th information is carried in second response message, there is mapping between the 4th information and the third information Relationship;
The acquiring unit is also used to obtain between second between second detection messages and second response message Every duration;
The level de-termination unit, specifically for determining the performance of the tested server according to second interval duration Grade, and the performance determined using the performance rate and second interval duration determined according to first interval duration The performance rate mean value of server is tested described in rating calculation;Alternatively,
The level de-termination unit is specifically used for using between the first interval duration and second interval duration calculation Every duration mean value, and according to the performance rate for being spaced duration mean value and determining the tested server.
In conjunction with any possible implementation of the first of second aspect or second aspect to the 4th kind, in second party In the 5th kind of possible implementation in face, the transmission unit is also used to determine the quilt based on the status determining unit It surveys server and is in down state, continue to send first detection messages to the tested server, until meeting default Until when condition;The preset condition is default execution number or default execution time span.
The third aspect, provides a kind of server performance detection device, and the equipment includes: processor, memory and network Interface;
The memory, for storing program instruction and data;
The processor, for reading the instruction and data stored in the memory, the following operation of execution:
It triggers the network interface and sends the first detection messages to tested server, the is carried in first detection messages One information;
The tested server, which is received, by the network interface corresponds to the first response that first detection messages return Message carries the second information in first response message, between second information and the first information there is mapping to close System;
Determine whether the tested server is in available mode;
It is in available mode based on the determination tested server, obtains first detection messages and first response The first interval duration between message;
The performance rate of the tested server is determined according to first interval duration.
In the first possible implementation of the third aspect, the detection device is configured with initialized data base, described Initialized data base preserves the first information, then sends the first detection to tested server in the triggering network interface Before message, the processor is also used to execute following operation:
The first information is read from the initialized data base, and generates first detection using the first information Message.
In conjunction with the first possible implementation of the third aspect, in second of possible implementation of the third aspect In, the initialized data base also preserves the first level information of the first information, then the processor is according to described first Interval duration determines the performance rate of the tested server, comprising:
The performance rate of the tested server is determined according to the first interval duration and the first level information;Its In, the first level information is that the Internet resources identified according to the first information are accessed frequency or the first information Generic setting.
In conjunction with the first or second of possible implementation of the third aspect, in the third possible reality of the third aspect In existing mode, the initialized data base also preserves the identity pass corresponding with the first information of the tested server System, then before the triggering network interface sends the first detection messages to tested server, the processor is also used to Execute following operation:
According to the first information, the identity of the tested server is selected from the corresponding relationship.
In conjunction with the third aspect the first to the third any possible implementation, at the 4th kind of the third aspect In possible implementation, available mode is in based on the determining tested server, the processor is also used to execute following Operation:
It triggers the network interface and sends the second detection messages to the tested server, taken in second detection messages Band third information;
The tested server, which is received, by the network interface corresponds to the second response that second detection messages return Message carries the 4th information in second response message, between the 4th information and the third information there is mapping to close System;
Obtain the second interval duration between second detection messages and second response message;
The performance rate that the tested server is determined according to first interval duration, comprising:
The performance rate of the tested server is determined according to second interval duration, and using according between described first The performance rate that the performance rate and second interval duration determined every duration are determined calculates the tested server Performance rate mean value;Alternatively,
Using the first interval duration and second interval duration calculation interval duration mean value, and according to the interval Duration mean value determines the performance rate of the tested server.
In conjunction with any possible implementation of the first of the third aspect or the third aspect to the 4th kind, in third party In the 5th kind of possible implementation in face, the processor is also used to execute following operation:
It is in down state based on the determination tested server, returns and executes the triggering network interface to quilt The operation that server sends the first detection messages is surveyed, until when meeting preset condition;The preset condition is default executes Number or default execution time span length.
Server performance detection method, device and the equipment of the embodiment of the present invention are needing to carry out server performance detection When, detection device sends the first detection messages to tested server, and receives tested server and return for the first detection messages The first response message, in this way, detection device just determines tested service using the first detection messages and the first response message The working condition of device, and when tested server is in available mode, according between the first detection messages and the first response message The first interval duration determine the performance rate of tested server.This is primarily due to, and interval duration can be anti-to a certain extent The response speed of tested server processing requests is reflected, therefore, the embodiment of the present invention is just in combination with the working condition of tested server And response speed, it determines the performance rate for more having discrimination of tested server, improves the accuracy of performance test results. In this way, the reasonability that load-balancing device carries out load balancing based on performance test results of the embodiment of the present invention is also just improved, And then guarantee that institute's distribution server can provide the access service of good quality for client user.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application can also be obtained according to these attached drawings other for those of ordinary skill in the art Attached drawing.
Fig. 1 is the networking schematic diagram of dns server performance detection of the embodiment of the present invention;
Fig. 2 is the schematic diagram of recursive query of the embodiment of the present invention;
Fig. 3 is the flow diagram of server performance detection method of the embodiment of the present invention;
Fig. 4-1 is a kind of time diagram of server performance of embodiment of the present invention detection process;
Fig. 4-2 is another time diagram of server performance of embodiment of the present invention detection process;
Fig. 4-3 is another time diagram of server performance of embodiment of the present invention detection process;
Fig. 5 is the composition schematic diagram of server performance detection device of the embodiment of the present invention;
Fig. 6 is the composition schematic diagram of server performance detection device of the embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawing with embodiment to this Inventive embodiments are described in further detail.
Before introducing technical solution of the embodiment of the present invention, first concrete application scene of the invention is explained.
Service load balancing technology provides a kind of cheap effectively transparent method, is used to extended network equipment and server Bandwidth, increase handling capacity, Strengthens network data-handling capacity, improve network flexibility and availability.It is being born When carrying balanced, the access request of client user can be assigned on multiple servers by load-balancing device, be serviced by this more Device and behavior client user provide access service.
In order to allow server to provide good service for client user, currently, main worked shape by server State (can be presented as two kinds of available mode, down state) Lai Fanying server performance, then load is utilized by load-balancing device Equalization algorithm chooses the server for distributing to client user from available mode server.Below with reference to DNS shown in Fig. 1 (Domain Name System, domain name system) performance detection networking schematic diagram, to existing server performance detection process into Row illustrates, wherein the first dns server (128.18.52.55) is as tested server.
Firstly, in the case where ensuring the whole network interface normal operation (can be understood as Interface status is UP), load balancing Equipment (128.18.52.51) initiates DNS request (on namely to tested dns server (128.18.52.55) using DNS Protocol Detection messages in text), e.g., requesting access to domain name is the corresponding server of www.huawei.com, at this point, in DNS request extremely The domain name requested access to is carried less, (identification code is generated identification code by DNS request sender, is inquired and is responded for recognizing, and will Mutual corresponding inquiry and response are matched.Signable identification code is Transaction ID).
Secondly, executing following three movements after tested dns server receives DNS request: first is that, carry out domain name mapping Obtain the IP address of the corresponding server of domain name;Second is that obtaining the identification code in DNS request;Third is that by IP address and identification code It is added to DNS response (namely response message above), and DNS response is sent to load-balancing device.
Finally, load-balancing device receive DNS response after, judge response in identification code whether with the identification in request Code is consistent, if unanimously, determining that the working condition of tested dns server is available mode;If it is inconsistent, determining quilt The working condition for surveying dns server is down state, corresponds to this, load-balancing device can be modified to user's distribution server Algorithm, temporarily not by this dns server in down state distribute to user use.
Based on above-mentioned existing server performance detection scheme, it is ensured that the server for distributing to user can provide visit for user The service of asking, but not can guarantee it the second best in quality access service can be provided for user.Below to influence server service quality Factor be illustrated.
Factor one, the mapping relations of dns server locally uncached domain name and IP address.
It after client receives the http://www.huawei.com of user's input, i.e., can be this to load-balancing device The dns server (this dns server for client distribution can be described as Local dns server) of client distribution is sent DNS request.Accordingly, it after Local dns server receives DNS request, first inquires in its local cache and whether is cached with Effective mapping relations of www.huawei.com:
If so, then directly carrying out domain name mapping according to the mapping relations, the corresponding service of www.huawei.com is obtained The IP address of device, in this way, the time that Local dns server can be shorter, less resource consumption come customer in response end and asks It asks, provides the access service of high quality for user.
If it is not, carrying out recursive query, for details, reference can be made to schematic diagram is inquired shown in Fig. 2.Local dns server from A root dns server is chosen in the root dns server list that the machine is pre-configured, and is sent to it inquiry www.huawei.com Request.Because having recorded the corresponding Authoritative DNS server of top level domain in root dns server, therefore root DNS service in this example Device can return to the IP address of the corresponding Authoritative DNS server in the domain .com to Local dns server.In this way, Local DNS service Device may continue to the domain name mapping request that www.huawei.com is initiated to the corresponding Authoritative DNS server in the domain .com, by .com The corresponding Authoritative DNS server in domain is to the corresponding IP for authorizing domain server of Local dns server return huawei.com Location.Finally, Local dns server continues to initiate www.huawei.com's to the corresponding authorization domain server of huawei.com Domain name mapping request, is returned from the corresponding authorization domain server of huawei.com to Local dns server The IP address of the corresponding server of www.huawei.com, and then the IP address that will be parsed by Local dns server again Client browser is returned to, is initiated by browser to 80 ports of the corresponding server ip address of www.huawei.com HTTP GET instruction, in this way, server can customer in response end request, to its return client user request content.
By above-mentioned recursive query process it is found that Local dns server locally uncached domain name and IP address mapping When relationship, Local dns server needs to spend longer time, more resource consumption to carry out the request of customer in response end, for The access that family provides is second-rate.
The load of factor two, dns server carrying is more.
When dns server is available mode, the quantity of server carry load can also be caused server service quality It influences.Under normal circumstances, the quantity of server carry load and server response time be inversely, that is, server carrying The quantity of load is fewer, and the time of customer in response end request is shorter;The on the contrary then response time is longer.Still with performance shown in Fig. 1 For detecting networking schematic diagram, the load number of the first dns server (128.18.52.55) carrying has been approached fullcharging, the 2nd DNS Server (128.18.52.56) is comparatively idle, if both for available mode, during load balancing, load balancing The two servers may be distributed to client by equipment.Under normal circumstances, client is sent to for its server distributed When access request, any weighting or limitation processing will not be done, in this way, this may result in being continuously added on the first dns server new Load, and be continuously increased new DNS request, the first dns server overload caused even to collapse.
In summary it is found that existing server performance detection scheme can not correctly reflect server performance, in this way, just Will affect be during load balancing client distribution server reasonability, cause institute's distribution server to provide clothes for client Second-rate (such as the response time is long) of business, cost are larger (as consumption resource is more).The embodiment of the present invention be thus and It proposes, it is desirable to provide a kind of method of new detection service device performance improves the accuracy of testing result, thus to improve load The certain technical supports of offers such as the reasonability of balancing procedure, the service quality for improving institute's distribution server.
Referring to Fig. 3, the flow diagram of server performance detection method of the embodiment of the present invention is shown, it may include following step It is rapid:
Step 101, detection device sends the first detection messages to tested server, and the is carried in first detection messages One information.
In order to improve server performance detection accuracy, the embodiment of the present invention in addition to want detection service device working condition it Outside, the response speed of detection service device is also wanted, and determines the performance rate of server according to these two aspects information.Specifically, may be used The time of access request is responded to reflect its response speed by server, for this purpose, detection device can first be sent out to tested server The first response sent the first detection messages, and tested server to be received is waited to return for first detection messages, by the first inspection Observe and predict time of the interval duration as server response access request between text and the first response message.
As an example, detection device can receive the externally input first information, and generates the first detection messages and send To tested server.By taking tested server is dns server as an example, detection device receives externally input domain name After www.huawei.com, that is, DNS Protocol can be used to generate the DNS request at least carrying domain name www.huawei.com.So Under scheme, detection device just carries out performance detection to tested server using the specified first information in outside.It needs to illustrate It is that the first information can be input to detection device by external detection personnel by way of order line, or can also be set by outside Standby (such as load-balancing device, client) is input to detection device, and the embodiment of the present invention can be not specifically limited this.
Alternatively, as an example, detection device can also configure an initialized data base, and preserve in the initialized data base The first information, in this way, when needing to carry out performance detection, detection device can read the first information from preset data, generate the One detection messages are sent to tested server.By taking tested server is dns server as an example, detection device receives external input Triggering information, can be read from database the first information (e.g., www.huawei.com), and using DNS Protocol generate to The DNS request of www.huawei.com is carried less.Such scheme, detection device can read the first letter from database at random Breath, and performance detection actively is carried out to tested server using the first information.It should be noted that triggering information can be one Externally input triggering command, or it is also possible to one article of externally input DNS request (domain name that the DNS request carries and the The domain name that one detection messages carry is different, and the domain name such as carried as the DNS request of triggering information is www.***.com, inspection Measurement equipment reads domain name www.huawei.com after receiving triggering information from database, and replaces in former DNS request Www.***.com generates the first detection messages).Similarly, triggering information can be defeated by external equipment or external detection personnel Enter, the embodiment of the present invention can be not specifically limited input source, the form of expression etc. that trigger information.
Step 102, the detection device receives the tested server and corresponds to first detection messages return first Response message carries the second information in first response message, has between second information and the first information and reflects Penetrate relationship.
After detection device sends the first detection messages to tested server, start waiting to receive tested server to its feedback The first response message, wherein at least carry the second information in the first response message, and the second information and the first detection messages In the first information between have mapping relations.Still by taking tested server is dns server as an example, the first detection messages are DNS Request, the first information are the domain name requested access to, and the first response message is DNS response message, and the second information is to provide domain name pair The IP address for the server that should be serviced, mapping relations of the mapping relations between domain name and IP address.
Step 103, the detection device determines whether the tested server is in available mode.
Detection device sends the first detection messages to tested server, and receives the first response that tested server returns After message, i.e., executable step 103 determines whether the working condition of tested server is available mode.
As an example, detection device can determine the working condition of tested server according to identification code.That is, the first inspection It observes and predicts and also carries identification code in text in addition to the first information, also carry identification code in addition to the second information in the first response message, In this way, detection device can judge whether tested server contention states are available according to identification code according to introduction made above State, detailed process are no longer repeated herein.
Alternatively, as an example, detection device can also determine tested server according to externally input instruction information Working condition.Specifically, external equipment (e.g., load-balancing device, client etc.) can be according to introduction made above, according to The identification code carried in one detection messages and the first response message judges the working condition of tested server, and judging result is added It is added in instruction information and is sent to detection device;Alternatively, external detection personnel pass through after knowing tested server contention states Tested server contention states are input to detection device by the mode of order line, and the embodiment of the present invention can not do specific limit to this It is fixed.
Step 104, determine that the tested server is in available mode based on the detection device, the detection device obtains First between first detection messages and first response message is taken to be spaced duration.
Step 105, the detection device determines the performance rate of the tested server according to first interval duration.
Through step 103, if detection device determines that tested server is in available mode, detection device can obtain the first inspection The first interval duration between text and the first response message is observed and predicted, and then determines tested server using the first interval duration Performance rate.Specifically, interval duration is shorter, illustrates that the response speed of tested server is faster, performance is better;Conversely, then Illustrate that the response speed of tested server is slower, performance is poorer.If assuming server performance lower grade expression server performance Better, then the relationship Y=f (D) being spaced between duration (D) and performance rate (Y) can be presented as proportional relationship Y=k D, wherein K is proportionality coefficient, can be presented as any positive number as needed.
It as an example, can be two-stage by server performance grade classification, from low to high successively are as follows: performance is good (can to determine Justice is grade 1), performance it is poor (may be defined as grade 2), in this way, an interval duration threshold value can be arranged, and when first is spaced When length is no more than the threshold value, determine that the performance rate of tested server is that performance is good;When the first interval duration is more than the threshold value, The performance rate for determining tested server is that performance is poor.Alternatively, an also settable performance threshold, that is, after having configured k value, according to The corresponding tested server performance value Y of the first interval duration is calculated in Y=kD, and when Y is no more than performance threshold, determines quilt The performance rate for surveying server is that performance is good;When Y is more than performance threshold, determine that the performance rate of tested server is performance Difference.Specifically, threshold value setting, the configuration of k value etc. can be depending on actual use demands, and the embodiment of the present invention can not do this specifically It limits.
Furthermore, it is contemplated that e.g., whether tested server local, which is cached with, reflects there are many factor for influencing interval duration is possible Penetrate relationship, the quantity of tested server carry load, the processing capacity of tested server itself, tested server and detection device Between network environment etc., therefore, as an example, also the factor of above-mentioned influence interval duration can be subjected to any combination, And the interval duration under each combination and server performance hierarchical relationship are counted, it is multistage by server performance grade classification.Such as, most The performance divided eventually is from high to low successively are as follows: performance excellent (may be defined as grade 1), performance good (may be defined as grade 2), in performance (may be defined as grade 3), performance are poor (may be defined as class 4), and are provided with each performance rate according to each combined statistical result Between threshold value, in this way, can be more careful determination be tested server performance rate.Specifically, performance rate is distinguished Threshold value can be presented as interval duration threshold value, in this way, detection device is just using the first interval duration and each interval duration threshold value phase Compare, determines the performance rate of tested server;Alternatively, performance threshold can be also presented as by distinguishing the threshold value of performance rate, such as This, just tested server performance value Y, and making property is calculated using configured k value, the first interval duration D in detection device Can value Y compared with each performance threshold, determine the performance rate of tested server.Specifically, influence be spaced duration factor, Combination that each factor is formed, performance rate, threshold value setting, the configuration of k value marked off etc. can depending on actual use demand, The embodiment of the present invention can be not specifically limited this.
In conclusion the embodiment of the present invention can also combine detection messages after determining that tested server is in available mode Interval duration between response message further clarifies the performance rate of tested server, because interval duration can be in certain journey Reflect the response speed of tested server processing requests on degree, therefore server performance detection knot can be improved in the embodiment of the present invention The accuracy of fruit carries out the reasonable of load balancing based on performance test results of the embodiment of the present invention to improve load-balancing device Property, and then guarantee that institute's distribution server can provide the access service of good quality for client user.
It should be noted that the detection device in the embodiment of the present invention can be an autonomous device, it is connected to client Between tested server;Alternatively, the function that can also will test equipment is integrated in load-balancing device, now netted without change Connection relationship, the embodiment of the present invention can be not specifically limited this.
In addition, it should also be noted that, tested server in the embodiment of the present invention can be presented as such as examples cited above Dns server, alternatively, tested server can also be presented as Call Center Server, CDN (Content Distribution Network, content distributing network) in content distributing server etc., can be reflected in the local cache first information and the second information Penetrate the server of relationship.If tested server is Call Center Server, the first detection messages are call request, the first letter Breath is the account (telephone number that can be generally presented as called party) of called party, and the first response message is that calling is rung It answers, the second information is the corresponding client ip address of called party, and mapping of the mapping relations between account and IP address is closed System.If tested server is content distributing server, the first detection messages are content access request, and the first information is request The content information (can be presented as the corresponding URL of content, keyword, title etc.) of access, the first response message are access to content Response, the second information are the IP address of cache server, and mapping relations are between content information and cache server IP address Mapping relations, it should be noted that cache server it is to be understood that content source server in a local interaction point, The corresponding content of content information is obtained from content source server, and by content caching in local, so after, client passes through When the IP address access cache server that content distributing server provides, so that it may obtain the corresponding content of content information.
Below by taking dns server as an example, the process of performance detection of the embodiment of the present invention is explained.
Embodiment 1
For tested dns server, multiple domain names are preserved in the initialized data base of detection device configuration, for details, reference can be made to Shown in the following table 1:
Number Domain name
1 www.huawei.com
2 www.***.com
3 www.sina.com
4 www.cnki.net
The performance testing process of timing diagram shown in -1 referring to fig. 4, the present embodiment can comprise the following steps that
1, detection device receives externally input DNS request, carries domain name www.sina.com in the request, in this way, inspection Measurement equipment, which can be triggered from initialized data base, reads a detection domain name, and e.g., the domain name of reading is Www.huawei.com (first information i.e. above).
2, the message encapsulation mode of detection device change DNS request, www.sina.com therein is changed to Www.huawei.com forms new DNS request.As an example, detection device can seal off the Queries word of DNS request Section, and will test and be added in the Name of Queries field with domain name, form new DNS request.
3, detection device sends the DNS request (the first detection messages i.e. above) after change to tested dns server, Domain name www.huawei.com, identification code Transaction ID are carried in the request.
4, be tested dns server receive detection device send DNS request, carry out domain name mapping obtain with Www.huawei.com has the IP address (the second information i.e. above) of mapping relations, and by IP address and therefrom DNS is asked It asks the identification code of acquisition to be added in DNS response message (the first response message i.e. above), sends DNS to detection device Response message.
5, detection device receives the DNS response message that tested dns server is sent, and determines following two information:
(1) it is tested the working condition Status (S) of dns server, can be obtained by matching identification code, it is no longer superfluous herein It states.As an example, when tested dns server is down state, it can record S=0, being tested dns server is that shape can be used When state, S=1 can record.
(2) record sends the time of DNS request, receives the time of DNS response message, obtains interval duration Delay (D) (the first interval duration i.e. above).
6, when determining tested dns server is available mode (i.e. S=1), detection device calculates quilt using interval duration D Survey dns server performance number Y=kD*S, wherein the value of k can as needed depending on, be generally taken as positive number.
7, detection device obtains tested dns server using calculated performance number Y compared with default capabilities threshold value Performance rate.In this way, just completing the server performance detection process of the embodiment of the present invention.
It should be noted that detection device is triggered after starting to carry out performance detection, can be introduced such as embodiment 1, only A detection domain name is read from initialized data base, and performance detection is carried out to tested dns server using the domain name;Or Person is also recycled reciprocal carry out performance detection, i.e., according to scheme shown in embodiment 1, is completed using a domain name read out It after performance detection, can also continue to read another domain name from initialized data base, continue to carry out tested dns server Performance detection so recycles, until carrying out a performance detection using each domain name in database, or until is controlled to stop Until performance testing process.In this way, the performance test results of at least two domain names can be averaging processing, and mean value is made For the performance test results for being tested dns server, the accuracy of performance test results of the embodiment of the present invention is further increased.
In addition, it is necessary to illustrate, in the embodiment of the present invention, after carrying out a performance detection using certain domain name, may be used also Again the domain name is read from reading database, carries out a performance detection using it again.This is primarily due to, and influences server The factor of performance may change at any time, e.g., be tested dns server it is initial when and uncached domain name www.huawei.com With the mapping relations of IP address, but in the process for carrying out server performance detection for the first time using domain name www.huawei.com In, tested dns server can obtain the mapping relations by way of recursive query, and be buffered in tested dns server local, The factor for influencing server performance is caused to change;Alternatively, the band of tested dns server, which carries, happens variation, tested DNS The number of requests of server process changes, the network environment between tested dns server and detection device changes Deng, the performance test results that may cause tested server change, therefore, using same domain name to tested DNS service Device carries out multiple performance detection, in this way, also can further improve the accuracy of performance test results of the embodiment of the present invention.As one Kind of example, can using the corresponding last time performance test results of certain domain name as the performance test results for being tested dns server, It can also be using the mean value of the corresponding multiple performance test results of the domain name as the performance test results of tested dns server, this hair Bright embodiment can be not specifically limited this.
Embodiment 2
For tested dns server, multiple domain names and each domain name are preserved in the initialized data base of detection device configuration Corresponding level information, for details, reference can be made to shown in the following table 2:
Number Domain name Level information
1 www.huawei.com 1
2 www.***.com 2
3 www.sina.com 2
4 www.cnki.net 1
In the present embodiment, one corresponding level information also is set for the domain name in database, and combines tested server Working condition, interval duration and level information determine the performance rate of tested server.Timing shown in -2 referring to fig. 4 Figure, the performance testing process of the present embodiment can comprise the following steps that
Step 1~5 are identical as the step 1 of example 1 above~5, and details are not described herein again.
6, when determining tested dns server is available mode (i.e. S=1), detection device utilizes interval duration D, rank Information X calculates performance number Y=(kD+mX) the * S of tested dns server, wherein the value of k, m can as needed depending on, generally It is taken as positive number.
7, detection device obtains tested dns server using calculated performance number Y compared with default capabilities threshold value Performance rate.In this way, just completing the server performance detection process of the embodiment of the present invention.
Specifically, the level information of set of frequency domain name can be accessed according to the Internet resources that domain name is identified, as one Kind of example, level information can embody are as follows: common (can corresponding level 1), secondary common (can corresponding level 2), be of little use (can respective stages Other 3, do not embody in table 2).Alternatively, the corresponding level information of domain name can be also set according to the classification belonging to domain name, that is, according to The rank of various service types is arranged in the access habits of user.Such as, user often accesses communication technology class website, then can be by the clothes Business classification is set as rank 1, in this way, when the corresponding server of certain domain name can provide the service of communication technology class for user, then 1 can be set by the level information of the domain name.
It should be noted that in conjunction with Y=(kD+mX) * S it is found that relationship between level information and performance rate, it should be with interval Relationship between duration and performance rate is consistent, that is to say, that if direct proportionality between interval duration and performance rate, Also direct proportionality is wanted between level information and performance rate.In this case, the corresponding level information of domain name is lower (i.e. interviewed Ask that frequency is high or meets user's access habits), the interval duration between detection messages and response message is smaller, is calculated Server performance value Y is just smaller, and the server performance lower grade determined is (i.e. performance is better).
In addition, the process for domain name degree of establishment information can be executed by detection device, can also be executed by external other equipment After be loaded into detection device, the embodiment of the present invention can be not specifically limited this.
In addition, it should also be noted that, coefficient k, the value of m in Y=(kD+mX) * S can voluntarily match according to actual needs It sets.Below by taking two kinds of concrete scenes as an example, the mode of configuration k, m value is explained.
Scene one configures k, m value to distinguish both interval duration, level information to the shadow of calculation server performance number Y It rings, that is, interval duration, the weight of level information are set by configuring k, m value.
Scene two guarantees to calculate when at interval, duration, the magnitude of level information are inconsistent by configuring k, m value Server performance value Y reasonability.Such as, the corresponding level information X=1 of certain domain name, interval duration D=30ms, then can be by m Value be configured to m=10, k=1 is configured by the value of k, in this way, the server performance value Y=40 being calculated, makes performance The value of value Y is more reasonable.It should be noted that so under mode, in order to guarantee to calculate the accurate of performance number in detection process Property and consistency, k, m value should be kept constant, unless the reasons such as existing net variation cause to be spaced duration, the magnitude of level information hair When changing, the value of the two is just adjusted.
It should be noted that in order to further increase the accuracy of performance test results of the embodiment of the present invention, the present embodiment It after completing a performance detection using a domain name read out, can also can also continue to from pre- as introduced at embodiment 1 It sets and reads another domain name in database, continue to carry out tested dns server performance detection, so recycle, until utilizing number A performance detection is carried out according to each domain name in library, or until being controlled to stop performance testing process.Alternatively, utilizing certain After a domain name carries out a performance detection, also the domain name can be read from reading database again, be carried out again using it disposable It can detection.In this regard, the embodiment of the present invention can be not specifically limited.
Embodiment 3
On the basis of the above embodiments, it also can be reserved for the body of multiple servers in the initialized data base of detection device configuration Corresponding relationship between part mark and the identity and domain name of each server.Certainly, the base of the table 2 shown in embodiment 2 It also can be reserved for the corresponding level information of each domain name on plinth, in database, for details, reference can be made to shown in the following table 3:
Performance testing process can comprise the following steps that
On the basis of the scheme shown in example 1 above, 2, detection device executes step 1 and reads detection domain name (i.e. The first information above) after, can also carry out following steps: detection device is according to the first information, from the preset data The identity of the tested server is selected in the corresponding relationship saved in library.In this way, detection device can will be after change DNS request be sent to the tested server of identity selected.It should be noted that the tested service body of selection The step of part mark, can execute before step 2, can also execute after step 2, or be performed simultaneously with step 2, and the present invention is real This can be not specifically limited by applying example, as long as selecting tested server before executing step 3.
That is, e.g., detection is with domain name after detection device determines domain name used in performance testing process Www.***.com can then search the identity 1 of the corresponding tested server of the domain name from initialized data base accordingly, make Detection device knows that whom current measurand is, and then sends detection messages to the tested server with identity 1.Or Person, detection device may further determine that out multiple detection domain names, e.g., detection with domain name be www.***.com and Www.huawei.com, then can search the identity 1 of the common corresponding tested server of this 2 domain names accordingly, and then to tool There is the tested server of identity 1 to send detection messages (as in this case, sending two to tested server after detection device elder generation A detection messages, two detection messages carry different domain names respectively).
It should be noted that the tested server with different identity mark may correspond to same domain name, that is, more clothes Being engaged in device can be to certain domain name progress domain name mapping.3 examples cited of table as above, the tested server with identity 1,2 are equal Corresponding domain name www.huawei.com, then detection device determines domain name www.huawei.com used in performance testing process Afterwards, performance detection can be carried out to the tested server of identity 1,2 respectively using the domain name, alternatively, can also preset Detected rule only carries out performance detection, this hair to the specified tested server of rule using the domain name when there is such case Bright embodiment can be not specifically limited this.
Similarly, in order to improve the accuracys of performance test results of the embodiment of the present invention, the present embodiment can also be such as embodiment 1 Place is introduced, and carries out multiple performance detection to same tested server using different domain names, or same domain name can also be used Multiple performance detection is carried out to same tested server, the embodiment of the present invention can be not specifically limited this.
Embodiment 4
Such as introduction made above, the embodiment of the present invention can carry out multiple performance to same tested server using different domain names Detection, to improve the accuracy of performance test results of the embodiment of the present invention.Below by taking 3 examples cited of table as an example, to utilization Www.***.com and www.huawei.com calculate have the process of the performance rate of tested server of identity 1 into Row illustrates.
The performance testing process of timing diagram shown in -3 referring to fig. 4, the present embodiment can comprise the following steps that
1, detection device receives the externally input DNS request for carrying domain name www.sina.com, and is triggered from preset A detection domain name is read in database, the domain name such as read is www.***.com (first information i.e. above).
2, detection device searches initialized data base, selects the corresponding server identity mark of domain name www.***.com 1, and the dns server with the mark is determined as tested dns server.
3, the message encapsulation mode of detection device change DNS request, www.sina.com therein is changed to Www.***.com forms new DNS request.
4, detection device sends the DNS request (the first detection messages i.e. above) after change to tested dns server, Domain name www.***.com, identification code Transaction ID are carried in the request.
5, be tested dns server receive detection device send DNS request, carry out domain name mapping obtain with Www.***.com has an IP address (the second information i.e. above) of mapping relations, and by IP address and therefrom DNS request The identification code of middle acquisition is added in DNS response message (the first response message i.e. above), sends DNS to detection device and answers Answer message.
6, detection device receives the DNS response message that tested dns server is sent, and determines following two information:
(1) it is tested the working condition Status (S) of dns server, can be obtained by matching identification code, it is no longer superfluous herein It states.As an example, when tested dns server is down state, it can record S=0, being tested dns server is that shape can be used When state, S=1 can record.
(2) record sends the time of the first detection messages, receives the time of the first response message, obtains interval duration Delay (D) (the first interval duration i.e. above).
7, when detection device determines that tested dns server is available mode, the first interval is calculated using Y=(kD+mX) * S The performance number Y1 of the corresponding tested dns server of duration.
8, detection device continuation is read the tested corresponding other domain names of dns server from initialized data base and is e.g. read Domain name be www.huawei.com (the third information i.e. in the embodiment of the present invention)
9, the message encapsulation mode of detection device change DNS request, www.sina.com therein is changed to Www.huawei.com forms new DNS request.
10, detection device sends the DNS request (second i.e. in the embodiment of the present invention after change to tested dns server Detection messages), carry domain name www.huawei.com in the request, identification code (can be with the identification code phase in the first detection messages Together, can also be different, the embodiment of the present invention can be not specifically limited this).
11, be tested dns server receive detection device send DNS request, carry out domain name mapping obtain with Www.huawei.com has the IP address (the 4th information i.e. above) of mapping relations, and by IP address and therefrom DNS is asked It asks the identification code of acquisition to be added in DNS response message (the second response message i.e. in the embodiment of the present invention), is set to detection Preparation send DNS response message.
12, detection device receives the DNS response message that tested dns server is sent, and record sends the second detection messages Time, receive the second response message time, obtain interval duration Delay (D) (i.e. in the embodiment of the present invention second interval when It is long).It should be noted that after last time detection process determines server for available mode, this was detected in order to simplify processing Journey can no longer carry out working condition detection, certainly, in order to guarantee the accuracy of testing result, prevent from servicing in detection process twice Device working condition changes and influences testing result, this detection process is also using identification code again to tested dns server Working condition detection is carried out, the embodiment of the present invention can be not specifically limited this.
13, when detection device determines that tested dns server is available mode, the second interval is calculated using Y=(kD+mX) * S The performance number Y2 of the corresponding tested dns server of duration.
14, detection device calculated performance mean value Y=(Y1+Y2)/2, and utility mean value Y is compared with default capabilities threshold value Compared with obtaining the performance rate of tested dns server.In this way, just completing the server performance detection process of the embodiment of the present invention.
In addition, as an example, it can also be after record obtains the first interval duration, the second interval duration, first with two Person's counting period duration mean value recycles the property of the corresponding tested dns server of Y=(kD+mX) * S counting period duration mean value Can value Y3 obtain the performance rate of tested dns server and then using Y3 compared with default capabilities threshold value.Alternatively, utilizing One interval duration obtains the performance rate of tested dns server, obtains the performance of tested dns server using the second interval duration After grade, two performance rates are averaging processing, using obtained performance rate mean value as the performance of tested dns server Grade.
It should be noted that detection device can be as shown in this embodiment, the corresponding property of the first interval duration is being calculated Can be after value Y1 (i.e. after step 7), then other domain names are read from initialized data base;Alternatively, can also be in change DNS request Message encapsulation mode obtains after new DNS request (i.e. after step 3~7 either steps), and it is corresponding to read tested dns server Other domain names, the embodiment of the present invention can be not specifically limited this.
Embodiment 5
It introduces in conjunction with made above it is found that the embodiment of the present invention is only available mode in the working condition of tested server When, the performance rate of tested server is just further determined using interval duration (alternatively, utilizing interval duration and level information); And when tested server contention states are down state, then determine that tested server breaks down, and cannot temporarily provide visit The service of asking.But in actual application, being tested server to be in down state may be that server failure causes, It may be since the abnormal conditions such as flash, shake cause.In order to further increase the accuracy of performance detection of the embodiment of the present invention, Performance test results mistake caused by abnormal conditions is eliminated, detection device can also execute following on the basis of the above embodiments Step: determining that the tested server is in down state based on the detection device, return execute the detection device to The step of tested server sends the first detection messages, until when meeting preset condition;The preset condition is default holds Row number or default execution time span.
At example 1 above on the basis of introduced scheme, if detection device records tested dns server in step 5 Working condition be down state (i.e. S=0), as an example, detection device can directly determine that tested dns server goes out Existing failure, Stopping Ability detection process, and temporarily no longer assign them to client user's use;Alternatively, showing as another kind Example, detection device, which also can return to, executes step 3, continues to send the DNS request after change to tested dns server, again to quilt It surveys dns server and carries out working condition detection, if being detected tested dns server is currently at available mode, continue to hold The step of row subsequent determining server performance grade;If being detected tested dns server currently is still down state, sentence It is disconnected currently whether to meet preset condition, if it is satisfied, then Stopping Ability detection process, and temporarily no longer by tested dns server Distribute to client user's use;If conditions are not met, then continuing to return to step 3, until when meeting preset condition.
With method shown in Fig. 3 correspondingly, the embodiment of the invention also provides a kind of server performance detection device, referring to Schematic diagram shown in Fig. 5, described device can include:
Transmission unit 201 carries the in first detection messages for sending the first detection messages to tested server One information;
Receiving unit 202 corresponds to the first response that first detection messages return for receiving the tested server Message carries the second information in first response message, between second information and the first information there is mapping to close System;
Status determining unit 203, for determining whether the tested server is in available mode;
Acquiring unit 204 is obtained for determining that the tested server is in available mode based on the status determining unit First between first detection messages and first response message is taken to be spaced duration;
Level de-termination unit 205, first interval duration for being obtained according to the acquiring unit determine the quilt Survey the performance rate of server.
In conclusion detection device of the embodiment of the present invention can also combine after determining that tested server is in available mode Interval duration between detection messages and response message further clarifies the performance rate of tested server, because interval duration can Reflect the response speed of tested server processing requests to a certain extent, therefore server can be improved in the embodiment of the present invention The accuracy of energy testing result load to improve load-balancing device and be based on performance test results of the embodiment of the present invention The reasonability of weighing apparatus, and then guarantee that institute's distribution server can provide the access service of good quality for client user.
Optionally, detection device may be configured with initialized data base, and the initialized data base preserves the first information, such as This, after detection device is triggered, so that it may read the first information from initialized data base, and actively utilize the first information to tested clothes Device of being engaged in carries out performance detection, corresponds to this, described device further include: reading unit, in the transmission unit to the quilt It surveys before server transmission first detection messages, the first information is read from the initialized data base, and utilize institute It states the first information and generates first detection messages.
Detailed process can be found in and introduce at example 1 above, and details are not described herein again.In addition, detection device is triggered Afterwards, the first information can be only read from initialized data base, and performance detection is carried out to tested server using the first information;This Outside, detection device is also recyclable back and forth reads other information from initialized data base, carries out to same tested server muptiple-use It can detection;Alternatively, also carrying out multiple performance detection to same tested server using same information, the embodiment of the present invention is to this It can be not specifically limited, herein also not reinflated introduction.
Optionally, the initialized data base also preserves the first level information of the first information, then the grade is true Order member, specifically for determining the performance of the tested server according to the first interval duration and the first level information Grade;The first level information is that the Internet resources identified according to the first information are accessed frequency or first letter Cease generic setting.
In this way, detection device just in combination with the working condition of tested server, interval duration, level information three in terms of come it is true Surely the performance rate of tested server, detailed process can be found in and introduce at example 2 above, and details are not described herein again.
Optionally, the initialized data base also preserve the tested server identity and the first information Corresponding relationship, then before the detection device sends the first detection messages to tested server, described device further include: selection Unit is used for before the transmission unit sends first detection messages to the tested server, according to described first Information selects the identity of the tested server from the corresponding relationship.
In this way, detection device actively can carry out performance detection to different server, detailed process can be found in implementation above It is introduced at example 3, details are not described herein again.
Optionally, determine that the tested server is in available mode based on the status determining unit,
The transmission unit is also used to send the second detection messages, second detection messages to the tested server Middle carrying third information;
The receiving unit is also used to receive the tested server and corresponds to the second sound that second detection messages return Message is answered, the 4th information is carried in second response message, there is mapping between the 4th information and the third information Relationship;
The acquiring unit is also used to obtain between second between second detection messages and second response message Every duration;
The level de-termination unit, specifically for determining the performance of the tested server according to second interval duration Grade, and the performance determined using the performance rate and second interval duration determined according to first interval duration The performance rate mean value of server is tested described in rating calculation;Alternatively,
The level de-termination unit is specifically used for using between the first interval duration and second interval duration calculation Every duration mean value, and according to the performance rate for being spaced duration mean value and determining the tested server.
In this way, read from initialized data base using multiple information (can be presented as the first information, third information herein, Certainly, as an example, it can also read more information and carry out performance detection, the embodiment of the present invention is to this without limiting) Multiple performance detection is carried out to same tested server, to improve the accuracy of performance test results of the embodiment of the present invention, specifically Process can be found in and introduce at example 4 above, and details are not described herein again.
Optionally, the transmission unit is also used to determine that the tested server is in based on the status determining unit Down state continues to send first detection messages to the tested server, until when meeting preset condition;Institute Stating preset condition is default execution number or default execution time span.
In this way, performance test results mistake caused by abnormal conditions can be eliminated, performance detection of the embodiment of the present invention is improved As a result accuracy, detailed process can be found in and introduce at example 5 above, and details are not described herein again.
It should be noted that the server performance detection device provided in present apparatus embodiment, can integrate equal in load In the equipment that weighs, it is applied in attached embodiment of the method shown in Fig. 3 above, realizes the function of wherein detection device.Server performance Other additional functions that detection device may be implemented and other interactive processes with tested dns server please refer to method reality The description in example to detection device is applied, is repeated no more herein.
In addition, detection device provided by the above embodiment is when carrying out server performance detection, only with above-mentioned each function mould The division progress of block can according to need and for example, in practical application by above-mentioned function distribution by different functional modules It completes, i.e., the internal structure of device is divided into different functional modules, to complete all or part of the functions described above.
The embodiment of the invention also provides server performance detection devices.Schematic diagram shown in Figure 6, server performance inspection Measurement equipment can include: processor 301, memory 302, network interface 303, bus system 304.
The bus system 304, each hardware component for will test equipment are coupled.
The network interface 303 can be with for realizing the communication connection between detection device and at least one other network element Use internet, wide area network, local network, the modes such as Metropolitan Area Network (MAN).
The memory 302, for storing program instruction and data.
The processor 301, for reading the instruction and data stored in memory 302, the following operation of execution:
It triggers the network interface and sends the first detection messages to tested server, the is carried in first detection messages One information;
The tested server, which is received, by the network interface corresponds to the first response that first detection messages return Message carries the second information in first response message, between second information and the first information there is mapping to close System;
Determine whether the tested server is in available mode;
It is in available mode based on the determination tested server, obtains first detection messages and first response The first interval duration between message;
The performance rate of the tested server is determined according to first interval duration.
Wherein, the processor 301 may be a kind of IC chip, the processing capacity with signal.It was realizing Each step of Cheng Zhong, the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form At.These instructions can cooperate realization and control by processor therein, for executing the side of announcement of the embodiment of the present invention Method.Above-mentioned processor can also be general processor, digital signal processor (Digital Signal Processing, DSP), specific integrated circuit (application specific integrated circuit), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor are patrolled Collect device, discrete hardware components.
Wherein, above-mentioned general processor can be microprocessor or the processor is also possible to any conventional processing Device, decoder etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute At, or in processor hardware and software module combination execute completion.Software module can be located at random access memory, dodge It deposits, read-only memory, this fields such as programmable read only memory or electrically erasable programmable memory, register are mature to deposit In storage media.
Wherein, bus system 304 may also include power bus, control bus and state other than including data/address bus Signal bus.But for the sake of clear explanation, various buses are all designated as bus system 304 in Fig. 6.
Optionally, the detection device is configured with initialized data base, and the initialized data base preserves the first information, Then before the triggering network interface sends the first detection messages to tested server, the processor is also used to execute It operates below:
The first information is read from the initialized data base, and generates first detection using the first information Message.
Optionally, the initialized data base also preserves the first level information of the first information, then the processor Execute the performance rate that following operation determines the tested server:
The performance rate of the tested server is determined according to the first interval duration and the first level information;Institute Stating first level information is that the Internet resources identified according to the first information are accessed belonging to frequency or the first information Classification setting.
Optionally, the initialized data base also preserve the tested server identity and the first information Corresponding relationship, then before the triggering network interface sends the first detection messages to tested server, the processor It is also used to execute following operation:
According to the first information, the identity of the tested server is selected from the corresponding relationship.
Optionally, available mode is in based on the determining tested server, the processor is also used to execute following behaviour Make:
It triggers the network interface and sends the second detection messages to the tested server, taken in second detection messages Band third information;
The tested server, which is received, by the network interface corresponds to the second response that second detection messages return Message carries the 4th information in second response message, between the 4th information and the third information there is mapping to close System;
Obtain the second interval duration between second detection messages and second response message;
The processor executes the performance rate that following operation determines the tested server:
The performance rate of the tested server is determined according to second interval duration, and using according between described first The performance rate that the performance rate and second interval duration determined every duration are determined calculates the tested server Performance rate mean value;Alternatively,
Using the first interval duration and second interval duration calculation interval duration mean value, and according to the interval Duration mean value determines the performance rate of the tested server.
Optionally, the processor is also used to execute following operation:
It is in down state based on the determination tested server, returns and executes the triggering network interface to quilt The step of server sends the first detection messages is surveyed, until when meeting preset condition;The preset condition is default executes Number or default execution time span.
It should be noted that the tested server in the embodiment of the present invention can be dns server, call center services Device, content distributing server etc., can be in the server of the local cache first information and the second information MAP relationship.If tested Server is dns server, then first detection messages are DNS request message, and first response message is DNS response report Text, the first information are the first domain name, and second information is IP address.If tested server is call center services Device, then the first detection messages are call request, and the first information is the account of called party, and the first response message is that calling is rung It answers, the second information is the corresponding client ip address of called party, and mapping of the mapping relations between account and IP address is closed System.If tested server is content distributing server, the first detection messages are content access request, and the first information is request The content information of access, the first response message are access to content response, and the second information is the IP address of cache server, and mapping is closed It is the mapping relations between content information and cache server IP address.
In conclusion detection device of the embodiment of the present invention can also combine after determining that tested server is in available mode Interval duration between detection messages and response message further clarifies the performance rate of tested server, because interval duration can Reflect the response speed of tested server processing requests to a certain extent, therefore server can be improved in the embodiment of the present invention The accuracy of energy testing result load to improve load-balancing device and be based on performance test results of the embodiment of the present invention The reasonability of weighing apparatus, and then guarantee that institute's distribution server can provide the access service of good quality for client user.In addition, also Multiple performance detection is carried out to same tested server using different domain names, alternatively, same domain name can also be used to same quilt It surveys server and carries out multiple performance detection, to further increase the accuracy of server performance testing result of the embodiment of the present invention.
It should be noted that the server performance detection device provided in the present embodiment, can integrate and set in load balancing In standby, it is applied in attached embodiment of the method shown in Fig. 3 above, realizes the function of wherein detection device.Server performance detection Other additional functions that device may be implemented and other interactive processes with tested dns server, please refer to embodiment of the method In description to detection device, repeat no more herein.
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding, Substantially the part that contributes to existing technology can embody technical solution of the present invention in the form of software products in other words Out, which can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions With so that a computer equipment (can be the network communications such as personal computer, server, or Media Gateway to set It is standby) execute method described in certain parts of each embodiment of the present invention or embodiment.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments. For equipment and system embodiment, since it is substantially similar to the method embodiment, so describe fairly simple, The relevent part can refer to the partial explaination of embodiments of method.Equipment and system embodiment described above is only schematic , wherein unit may or may not be physically separated as illustrated by the separation member, it is shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs. Those of ordinary skill in the art can understand and implement without creative efforts.
The above is only optional embodiment of the invention, is not intended to limit the scope of the present invention.It should refer to Out, for those skilled in the art, without departing from the principle of the present invention, can also make several Improvements and modifications, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (8)

1. a kind of server performance detection method, which is characterized in that the described method includes:
Detection device sends the first detection messages to tested server, carries the first information in first detection messages;
The detection device receives the tested server and corresponds to the first response message that first detection messages return, described The second information is carried in first response message, and there are mapping relations between second information and the first information;
The detection device determines whether the tested server is in available mode;
Determine that the tested server is in available mode based on the detection device, the detection device obtains first inspection Observe and predict the first interval duration between text and first response message;
The detection device is according to the institute saved in the first interval duration and the initialized data base of detection device configuration The first level information for stating the first information determines the performance rate of the tested server.
2. the method according to claim 1, wherein the initialized data base preserves the first information, then Before the detection device sends the first detection messages to tested server, the method also includes:
The detection device reads the first information from the initialized data base, and using described in first information generation First detection messages.
3. the method according to claim 1, wherein the first level information is according to the first information institute What the accessed frequency of the Internet resources of mark or the first information generic were arranged.
4. described in any item methods according to claim 1~3, which is characterized in that the method also includes:
It determines that the tested server is in down state based on the detection device, returns and execute the detection device to quilt The step of server sends the first detection messages is surveyed, until when meeting preset condition;The preset condition is default executes Number or default execution time span.
5. described in any item methods according to claim 1~3, which is characterized in that the tested server is dns server, First detection messages are DNS request message, and first response message is DNS response message, and the first information is the One domain name, second information are IP address.
6. a kind of server performance detection device, which is characterized in that described device includes:
Transmission unit carries the first information in first detection messages for sending the first detection messages to tested server;
Receiving unit corresponds to the first response message that first detection messages return, institute for receiving the tested server It states and carries the second information in the first response message, there are mapping relations between second information and the first information;
Status determining unit, for determining whether the tested server is in available mode;
Acquiring unit, for determining that the tested server is in available mode based on the status determining unit, described in acquisition The first interval duration between first detection messages and first response message;
Level de-termination unit, the of the first information saved in the initialized data base for being configured according to the detection device First interval duration that one level information and the acquiring unit obtain determines the performance rate of the tested server.
7. device according to claim 6, which is characterized in that
The transmission unit is also used to determine that the tested server is in down state based on the status determining unit, Continue to send first detection messages to the tested server, until when meeting preset condition;The preset condition Number or default execution time span are executed to be default.
8. a kind of server performance detection device, which is characterized in that the equipment includes: processor, memory and network interface;
The memory, for storing program instruction and data;
The processor, for reading the instruction and data stored in the memory, the following operation of execution:
It triggers the network interface and sends the first detection messages to tested server, the first letter is carried in first detection messages Breath;
The tested server, which is received, by the network interface corresponds to the first response message that first detection messages return, The second information is carried in first response message, and there are mapping relations between second information and the first information;
Determine whether the tested server is in available mode;
It is in available mode based on the determination tested server, obtains first detection messages and first response message Between first interval duration;
Institute is determined according to the first level information of the first information saved in the first interval duration and the memory State the performance rate of tested server.
CN201410353696.6A 2014-07-23 2014-07-23 A kind of 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 kind of 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 kind of server performance detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN105337786A CN105337786A (en) 2016-02-17
CN105337786B true 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 kind of server performance detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN105337786B (en)

Families Citing this family (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
CN106533762B (en) * 2016-11-17 2020-09-08 贵州白山云科技股份有限公司 Equipment switching method and equipment switching device
CN107071820A (en) * 2017-04-19 2017-08-18 努比亚技术有限公司 A kind of method of mobile terminal and switch contents Distributor
CN107241240B (en) * 2017-06-30 2020-04-03 广州君海网络科技有限公司 Game server state monitoring method, device and system
CN110248138B (en) * 2018-03-08 2021-06-29 华为技术有限公司 Method and device for audio and video conference
CN109660425B (en) * 2018-12-13 2021-05-18 网宿科技股份有限公司 Monitoring method, determining method, monitoring 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
CN110691139B (en) * 2019-10-11 2022-07-15 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium
CN111049948B (en) * 2019-12-30 2022-07-29 杭州迪普科技股份有限公司 Domain name detection method and device
CN111343237B (en) * 2020-02-07 2022-11-29 广州亚美信息科技有限公司 Server cluster communication method, communication device and computer storage medium
CN114629823B (en) * 2022-05-16 2022-09-06 鹏城实验室 Server testing and monitoring method and device, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937534A (en) * 2006-09-20 2007-03-28 杭州华为三康技术有限公司 Load balance realizing method and load balance device
CN102668455A (en) * 2009-09-24 2012-09-12 3Rd布兰德私人有限公司(公司注册号200719143G) Network monitoring and analysis tool
CN103778050A (en) * 2013-12-30 2014-05-07 国网山东省电力公司 Database server high-availability performance detecting system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7529842B2 (en) * 2002-12-17 2009-05-05 International Business Machines Corporation Method, system and program product for detecting an operational risk of a node
CN100542108C (en) * 2007-07-20 2009-09-16 哈尔滨工程大学 The performance test methods of network store system
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937534A (en) * 2006-09-20 2007-03-28 杭州华为三康技术有限公司 Load balance realizing method and load balance device
CN102668455A (en) * 2009-09-24 2012-09-12 3Rd布兰德私人有限公司(公司注册号200719143G) Network monitoring and analysis tool
CN103778050A (en) * 2013-12-30 2014-05-07 国网山东省电力公司 Database server high-availability performance detecting system

Also Published As

Publication number Publication date
CN105337786A (en) 2016-02-17

Similar Documents

Publication Publication Date Title
CN105337786B (en) A kind of server performance detection method, device and equipment
CN106899680B (en) The fragment treating method and apparatus of multi-tiling chain
US11323347B2 (en) Systems and methods for social graph data analytics to determine connectivity within a community
US6324580B1 (en) Load balancing for replicated services
CN103716251B (en) For the load-balancing method and equipment of content distributing network
US7146353B2 (en) Resource allocation for multiple applications
CN107395683A (en) The system of selection of a kind of time source path and server
CN104410546B (en) The method of testing and device of real time processing system
CN108173937A (en) Access control method and device
CN106933871A (en) Short linking processing method, device and short linked server
CN111314472A (en) Domain name resolution method, domain name resolution server and terminal equipment
CN108173976A (en) Domain name analytic method and device
CN109672757A (en) File access method and file access processing unit
CN111092877A (en) Data processing method and device, electronic equipment and storage medium
CN106060004A (en) Database access method and database agent node
US11841910B2 (en) Token-based authentication for a proxy web scraping service
CN114513488B (en) Resource access method, device, computer equipment and storage medium
CN112954089B (en) Method, device, equipment and storage medium for analyzing data
CN104618388B (en) Fast registration login method and corresponding resetting server, information server
CN110351311A (en) Load-balancing method and computer storage medium
CN106899621A (en) One kind scheduling system and method
CN107835095A (en) A kind of processing method and processing device of daily record
CN108366102A (en) A kind of service discovery method, device and electronic equipment based on Consul
CN107483565A (en) A kind of service background recognition methods, proxy server and computer-readable storage medium
CN108124021A (en) Internet protocol IP address obtains, the method, apparatus and system of website visiting

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