Bolt.Sips v2.0.5 Bolt.Sips.LoadBalancer View Source
a simple load balancer used for selecting a server address from a map. The address is selected based on how many hits has; least reused url.
Link to this section Summary
Functions
sort by total number of hits and return the least reused url
Link to this section Functions
sort by total number of hits and return the least reused url
## Examples
iex> least_reused_url(%{"url1" => 10, "url2" => 5})
{:ok, "url2"}
iex> least_reused_url(%{})
{:error, :not_found}