The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel='stylesheet' href='https://metacpan.org/_asset/288683e3285b02987a848283f0f92207' type='text/css'>
<script type='text/javascript' src='https://metacpan.org/_asset/12b19d083bf773523c065d4d729f0327'></script>
</head>
<body>
<div class="pod">


<ul id="index">
  <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="#CONFIGURATION">CONFIGURATION</a>
    <ul>
      <li><a href="#nodes"><code>nodes</code></a></li>
      <li><a href="#See-also">See also</a></li>
    </ul>
  </li>
  <li><a href="#METHODS">METHODS</a>
    <ul>
      <li><a href="#next_cxn-"><code>next_cxn()</code></a></li>
      <li><a href="#schedule_check-"><code>schedule_check()</code></a></li>
    </ul>
  </li>
</ul>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false">    $e = Elasticsearch-&gt;new(
        cxn_pool =&gt; &#39;Static&#39;     # default
        nodes    =&gt; [
            &#39;search1:9200&#39;,
            &#39;search2:9200&#39;
        ],
    );</pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>The <a href="./Elasticsearch::CxnPool::Static">Static</a> connection pool, which is the default, should be used when you don&#39;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.</p>

<p>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.</p>

<p>This class does <a href="./Elasticsearch::Role::CxnPool">Elasticsearch::Role::CxnPool</a>.</p>

<h1 id="CONFIGURATION">CONFIGURATION</h1>

<h2 id="nodes"><code>nodes</code></h2>

<p>The list of nodes to use to serve requests. Can accept a single node, multiple nodes, and defaults to <code>localhost:9200</code> if no <code>nodes</code> are specified. See <a href="./Elasticsearch::Role::Cxn::HTTP#node">&quot;node&quot; in Elasticsearch::Role::Cxn::HTTP</a> for details of the node specification.</p>

<h2 id="See-also">See also</h2>

<ul>

<li><p><a href="./Elasticsearch::Role::Cxn#request_timeout">&quot;request_timeout&quot; in Elasticsearch::Role::Cxn</a></p>

</li>
<li><p><a href="./Elasticsearch::Role::Cxn#ping_timeout">&quot;ping_timeout&quot; in Elasticsearch::Role::Cxn</a></p>

</li>
<li><p><a href="./Elasticsearch::Role::Cxn#dead_timeout">&quot;dead_timeout&quot; in Elasticsearch::Role::Cxn</a></p>

</li>
<li><p><a href="./Elasticsearch::Role::Cxn#max_dead_timeout">&quot;max_dead_timeout&quot; in Elasticsearch::Role::Cxn</a></p>

</li>
</ul>

<h1 id="METHODS">METHODS</h1>

<h2 id="next_cxn-"><code>next_cxn()</code></h2>

<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false">    $cxn = $cxn_pool-&gt;next_cxn</pre>

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

<h2 id="schedule_check-"><code>schedule_check()</code></h2>

<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false">    $cxn_pool-&gt;schedule_check</pre>

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


</div>
</body>
</html>