Behaviours: sbroker_meter.
Sets an alarm when the regulator's valve is slow to get a match for an interval.
sregulator_underload_meter
can be used in as a sbroker_meter
in a
sregulator
. It will set a SASL alarm_handler
alarm when the regulator's
valve is slow to get a match for an interval and clear it once the valve
gets matches fast for an interval. Its argument, spec()
, is of the form:
#{alarm => Alarm :: any(), % default: {underload, self()} target => Target :: integer(), % default: 100 interval => Interval :: pos_integer()}. % default: 1000
Alarm
is the alarm_handler
alarm that will be set/cleared by the meter
(defaults to {underload, self()}
). Target
is the target relative time for
the valve to get a match (defaults to 100
). Interval
is the interval in
milliseconds (defaults to 1000
) that the valve must be above the target for
the alarm to be set and below the target for the alarm to be cleared. The
description of the alarm is {valve_slow, self()}
.
sregulator
because a sregulator_valve
will remain open when processes that should be available are not sending
requests and can not do anything to correct this. Whereas a sbroker
can
not distinguish between one queue receiving too many requests or the other
too few. In either situation the congested sbroker_queue
would drop
requests to correct the imbalance, causing a congestion alarm to be cleared
very quickly.Generated by EDoc