- SYNOPSIS
- DESCRIPTION
- CONFIGURATION
  - `nodes`
  - See also
- METHODS
  - `next_cxn()`
  - `schedule_check()`

# SYNOPSIS

        $e = Elasticsearch->new(
            cxn_pool => 'Static'     # default
            nodes    => [
                'search1:9200',
                'search2:9200'
            ],
        );

# DESCRIPTION

The Static connection pool, which is the default, should be used when you don't have direct access to the Elasticsearch cluster, eg when you are accessing the cluster through a proxy. It round-robins through the nodes that you specified, and pings each node before it is used for the first time, to ensure that it is responding.

If any node fails, then all nodes are pinged before the next request to ensure that they are still alive and responding. Failed nodes will be pinged regularly to check if they have recovered.

This class does Elasticsearch::Role::CxnPool.

# CONFIGURATION

## `nodes`

The list of nodes to use to serve requests. Can accept a single node, multiple nodes, and defaults to `localhost:9200` if no `nodes` are specified. See "node" in Elasticsearch::Role::Cxn::HTTP for details of the node specification.

## See also

- "request_timeout" in Elasticsearch::Role::Cxn

- "ping_timeout" in Elasticsearch::Role::Cxn

- "dead_timeout" in Elasticsearch::Role::Cxn

- "max_dead_timeout" in Elasticsearch::Role::Cxn

# METHODS

## `next_cxn()`

        $cxn = $cxn_pool->next_cxn

Returns the next available live node (in round robin fashion), or throws a `NoNodes` error if no nodes respond to ping requests.

## `schedule_check()`

        $cxn_pool->schedule_check

Forces a ping on all live nodes before their next use, to check that they are still alive.