New

The executive guide to generative AI

Read more

The Connection Pool

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

The Connection Pool

edit

The connection pool is an object inside the client that is responsible for maintaining the current list of nodes. Theoretically, nodes are either dead or alive.

However, in the real world, things are never so clear. Nodes are sometimes in a gray-zone of "probably dead but not confirmed", "timed-out but unclear why" or "recently dead but now alive".

The connection pool’s job is to manage this set of unruly connections and try to provide the best behavior to the client. There are currently two connection pool implementations:

  • staticConnectionPool: the user provides a static list of hosts and the connection pool simply tries to use these connections as required
  • sniffingConnectionPool: the user provides a seed list of hosts, which the client uses to sniff the rest of the cluster using the Cluster State API
Was this helpful?
Feedback