Module sregulator_underload_meter

Sets a SASL alarm_handler alarm when the regulator's valve is slow to get match for an interval.

Behaviours: sbroker_meter.

Description

Sets a SASL alarm_handler alarm when the regulator's valve is slow to get match for an interval. Once the valve becomes fast for an interval the alarm is cleared.

sregulator_underload_meter can be used in a sregulator. Its argument is of the form:
  {Target :: integer(), Interval :: pos_integer(), AlarmId :: any()}

Target is the target relative time of the valve in milliseconds. The meter will set the alarm AlarmId in alarm_handler if the relative time of the valve is above the target for Interval milliseconds. Once set if the relative time is below Target for Interval milliseconds the alarm is cleared. The description of the alarm is {valve_slow, Pid} where Pid is the pid() of the process.

This meter is only intended for a 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, Sep 29 2016, 17:17:28.