Next: Matching Criteria Up: How Throttling Works Previous: Definition of Terms

Timing of Throttling

SLAC Throttle Timing:

Here is an example of how timing with the SLAC filter works, assuming that (a) CMLOG has been built with the threaded version of throttling, or (b) CMLOG has been built with the non-threaded version of throttling and the client application is calling checkThrottleStatus() at least once a second. Assume that we have already initialized the filter, and that the filter contains a single throttle that has a limit of 2 messages per 10 seconds.

0:00 message sent to cmlog server, passes through unfiltered
0:05 message sent to cmlog server, passes through unfiltered
0:11 message sent to cmlog server, passes through unfiltered
0:15 message throttled
0:15 "throttle has started" message sent. throttle activated.
0:18 message throttled
0:25 summary: "2 msgs throttled in last 10 seconds" message sent
0:35 "throttle has ended" message sent. throttle deactivated.
0:36 message sent to cmlog server, passes through unfiltered
...

The SLAC filter notes the times of incoming messages that are not filtered. It first sees a message at 0:00, and then at 0:05. If another matching message appears at or before 0:10, the throttling begins. But, since the next message does not arrive until 0:11, the throttling does not begin. At 0:15, another matching messages is seen by the throttle. This time, the throttle notices that in the 10 seconds prior to the arrival to the message arriving at 0:15, messages were sent at 0:05, 0:11, and 0:15. Since this exceeds the limit for the specified interval of 10 seconds, the throttle becomes active at 0:15. A message noting that the throttle has began is sent to CMLOG.

Once a throttle is active, incoming messages are filtered until the throttle is deactivated. A message gets filtered at 0:18. At 0:25, 10 seconds after throttling began, a status message is output to CMLOG. For the next 10 seconds following the output of this message, the filter will "listen" for any other matching messages. If no messages are seen within a single fixed interval cycle of time, the throttle is deactivated and a "throttle ends" message is sent to CMLOG.

Once the throttle ends, the behavior is the same as of that at time 0:00. The filter tracks the timing of incoming messages and starts and ends throttles accordingly.



James Silva
2002-09-23