• No results found

Request-response with infinite retry for Request Program

Chapter 3 Management

4.11 MOP protocol primitives

4.11.5 Request-response with infinite retry for Request Program

This procedure performs a request-response exchange with unlimited retries similar to the

one shown above for DLI.MustTransact. The one shown here is intended for use with the Request Program message. Instead of retrying at a fixed rate, the retries are done in short bursts; within a burst, retries are spaced by the Circuit characteristic Retransmit Timer. If the

protocol version number to be used is not known, then the burst consists of a number ofV4 mes-

sages first, followed by V3 messages. This ensures that the Requester will not unintentionally

fall back to V3 protocol if a message is lost or the server is slow in responding. As with the

other request/response exchanges, an implementation may start with V3 and try V4 next if it has reason to expect V3 to be likely to be the right version. As an optimization, implementa-

tions may try both versions simultaneously.

The bursts in turn are spaced according to a “Backoff” timer, which increases as the number

of retries increases. To help reduce the problem of many clients transmitting requests in lock-

step, the actual delay between bursts has a “random jitter” applied to it, which varies the delay by ± 25%from the backoff value. The random number generator used tocontrol sending of pe-

riodic SysID messages can be used for this purpose.

The procedure returns only on successful completion of the exchange.

Note:

Since the retransmissions within the burst are separated by Retransmit Timer(4

seconds by default) and the initial value of the backoff timer is equal to that, each node requesting load service can contribute up to 0.25 packets/second of

load on the load server. Under certain conditions, such as restoration of power to a significant size LAN, the number of nodes requesting load service may be substantial. Therefore it is very important for load servers to process Request Program messages efficiently.

In large networks, there typically will be a number of load servers, each of

which is responsible for loading a subset of all the load clients on the LAN. This will help performance when there are many requests, but only if the servers can dismiss requests from clients that they are not set up to load in a very short time. Therefore, implementations should be designed to be able to dismiss re-

quests within a few milliseconds.

PROCEDURE DLI.BackoffTransact (op: POINTER TO Operation; smsg: POINTER TO Buffer; VAR rmsg: POINTER TO Buffer);

VAR backofftime, tries: INTEGER; tmo: Time;

BEGIN

backofftime := op^.CircPtr^.RetransmitTimer;

(* Initialize backoff *) LOOP

IF op^.Version = Unknown (* If we don’t know the protocol version yet *) THEN

(* If we don’t know the version, try a burst of V4, then a burst of V3 *) FOR tries := 1 TO BurstSize (* Do a burst *)

TRY

DLI.ReqResp (op, smsg, rmsg, op^.CircPtr^.RetransmitTimer, V4); RETURN (* Return to caller *)

EXCEPT

| Timeout: (* Keep going if no answer received *) END

END;

FOR tries := 1 TO BurstSize (* Do a burst *) IF tries = BurstSize

THEN

tmo := backofftime * (0.75 + 0.5 * Random ( ) )

(* On last try of a burst, wait the backoff time *) ELSE

tmo := op^.CircPtr^.RetransmitTimer END;

4.11.6: Enable and disable SAP address for XID/TEST requester

85

DLI.ReqResp (op, smsg, rmsg, tmo, V3); RETURN (* Return to caller *) EXCEPT

| Timeout: (* Keep going if no answer received *) END

END ELSE

FOR tries := 1 TO BurstSize (* Do a burst *) IF tries = BurstSize

THEN

tmo := backofftime * (0.75 + 0.5 * Random ( ) )

(* On last try of a burst, wait the backoff time *) ELSE

tmo := op^.CircPtr^.RetransmitTimer END;

TRY

DLI.ReqResp (op, smsg, rmsg, tmo, op^.Version); RETURN (* If it worked, return to caller *) EXCEPT

| Timeout: (* Keep going if no answer received *) END

END END;

backofftime := MIN (backofftime * 2, MaxBackoff) END

END DLI.BackoffTransact;