CN106790634B - A kind of method and apparatus for being used to determine whether to initiate backup request - Google Patents

A kind of method and apparatus for being used to determine whether to initiate backup request Download PDF

Info

Publication number
CN106790634B
CN106790634B CN201710005618.0A CN201710005618A CN106790634B CN 106790634 B CN106790634 B CN 106790634B CN 201710005618 A CN201710005618 A CN 201710005618A CN 106790634 B CN106790634 B CN 106790634B
Authority
CN
China
Prior art keywords
numerical value
request
rto
user equipment
network equipment
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
CN201710005618.0A
Other languages
Chinese (zh)
Other versions
CN106790634A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710005618.0A priority Critical patent/CN106790634B/en
Publication of CN106790634A publication Critical patent/CN106790634A/en
Application granted granted Critical
Publication of CN106790634B publication Critical patent/CN106790634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The object of the present invention is to provide a kind of method and apparatus for being used to determine whether to initiate backup request.Specifically, according to pre-defined rule, RTO numerical value is determined, wherein RTO numerical value is as the new estimated response time requested next time, to be used to determine whether to initiate backup request;Wherein, pre-defined rule includes following at least any one: if the request that-user equipment is sent to corresponding first network equipment is by success response, SRTT numerical value and RTTVAR numerical value are updated according to actual response time corresponding to the request, to obtain the first SRTT numerical value and the first RTTVAR numerical value, and RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;If user equipment does not receive the time of response after sending request to corresponding first network equipment be more than the estimated response time, the response time determines RTO numerical value on the estimation.Compared with prior art, the present invention is by realizing following the utility model has the advantages that dynamic calculating RTO numerical value, adaptive backup request, improve systematic entirety energy.

Description

A kind of method and apparatus for being used to determine whether to initiate backup request
Technical field
The present invention relates to distributed technical field more particularly to a kind of technologies for being used to determine whether to initiate backup request.
Background technique
In distributed system especially on-line real time system, delay and long-tail are the important indicators of gauging system superiority and inferiority. Backup request (backup request, also referred to as tie request) mechanism is that a kind of reduce postpones, reduces the effective of long-tail Solution.Its core concept are as follows: after user end to server initiates request, if not receiving response within a certain period of time, Same request (referred to as backup request) is initiated to another server.Extended meeting receives any one clothes in this way after client The success response that business device first returns, and cancel the request on another server.
The key of backup request mechanism is when initiate backup request.In existing implementation, uses and match mostly The mode for setting parameter sets a set time, does not receive success response after being more than the time, i.e., to another server Backup request is initiated, however, there are some problems for this method, such as: in backup request mechanism, when backup request is initiated, Final income size is directly determined whether rationally.If too early initiate, most of backup requests all will be invalid, makes instead System load is got higher, and increases delay;If initiated too late, and will lead to long-tail not cutting down.At the same time, in actual distribution In formula system, often there are following characteristics: first, differentiation, load and response time such as a time different server are simultaneously It is not identical;Second, mobilism, as the load of same server different time and response time be also in dynamic change.It is existing The configuration mode using unified preset parameter, cause the ultimate yield of backup request to be difficult to reach perfect condition.
Summary of the invention
It is an object of the present invention to provide a kind of method and apparatus for being used to determine whether to initiate backup request.
According to an aspect of the invention, there is provided a kind of be used to determine whether to initiate backup request at user equipment end Method, wherein this method comprises:
According to pre-defined rule, RTO numerical value is determined, wherein the RTO numerical value is as the new estimated response requested next time when Between, to be used to determine whether to initiate backup request;
Wherein, the pre-defined rule includes following at least any one:
If the request that the user equipment is sent to corresponding first network equipment, by success response, according to the request, institute is right The actual response time answered updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and the first RTTVAR numerical value, And the RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;
If the user equipment does not receive response time from request to corresponding first network equipment after sending is more than estimated ring Between seasonable, the RTO numerical value is determined according to the estimated response time.
According to another aspect of the present invention, a kind of user equipment for being used to determine whether to initiate backup request is additionally provided, Wherein, which includes:
For determining RTO numerical value according to pre-defined rule, wherein the RTO numerical value is as the new estimated sound requested next time Between seasonable, to be used to determine whether to initiate the device of backup request;
Wherein, the pre-defined rule includes following at least any one:
If the request that the user equipment is sent to corresponding first network equipment, by success response, according to the request, institute is right The actual response time answered updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and the first RTTVAR numerical value, And the RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;
If the user equipment does not receive response time from request to corresponding first network equipment after sending is more than estimated ring Between seasonable, the RTO numerical value is determined according to the estimated response time.
Compared with prior art, the present invention by by response from user equipment to corresponding the sent out request of first network equipment when Between as input, update RTT, dynamically calculate RTO as output, which can be used as requesting to receive response next time Expeced time, be more than the time, will select another network equipment initiate backup request, realize following the utility model has the advantages that 1) Mobilism calculates RTO numerical value, to also achieve adaptive backup request;2) system is realized to disappear in load number and long-tail The maximum return of subtract etc. improves system so that system can take into account load number, long-tail abatement and response time simultaneously Overall performance.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows a kind of of one aspect according to the present invention and is used to determine whether to initiate setting for the user equipment of backup request Standby schematic diagram;
Fig. 2 shows a kind of method flows for being used to determine whether to initiate backup request according to a further aspect of the present invention Figure.
The same or similar appended drawing reference represents the same or similar component in attached drawing.
Specific embodiment
Present invention is further described in detail with reference to the accompanying drawing.
Fig. 1 shows a kind of user equipment 1 for being used to determine whether to initiate backup request of one aspect according to the present invention, In, user equipment 1 includes for determining RTO numerical value according to pre-defined rule, to determine whether to initiate for the user equipment 1 The device (hereinafter referred to as " the first determining device 11 ") of backup request.Specifically.First determining device 11 is according to pre-defined rule, really Determine RTO numerical value, wherein the RTO numerical value is standby to be used to determine whether to initiate as the new estimated response time requested next time Part request, wherein the pre-defined rule include it is following any one of at least: if 1) user equipment is to corresponding first network equipment The request of transmission updates SRTT numerical value and RTTVAR numerical value by success response, according to actual response time corresponding to the request, To obtain the first SRTT numerical value and the first RTTVAR numerical value, and according to the first SRTT numerical value and the first RTTVAR numerical value Determine the RTO numerical value;If 2) user equipment does not receive the time of response after sending request to corresponding first network equipment More than the estimated response time, the RTO numerical value is determined according to the estimated response time.
Here, user equipment 1 refer to it is corresponding with server (such as first network equipment), can with server establish communicate Connection, provides program, the equipment etc. of local service, such as client, the user equipment for being equipped with client software for client.? In specific embodiment, user equipment 1, which can be any one, to pass through keyboard, touch tablet, touch screen or handwriting equipment with user Etc. modes carry out the electronic product of human-computer interaction, such as PC, mobile phone, smart phone, PDA, wearable device, palm PC PPC Or tablet computer etc..
Here, first network equipment, which refers in network, to provide the computer of certain services to other machines (such as client) System, such as the computer node in distributed system.In a particular embodiment, first network equipment includes but is not limited to such as network Host, single network server, multiple network server collection or set of computers based on cloud computing etc. are realized;Or by user Equipment is realized.Here, cloud is made of a large amount of hosts or network server for being based on cloud computing (Cloud Computing), wherein Cloud computing is one kind of distributed computing, a super virtual computer consisting of a loosely coupled set of computers.
Those skilled in the art will be understood that above-mentioned user equipment 1 and first network equipment are only for example, other are existing Or the user equipment or the network equipment being likely to occur from now on are such as applicable to the present invention, should also be included in the scope of the present invention with It is interior, and be incorporated herein by reference.
Here, user equipment and first network equipment include that one kind can be according to the instruction for being previously set or storing, certainly The dynamic electronic equipment for carrying out numerical value calculating and information processing, hardware includes but is not limited to microprocessor, specific integrated circuit (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc..
Specifically, the first determining device 11 determines RTO numerical value according to pre-defined rule, wherein under the RTO numerical value is used as The new estimated response time once requested, to be used to determine whether to initiate backup request, wherein the pre-defined rule includes following Any one of at least: if 1) request that the user equipment is sent to corresponding first network equipment is by success response, according to the request Corresponding actual response time updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and the first RTTVAR number Value, and the RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;If 2) user equipment The time for not receiving response after sending request to corresponding first network equipment is more than the estimated response time, according to the estimated response Time determines the RTO numerical value.Here, the success response includes that the user equipment receives the first network equipment base In the response that the request returns.Here, the RTO numerical value is used as the new estimated response requested by the user equipment next time Time, so as to estimate next time to first server send request after when receive response.
Here, it is of the invention for ease of understanding, it is primarily based on standard RFC2289 and SRTT and RTTVAR is described as follows:
1) SRTT: pass through smoothed out RTT (Round-Trip Time, round-trip delay) value, represent current RTT value;
2) smooth value of RTTVAR:mdev_max, can rise can drop, and represent the jitter conditions of connection, in client and clothes Connection between business device is all effective before disconnecting, wherein mdev_max is the maximum mdev in a upper RTT, is represented in last RTT The fluctuation situation of time delay, validity period are a RTT, and mdev (mean deviation) is the average deviation of RTT, for measuring The shake of RTT.
For example, if the response time that intended client termination receives service is 1ms, i.e., estimated to ring in a distributed system It is 1ms between seasonable, it is assumed that after the user equipment 1 as client sends request to corresponding first network equipment A for the first time, The response from first network equipment A, i.e. request of the user equipment 1 to corresponding first network equipment A transmission are received in 0.5ms By success response, then the first determining device 11 can be first according to the actual response time 0.5ms of the request (namely RTT=at this time SRTT numerical value and RTTVAR numerical value 0.5ms) are updated, to obtain the first SRTT numerical value and the first RTTVAR numerical value, such as obtains SRTT (1)=0.5, RTTVAR (1)=0.5/2=0.25;Then, the first determining device 11 is according to the first SRTT numerical value and described First RTTVAR numerical value determines RTO (Retransmission Timeout Retransmission timeout) numerical value, is such as obtained by following formula (1) To RTO:
RTO=SRTT+4RTTVAR (1)
Obtain RTO=0.5+4*0.25=1.5ms.
Herein, it should be noted that in a particular embodiment, the first determining device 11 can also be according to following formula (2) more New SRTT numerical value and RTTVAR numerical value, and calculate RTO numerical value:
For another example, it is assumed that after user equipment 1 sends request to corresponding first network equipment A for the first time, received in 1.5ms Response from first network equipment A then still illustrates that user sets although response time 1.5ms is greater than estimated response time 1ms Standby 1 request sent to corresponding first network equipment A is by success response, and then the first determining device 11 can be according to the reality of request Response time 1.5ms determines SRTT numerical value such as SRTT (1)=1.5ms, RTTVAR numerical value such as RTTVAR (1)=1.5/2= 0.75ms, and RTO=1.5+4*0.75=4.5ms is obtained according to above formula (1).
Also such as, example is connected, it is assumed that user equipment 1 has sent request to first network equipment A again, if sending request Afterwards, the response (i.e. current RTT=4ms) from first network equipment A is received in 4ms, because of current RTO=4.5ms, that is, is used The request again that family equipment 1 is sent to corresponding first network equipment A is by success response, then the first determining device 11 can be more than Formula (2) obtains SRTT '=(1-a) * SRTT+a*R '=(1-1/8) * 1.5+1/8*4=1.8125, RTTVAR '=(1-b) RTTVAR+b* ∣ SRTT-R ' ∣=(1-1/4) * 0.75+1/4* ∣ 1.5-4 ∣=1.1875, a=1/8, b=1/4, RTO '= SRTT '+4RTTVAR '=6.5625ms.
For another example, it is assumed that after user equipment 1 sends request to corresponding first network equipment A for the first time, in the estimated response of 1ms The response from first network equipment A is not received in time, then illustrates response timeout, then the first determining device 11 can be according to institute Stating the estimated response time determines RTO numerical value, will double to obtain RTO numerical value the estimated response time such as to get to RTO=2*1= 2ms。
Here, the present invention only using this estimated response time as input, obtains RTO numerical value, i.e., when response timeout The Expected Time Of Response requested next time is only influenced, but the RTO numerical value of acquisition is further improved without influence on request later Reasonability.
Those skilled in the art will be understood that above-mentioned pre-defined rule is only for example, other are existing or are likely to occur from now on Pre-defined rule is such as applicable to the present invention, should also be included within the scope of protection of the present invention, and is contained in by reference herein This.
Those skilled in the art will be understood that the update mode of above-mentioned update SRTT numerical value and update RTTVAR numerical value is only Citing, other update modes for updating SRTT numerical value and updating RTTVAR numerical value that are existing or being likely to occur from now on are for example applicable It in the present invention, should also be included within the scope of protection of the present invention, and be incorporated herein by reference.
Those skilled in the art will be understood that the mode of above-mentioned determining RTO numerical value is only for example, other are existing or from now on The mode for the determination RTO numerical value being likely to occur such as is applicable to the present invention, should also be included within the scope of protection of the present invention, and This is incorporated herein by reference.
(Fig. 1 is referred to) in one embodiment, if user equipment 1 is sent to the first network equipment request next time after The time for not receiving response is more than the RTO numerical value, wherein the user equipment 1 further includes for initiating to second network equipment The device (hereinafter referred to as " backup request device ", be not shown) of backup request.Specifically, if user equipment 1 is to first net Network equipment is sent request next time after not receive the time of response be more than the RTO numerical value, backup request device is to the second network Equipment initiates backup request.
Here, second network equipment is similar with first network equipment, also referring to can be to other machine (such as client in network End) computer system of certain services is provided, such as the computer node in distributed system.In a particular embodiment, the second net Network equipment includes but is not limited to such as network host, single network server, multiple network server collection or based on cloud computing Calculation machine set etc. is realized;Or it is realized by user equipment.Here, cloud is by a large amount of based on cloud computing (Cloud Computing) Host or network server are constituted, wherein cloud computing is one kind of distributed computing, by the computer set group of a group loose couplings At a super virtual computer.Those skilled in the art will be understood that above-mentioned second network equipment is only for example, other are existing The network equipment that is having or being likely to occur from now on is such as applicable to the present invention, should also be included within the scope of protection of the present invention, and It is incorporated herein by reference.
For example, it is assumed that the response time that intended client termination receives service is 1ms for above-mentioned distributed system, it is assumed that After user equipment 1 as client sends request to corresponding first network equipment A for the first time, receives and come from 0.5ms The request that the response of first network equipment A, i.e. user equipment 1 are sent to corresponding first network equipment A is by success response, and first The RTO numerical value that determining device 11 determines is 1.5ms, if user equipment 1 is sent out to first network equipment A after requesting for the first time again Primary request is sent, but user equipment 1 does not receive the response of first network equipment A within 1.5ms, then backup request device is true It orients the second network equipment B and initiates backup request.
Preferably, user equipment 1 further includes for using the RTO numerical value as described in the estimated response time update The device (hereinafter referred to as " updating device ", be not shown) of RTO numerical value.Specifically, updating device is using the RTO numerical value described in It is expected that the response time updates the RTO numerical value.
For example, connecting example, since user equipment 1 after requesting for the first time to first network equipment A, and set to first network Standby A has sent primary request, but user equipment 1 does not receive the response of first network equipment A within 1.5ms namely user sets The time for not receiving response after sending request next time to first network equipment A for 1 is more than the determining RTO of the first determining device 11 Numerical value 1.5ms, then updating device can the RTO numerical value as the estimated response time update the RTO numerical value, such as by RTO Numerical value doubles, i.e., RTO numerical value is updated to 2*1.5=3ms by current 1.5ms.
(Fig. 1 is referred to) in another embodiment, if user equipment 1 sends the request to the first network equipment Afterwards, multiple requests are had sent to the first network equipment in the given time, wherein if user equipment 1 is to first net Network equipment does not receive respective response within the estimated response time after sending multiple request, wherein the user equipment 1 is also Device (hereinafter referred to as " the second determining device ", be not shown) including determining the RTO numerical value according to the estimated response time.
Here, after user equipment 1 sends the request to the first network equipment, in the given time to described first The network equipment has sent multiple requests, refer to request that user equipment 1 is sent to corresponding first network equipment by after success response, Multiple requests continuously are had sent to first network equipment (such as in a RTO time) in the given time, alternatively, in the predetermined time Multiple requests inside are had sent to first network equipment 1 in a parallel fashion, can also be that multiple request is once successfully rung with preceding The request answered is parallel requests.
For example, the response time that intended client termination receives service is 1ms in a distributed system, i.e., estimated response Time is 1ms, at this time RTO=1ms, it is assumed that user equipment 1 to first network equipment A in the given time (such as in 1ms) it is continuous Request 1,2,3,4 is had sent, if the continuous time-out of request 1,2,3,4, namely request 1,2,3,4 would be in estimated response time 1ms Do not receive respective response, then the response time determines RTO numerical value to the second determining device on the estimation, will such as add the estimated response time Obtain RTO numerical value again to get RTO=2*1=2ms is arrived.
Here, the present invention is only in the case where being sent to the equal response timeout of multiple requests of consolidated network equipment in a short time Update a RTO numerical value, also will concurrent and response timeout request should be regarded as primary time-out, avoid RTO numerical value and be updated For maximum.
In a particular embodiment, those skilled in the art should determine, the first determining device 11 and the second determining device can be with It is independent module, is also possible to phase-polymerization and is located in same module.
Fig. 2 shows a kind of method flows for being used to determine whether to initiate backup request according to a further aspect of the present invention Figure.
Wherein, the method comprising the steps of S1.Specifically.In step sl, user equipment 1 determines RTO according to pre-defined rule Numerical value, wherein the RTO numerical value is asked as the new estimated response time requested next time with being used to determine whether to initiate backup It asks, wherein the pre-defined rule includes following at least any one: if 1) user equipment is sent to corresponding first network equipment Request by success response, SRTT numerical value and RTTVAR numerical value are updated according to actual response time corresponding to the request, to obtain The first SRTT numerical value and the first RTTVAR numerical value are obtained, and is determined according to the first SRTT numerical value and the first RTTVAR numerical value The RTO numerical value;If 2) user equipment is more than to the time for not receiving response after first network equipment sends request is corresponded to It is expected that the response time, determines the RTO numerical value according to the estimated response time.
Here, user equipment 1 refer to it is corresponding with server (such as first network equipment), can with server establish communicate Connection, provides program, the equipment etc. of local service, such as client, the user equipment for being equipped with client software for client.? In specific embodiment, user equipment 1, which can be any one, to pass through keyboard, touch tablet, touch screen or handwriting equipment with user Etc. modes carry out the electronic product of human-computer interaction, such as PC, mobile phone, smart phone, PDA, wearable device, palm PC PPC Or tablet computer etc..
Here, first network equipment, which refers in network, to provide the computer of certain services to other machines (such as client) System.In a particular embodiment such as the computer node in distributed system, first network equipment includes but is not limited to such as network Host, single network server, multiple network server collection or set of computers based on cloud computing etc. are realized;Or by user Equipment is realized.Here, cloud is made of a large amount of hosts or network server for being based on cloud computing (Cloud Computing), wherein Cloud computing is one kind of distributed computing, a super virtual computer consisting of a loosely coupled set of computers.
Those skilled in the art will be understood that above-mentioned user equipment 1 and first network equipment are only for example, other are existing Or the user equipment or the network equipment being likely to occur from now on are such as applicable to the present invention, should also be included in the scope of the present invention with It is interior, and be incorporated herein by reference.
Here, user equipment and first network equipment include that one kind can be according to the instruction for being previously set or storing, certainly The dynamic electronic equipment for carrying out numerical value calculating and information processing, hardware includes but is not limited to microprocessor, specific integrated circuit (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc..
Specifically, in step sl, user equipment 1 determines RTO numerical value according to pre-defined rule, wherein the RTO numerical value As the new estimated response time requested next time, to be used to determine whether to initiate backup request, wherein the pre-defined rule packet Include it is following any one of at least: if 1) request that the user equipment is sent to corresponding first network equipment is by success response, according to Actual response time corresponding to the request updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and first RTTVAR numerical value, and the RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;If 2) described User equipment does not receive the time of response more than the estimated response time, according to described after sending request to corresponding first network equipment It is expected that the response time determines the RTO numerical value.Here, the success response includes that the user equipment receives first net The response that network equipment is returned based on the request.
Here, it is of the invention for ease of understanding, it is primarily based on standard RFC2289 and SRTT and RTTVAR is described as follows:
1) SRTT: pass through smoothed out RTT (Round-Trip Time, round-trip delay) value, represent current RTT value;
2) smooth value of RTTVAR:mdev_max, can rise can drop, and represent the jitter conditions of connection, in client and clothes Connection between business device is all effective before disconnecting, wherein mdev_max is the maximum mdev in a upper RTT, is represented in last RTT The fluctuation situation of time delay, validity period are a RTT, and mdev (mean deviation) is the average deviation of RTT, for measuring The shake of RTT.
For example, if the response time that intended client termination receives service is 1ms, i.e., estimated to ring in a distributed system It is 1ms between seasonable, it is assumed that after the user equipment 1 as client sends request to corresponding first network equipment A for the first time, The response from first network equipment A, i.e. request of the user equipment 1 to corresponding first network equipment A transmission are received in 0.5ms By success response, then in step sl, user equipment 1 can first according to the actual response time 0.5ms of the request (namely at this time RTT=0.5ms SRTT numerical value and RTTVAR numerical value) are updated, to obtain the first SRTT numerical value and the first RTTVAR numerical value, is such as obtained SRTT (1)=0.5, RTTVAR (1)=0.5/2=0.25;Then, in step sl, user equipment 1 is according to the first SRTT Numerical value and the first RTTVAR numerical value determine RTO numerical value, such as obtain RTO by following formula (3):
RTO=SRTT+4RTTVAR (3)
Obtain RTO=0.5+4*0.25=1.5ms.
Herein, it should be noted that in a particular embodiment, in step sl, user equipment 1 can also be according to following formula (2) SRTT numerical value and RTTVAR numerical value are updated, and calculates RTO numerical value:
For another example, it is assumed that after user equipment 1 sends request to corresponding first network equipment A for the first time, received in 1.5ms Response from first network equipment A then still illustrates that user sets although response time 1.5ms is greater than estimated response time 1ms By success response, and then in step sl, user equipment 1 can be according to request for standby 1 request sent to corresponding first network equipment A Actual response time 1.5ms determine SRTT numerical value such as SRTT (1)=1.5ms, RTTVAR numerical value such as RTTVAR (1)=1.5/2 =0.75ms, and RTO=1.5+4*0.75=4.5ms is obtained according to above formula (3).
Also such as, example is connected, it is assumed that user equipment 1 has sent request to first network equipment A again, if sending request Afterwards, the response (i.e. current RTT=4ms) from first network equipment A is received in 4ms, because of current RTO=4.5ms, that is, is used The request again that family equipment 1 is sent to corresponding first network equipment A is by success response, then in step sl, user equipment 1 can root According to above formula (4), obtain SRTT '=(1-a) * SRTT+a*R '=(1-1/8) * 1.5+1/8*4=1.8125, RTTVAR '= (1-b) RTTVAR+b* ∣ SRTT-R ' ∣=(1-1/4) * 0.75+1/4* ∣ 1.5-4 ∣=1.1875, a=1/8, b=1/4, RTO ' =SRTT '+4RTTVAR '=6.5625ms.
For another example, it is assumed that after user equipment 1 sends request to corresponding first network equipment A for the first time, in the estimated response of 1ms The response from first network equipment A is not received in time, then illustrates response timeout, then in step sl, user equipment 1 can RTO numerical value is determined according to the estimated response time, such as the estimated response time will double to obtain RTO numerical value to get RTO=2* is arrived 1=2ms.
Here, the present invention only using this estimated response time as input, obtains RTO numerical value, i.e., when response timeout The Expected Time Of Response requested next time is only influenced, but the RTO numerical value of acquisition is further improved without influence on request later Reasonability.
Those skilled in the art will be understood that above-mentioned pre-defined rule is only for example, other are existing or are likely to occur from now on Pre-defined rule is such as applicable to the present invention, should also be included within the scope of protection of the present invention, and is contained in by reference herein This.
Those skilled in the art will be understood that the update mode of above-mentioned update SRTT numerical value and update RTTVAR numerical value is only Citing, other update modes for updating SRTT numerical value and updating RTTVAR numerical value that are existing or being likely to occur from now on are for example applicable It in the present invention, should also be included within the scope of protection of the present invention, and be incorporated herein by reference.
Those skilled in the art will be understood that the mode of above-mentioned determining RTO numerical value is only for example, other are existing or from now on The mode for the determination RTO numerical value being likely to occur such as is applicable to the present invention, should also be included within the scope of protection of the present invention, and This is incorporated herein by reference.
(Fig. 2 is referred to) in one embodiment, if user equipment 1 is sent to the first network equipment request next time after The time for not receiving response is more than the RTO numerical value, wherein the user equipment 1 further includes step S2 (not shown).Specifically, If user equipment 1 does not receive response time from request next time to the first network equipment after sending is more than the RTO numerical value, In step s 2, user equipment 1 initiates backup request to second network equipment.
Here, second network equipment is similar with first network equipment, also referring to can be to other machine (such as client in network End) computer system of certain services is provided, such as the computer node in distributed system.In a particular embodiment, the second net Network equipment includes but is not limited to such as network host, single network server, multiple network server collection or based on cloud computing Calculation machine set etc. is realized;Or it is realized by user equipment.Here, cloud is by a large amount of based on cloud computing (Cloud Computing) Host or network server are constituted, wherein cloud computing is one kind of distributed computing, by the computer set group of a group loose couplings At a super virtual computer.Those skilled in the art will be understood that above-mentioned second network equipment is only for example, other are existing The network equipment that is having or being likely to occur from now on is such as applicable to the present invention, should also be included within the scope of protection of the present invention, and It is incorporated herein by reference.
For example, it is assumed that the response time that intended client termination receives service is 1ms for above-mentioned distributed system, it is assumed that After user equipment 1 as client sends request to corresponding first network equipment A for the first time, receives and come from 0.5ms The request that the response of first network equipment A, i.e. user equipment 1 are sent to corresponding first network equipment A is by success response, and in step In rapid S1, the RTO numerical value that user equipment 1 determines is 1.5ms, if user equipment 1 is set to first network after requesting for the first time again Standby A has sent primary request, but user equipment 1 does not receive the response of first network equipment A within 1.5ms, then in step S2 In, user equipment 1, which is determined to the second network equipment B, initiates backup request.
Preferably, user equipment 1 further includes step S3 (in step s3, user equipment 1 is not shown).Specifically, in step In rapid S3, user equipment 1 updates the RTO numerical value using the RTO numerical value as the estimated response time.
For example, connecting example, since user equipment 1 after requesting for the first time to first network equipment A, and set to first network Standby A has sent primary request, but user equipment 1 does not receive the response of first network equipment A within 1.5ms namely user sets The time for not receiving response after sending request next time to first network equipment A for 1 is more than that in step sl, user equipment 1 is true Fixed RTO numerical value 1.5ms, then in step s3, user equipment 1 can the RTO numerical value updated as the estimated response time The RTO numerical value, such as doubles RTO numerical value, i.e., RTO numerical value is updated to 2*1.5=3ms by current 1.5ms.
(Fig. 2 is referred to) in another embodiment, if user equipment 1 sends the request to the first network equipment Afterwards, multiple requests are had sent to the first network equipment in the given time, wherein if user equipment 1 is to first net Network equipment does not receive respective response within the estimated response time after sending multiple request, wherein the user equipment 1 is also Including step S4 (not shown).
Here, after user equipment 1 sends the request to the first network equipment, in the given time to described first The network equipment has sent multiple requests, refer to request that user equipment 1 is sent to corresponding first network equipment by after success response, Multiple requests continuously are had sent to first network equipment (such as in a RTO time) in the given time, alternatively, in the predetermined time Multiple requests inside are had sent to first network equipment 1 in a parallel fashion, can also be that multiple request is once successfully rung with preceding The request answered is parallel requests.
For example, the response time that intended client termination receives service is 1ms in a distributed system, i.e., estimated response Time is 1ms, at this time RTO=1ms, it is assumed that user equipment 1 to first network equipment A in the given time (such as in 1ms) it is continuous Request 1,2,3,4 is had sent, if the continuous time-out of request 1,2,3,4, namely request 1,2,3,4 would be in estimated response time 1ms Do not receive respective response, then in step s 4, the response time determines RTO numerical value to user equipment 1 on the estimation, estimated will such as ring It doubles to obtain RTO numerical value between seasonable to get RTO=2*1=2ms is arrived.
Here, the present invention is only in the case where being sent to the equal response timeout of multiple requests of consolidated network equipment in a short time Update a RTO numerical value, also will concurrent and response timeout request should be regarded as primary time-out, avoid RTO numerical value and be updated For maximum.
It should be noted that the present invention can be carried out in the assembly of software and/or software and hardware, for example, can adopt With specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment In, software program of the invention can be executed to implement the above steps or functions by processor.Similarly, of the invention Software program (including relevant data structure) can be stored in computer readable recording medium, for example, RAM memory, Magnetic or optical driver or floppy disc and similar devices.In addition, some of the steps or functions of the present invention may be implemented in hardware, example Such as, as the circuit cooperated with processor thereby executing each step or function.
In addition, a part of the invention can be applied to computer program product, such as computer program instructions, when its quilt When computer executes, by the operation of the computer, it can call or provide according to the method for the present invention and/or technical solution. And the program instruction of method of the invention is called, it is possibly stored in fixed or moveable recording medium, and/or pass through Broadcast or the data flow in other signal-bearing mediums and transmitted, and/or be stored according to described program instruction operation In the working storage of computer equipment.Here, according to one embodiment of present invention including a device, which includes using Memory in storage computer program instructions and processor for executing program instructions, wherein when the computer program refers to When enabling by processor execution, method and/or skill of the device operation based on aforementioned multiple embodiments according to the present invention are triggered Art scheme.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.That states in device claim is multiple Unit or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to table Show title, and does not indicate any particular order.

Claims (8)

1. a kind of method for being used to determine whether to initiate backup request at user equipment end, wherein this method comprises:
According to pre-defined rule, determine RTO numerical value, wherein the RTO numerical value as the new estimated response time requested next time, To be used to determine whether to initiate backup request;
Wherein, the pre-defined rule includes:
If the request that the user equipment is sent to corresponding first network equipment is by success response, according to corresponding to the request Actual response time updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and the first RTTVAR numerical value, and root The RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value, wherein if the user equipment is to institute It states after first network equipment sends request next time and does not receive the time of response more than the RTO numerical value, wherein this method is also wrapped It includes: initiating backup request to second network equipment;
If the user equipment does not receive response time from request to corresponding first network equipment after sending is more than estimated response Between, the RTO numerical value is determined according to the estimated response time.
2. according to the method described in claim 1, wherein, the success response includes that the user equipment receives described first The response that the network equipment is returned based on the request.
3. according to the method described in claim 1, wherein, this method further include:
Using the RTO numerical value as the estimated response time, the RTO numerical value is updated.
4. according to the method in any one of claims 1 to 3, wherein if the user equipment is set to the first network After preparation send the request, multiple requests are had sent to the first network equipment in the given time, wherein if the user Equipment does not receive respective response within the estimated response time after sending multiple request to the first network equipment, In, this method further include:
According to the estimated response time, the RTO numerical value is determined.
5. a kind of user equipment for being used to determine whether to initiate backup request, wherein the user equipment includes:
For determining RTO numerical value according to pre-defined rule, wherein the RTO numerical value is as the new estimated response requested next time when Between, to be used to determine whether to initiate the device of backup request;
Wherein, the pre-defined rule includes:
If the request that the user equipment is sent to corresponding first network equipment is by success response, according to corresponding to the request Actual response time updates SRTT numerical value and RTTVAR numerical value, to obtain the first SRTT numerical value and the first RTTVAR numerical value, and root The RTO numerical value is determined according to the first SRTT numerical value and the first RTTVAR numerical value;
If the user equipment does not receive response time from request to corresponding first network equipment after sending is more than estimated response Between, the RTO numerical value is determined according to the estimated response time;
Wherein, if the user equipment does not receive response time from request next time to the first network equipment after sending is more than The RTO numerical value, wherein the user equipment further include:
For initiating the device of backup request to second network equipment.
6. user equipment according to claim 5, wherein the success response includes described in the user equipment receives The response that first network equipment is returned based on the request.
7. user equipment according to claim 5, wherein the user equipment further include:
For updating the device of the RTO numerical value using the RTO numerical value as the estimated response time.
8. user equipment according to any one of claims 5 to 7, wherein if the user equipment is to first net After network equipment sends the request, multiple requests are had sent to the first network equipment in the given time, wherein if described User equipment does not receive corresponding sound within the estimated response time after sending multiple request to the first network equipment It answers, wherein the user equipment further include:
For determining the device of the RTO numerical value according to the estimated response time.
CN201710005618.0A 2017-01-04 2017-01-04 A kind of method and apparatus for being used to determine whether to initiate backup request Active CN106790634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710005618.0A CN106790634B (en) 2017-01-04 2017-01-04 A kind of method and apparatus for being used to determine whether to initiate backup request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710005618.0A CN106790634B (en) 2017-01-04 2017-01-04 A kind of method and apparatus for being used to determine whether to initiate backup request

Publications (2)

Publication Number Publication Date
CN106790634A CN106790634A (en) 2017-05-31
CN106790634B true CN106790634B (en) 2019-10-11

Family

ID=58950148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710005618.0A Active CN106790634B (en) 2017-01-04 2017-01-04 A kind of method and apparatus for being used to determine whether to initiate backup request

Country Status (1)

Country Link
CN (1) CN106790634B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908438A (en) * 2017-11-15 2018-04-13 山东浪潮通软信息科技有限公司 A kind of method and device for improving data interaction stability

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1370361A (en) * 1999-08-17 2002-09-18 艾利森电话股份有限公司 Method and device for determining time-parameters
CN103401665A (en) * 2013-06-28 2013-11-20 国家超级计算深圳中心(深圳云计算中心) Method and device for optimizing retransmission timeout timer in cluster storage system
CN103428273A (en) * 2013-07-18 2013-12-04 北京百度网讯科技有限公司 Method and device for responsive inquiry in asynchronous interaction
CN105933242A (en) * 2016-04-12 2016-09-07 北京大学深圳研究生院 Method and system for improving TCP response speed of data center

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1370361A (en) * 1999-08-17 2002-09-18 艾利森电话股份有限公司 Method and device for determining time-parameters
CN103401665A (en) * 2013-06-28 2013-11-20 国家超级计算深圳中心(深圳云计算中心) Method and device for optimizing retransmission timeout timer in cluster storage system
CN103428273A (en) * 2013-07-18 2013-12-04 北京百度网讯科技有限公司 Method and device for responsive inquiry in asynchronous interaction
CN105933242A (en) * 2016-04-12 2016-09-07 北京大学深圳研究生院 Method and system for improving TCP response speed of data center

Also Published As

Publication number Publication date
CN106790634A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN107948324B (en) Request Transmission system, method, apparatus and storage medium
JP7420972B2 (en) Methods, systems and apparatus for storing blockchain-based data
CN109145020A (en) Information query method, from server, client and computer readable storage medium
JP2009515277A (en) Learning device for resource constrained devices
US20090164987A1 (en) System and method for updating a dual layer browser
CN107070709A (en) A kind of NFV implementation methods based on bottom NUMA aware
WO2017054540A1 (en) Data processing method and device, server, and controller
KR20160056944A (en) Acceleration based on cached flows
CN109547524A (en) User behavior storage method, device, equipment and storage medium based on Physical Network
CN108509792A (en) A kind of injection loophole detection method and device
CN109189748A (en) A kind of buffer consistency processing method and nfs server
CN106790634B (en) A kind of method and apparatus for being used to determine whether to initiate backup request
EP3160087B1 (en) Measuring frame loss
US20110208854A1 (en) Dynamic traffic control using feedback loop
CN110113495A (en) Long-range control method, device, electronic equipment and the system of APP
CN108366102A (en) A kind of service discovery method, device and electronic equipment based on Consul
CN109144998A (en) Node data shows method, apparatus, storage medium and electronic equipment
CN109756464A (en) A kind of communication means and server, client
CN110347477B (en) Service self-adaptive deployment method and device in cloud environment
CN110535959A (en) A kind of method, apparatus and computer readable storage medium for transmitting data
CN110233843A (en) A kind of processing method and processing device of user's request
US8751564B2 (en) Reducing latency for served applications by anticipatory preprocessing
CN108829316A (en) Data capture method, device, electronic equipment and readable storage medium storing program for executing
CN104601655B (en) The control method and device of smart jack
US9536199B1 (en) Recommendations based on device usage

Legal Events

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