3.1.5.4 Spike Watch Mechanism

The following diagram illustrates the client logic for the evaluation and handling of spikes.

Client spike evaluation and processing

Figure 5: Client spike evaluation and processing

During initialization, the client sets the HoldCount element to zero.

Upon receiving a response, the client calculates the offset from the server (peer.offset) using the data contained in the response as defined in [RFC1305] section 3.4.4. If the absolute value of the calculated offset is less than the value of the LargePhaseOffset element, the sample is accepted and processing continues as is indicated by the [Sample Accepted] transition in the preceding diagram.

If the absolute value of the calculated offset is equal to or larger than the value of the LargePhaseOffset element and the client is not already in the hold state, the client enters a hold state as indicated by the [Spike Detected] transition. In this transition, the value of HoldCount is set to one and the sample is discarded.

If the absolute value of the calculated offset is equal to or larger than the value of the LargePhaseOffset element and the client is already in the hold state, the client remains in the hold state as indicated by the [Hold] transition. In this transition, the value of the HoldCount element is incremented by one and the sample is discarded.

The client exits the hold state when one of the following three conditions has been met.

  1. The value of the HoldCount element is equal to or greater than the value of the HoldPeriod element.

  2. The amount of time that has elapsed since the first spike was received is equal to or greater than the value of the SpikeWatchPeriod element.

  3. A sample is received and the absolute value of the calculated offset of that sample is less than the value of the LargePhaseOffset element.

Upon exiting the hold state, the HoldCount is set to zero, the sample is accepted, and processing continues as indicated by the [Spike Resolved] transition.

Show: