Rexy v0.1.0 ReverseProxy.LoadBalancer View Source

Our Load Balancer. It rotates the servers from which we get a response.

We start the GenServer with the config file filled with hosts and upstreams.

Link to this section Summary

Functions

The server callback for the select function. It rotates the servers every time we hit them with a request

Initializes the gen server with all the upstreams

The public API to select our next server to hit

Link to this section Functions

Link to this function handle_call(msg, from, state) View Source

The server callback for the select function. It rotates the servers every time we hit them with a request.

Initializes the gen server with all the upstreams.

The public API to select our next server to hit.

It just takes a hots that we need to hit. Exapmle: ReverseProxy.LoadBalancer.select(load.com)