High-level REST client automatic connection repair


#1

We currently use the JEST 5.2 client. We recently experienced a networking issue where, after recovery, an invalid HTTP route was held by the client connection manager instead of finding a new valid route to the ES cluster. When analyzing our connection settings, we were using default settings:

  • maxConnectionPool (default: 2/route, max 20)
  • discoveryEnabled (default: false)
  • maxConnectionIdleTime (default: 0 - disabled)

While we think we could adjust these settings to get the proper connection repair actions after a network outage, we are taking this opportunity to evaluate the REST client instead as we have heard that its reliability is higher in situations like this.

Will the high-level REST client automatically attempt to repair its connection with the ES cluster if the connection is lost? This blog posts speaks to "persistent connections" for the low level client, and I was hoping to clarify if the high level client also has "persistent connections" and what "persistent connections" actually means.

Thanks!


(Luca Cavanna) #2

Hi,
the high-level client uses the low-level client to perform connections and adds request/response marshalling/unmarshalling support on top of it. So whatever the low-level client supports is also supported by the high-level client. Persistent connections in the context of our language clients means that we want to avoid opening a new connection for each request, but rather have a connection pool and reuse the same connections.

Cheers
Luca


#3

Thanks for the response! Good information. I was also wondering if you could answer this part of the question, too:

Will the high-level REST client automatically attempt to repair its connection with the ES cluster if the connection is lost?

Thanks!


(Luca Cavanna) #4

The low-level client would mark the connection failed, and retry it with a back-off mechanism. If retrying is what you mean by "repairing", then yes.


#5

Yes, great -- thanks for the information!


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.