portunus_affinity_metric (portunus v0.8.0)

View Source

A dynamic strategy: this node bids the value of a local metric. Args is a fun(() -> integer()) read on each node, for example spare capacity, so the least-loaded node wins. The bid is a snapshot taken at contention time, not a continuous signal.

Summary

Functions

kind()

-spec kind() -> dynamic.

score(Key, Members, MetricFun)

-spec score(term(), [node()], fun(() -> integer())) -> integer().