user1491636 user1491636 - 1 year ago 85
HTTP Question

Apache HttpRoute - defining a route

I'm using the Apache

to create a pool of connections to difference services on my network. The documentation says that Connections are pooled on a per route basis. It is not entirely clear to me what is meant by a route.

I found another similar question, but the answer is still a little unclear. If we have two applications on the same server, each with multiple REST api's, is each API considered a distinct route?

For example, if we have the following:


Would each of the above be considered a single route?

Answer Source

PoolingHttpClientConnectionManager implements ConnPoolControl<HttpRoute>, so we can presume that the routes we are talking about are HttpRoute's.

In the documentation, it's written that HttpRoute is

The route for a request.

One of the constructor of HttpRoute is of the form :

HttpRoute(HttpHost target, InetAddress local, HttpHost[] proxies, boolean secure, RouteInfo.TunnelType tunnelled, RouteInfo.LayerType layered)

Looking at RouteInfo.LayerType, we see :

The layering type of a route. Plain routes are established by connecting or tunnelling. Layered routes are established by layering a protocol such as TLS/SSL over an existing connection. Protocols can only be layered over a tunnel to the target, or or over a direct connection without proxies.

In conclusion, in this context, the term route should be understood as a network route and not as a mapping from url to controllers as defined by the tag "routes" of your question.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download