Module sbetter_meter

Registers the process with and updates the sbetter_server with approximate queue sojourn times for use with the sbetter load balancer.

Behaviours: sbroker_meter.

See also: sbetter, sbetter_server.

Description

Registers the process with and updates the sbetter_server with approximate queue sojourn times for use with the sbetter load balancer.

sbetter_meter can be used as the sbroker_meter in a sbroker or a sregulator. Its argument is of the form:
  {AskUpper :: non_neg_integer(), AskRUpper :: non_neg_integer(),
   Update :: pos_integer()}.

AskUpper is the maximum ask sojourn time and AskRUpper is the maximum ask_r sojourn time that will be updated to the sbetter_server for use with sbetter. If a match doesn't occur on the sbroker or sregulator the approximate sojourn time will increase unbounded for one of the two queues. Limiting this value prevents the situation where one process becomes stuck as the "worst" option because it hasn't matched for the longest when the processes' queues would be equivalently "bad".

For example if using the sbroker_timeout_queue with timeout time of 5000, then all requests are dropped after 5000 and so become approximately equivalent once sojourn time is 5000.

Update is the update interval in milli_seconds when the process is idle.

Generated by EDoc, Sep 29 2016, 17:17:28.