-
Notifications
You must be signed in to change notification settings - Fork 24
Terminology
Representations a network element being connected to. This could be represented by an IP address or other ID.
Source of host membership. Actions are Add and Remove. The ServerSource acts as the input to a ServerList implementation so it can know of the existing hosts.
Filter hosts from the ServerSource so that they are never considered by the load balancer. Examples include zone or region aware filters
Connection context for a host. The context tracks load balancer internal state for the Host which also includes a reference to the Client implementation
Specify transport client implementation for a Host.
Source of ‘active’ hosts. Each subscription to ServerList will emit a single immutable list of hosts. This list will likely be cached and frequently updated based on membership changes and performance (i.e. weight) recalculations.
The load balancer implements the actual load balancing strategy on top of the List returned by the ServerList.
Factory to construct a Client from a Host. This process may include async opening of the connection and therefore returns an Observable that will either emit the successful client connection or an error if failed.
Representation of an operation on a Client which ‘translates’ the Client via a request to a response.
Add(Server), Remove(Server)
Metrics associated with a single Host
+1 cursor select element from list
- Array of weights [1,3,4,7] for server (a, b, c, d) => weighted array [1,4,8,15].
- Either round robin and increment bin
- Random number up to sum of weight (Random.nextInt(15)), find first bin that is > number