Class HostPool

java.lang.Object
org.wildfly.httpclient.common.HostPool

public class HostPool extends Object
A host pool is defined as one or more hosts that are are serving the same back end applications.

For hosts to be in the same host pool it must be possible to make an invocation against any host interchangeably. In general the connection pool will only use a single host at a time, however if the connection fails it will attempt to use other hosts in the pool.

In a lot of cases this will only contain a single host, however if there are multiple load balancer hosts that service the same underlying application then this class allows for invocations to be directed to either if one falls over.

This class is also DNS load balancing aware. If there are multiple IP's for a given URL the different URL's will be added to the rotation.

This host pool will attempt to simply use a single address, if it is notified of failure on that address it will instead select a different URI. If there are multiple addresses per URI then the next time the URI is selected it will attempt to use a new address.

Author:
Stuart Douglas
  • Constructor Details

    • HostPool

      public HostPool(URI uri)
  • Method Details