GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEARCH::ELASTICSEARCH::CXNPOOL::SNIFF (3)

.ds Aq ’

NAME

Search::Elasticsearch::CxnPool::Sniff - A CxnPool for connecting to a local cluster with a dynamic node list

CONTENTS

VERSION

version 2.00

SYNOPSIS



    $e = Search::Elasticsearch->new(
        cxn_pool => Sniff,
        nodes    => [
            search1:9200,
            search2:9200
        ],
    );



DESCRIPTION

The Sniff connection pool should be used when you <B>doB> have direct access to the Elasticsearch cluster, eg when your web servers and Elasticsearch servers are on the same network. The nodes that you specify are used to discover the cluster, which is then sniffed to find the current list of live nodes that the cluster knows about.

This sniff process is repeated regularly, or whenever a node fails, to update the list of healthy nodes. So if you add more nodes to your cluster, they will be auto-discovered during a sniff.

If all sniffed nodes fail, then it falls back to sniffing the original seed nodes that you specified in new().

For HTTP Cxn classes, this module will also dynamically detect the max_content_length which the nodes in the cluster will accept.

This class does Search::Elasticsearch::Role::CxnPool::Sniff and Search::Elasticsearch::Role::Is_Sync.

CONFIGURATION

CWnodes

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

    See also

o request_timeout in Search::Elasticsearch::Role::Cxn
o sniff_timeout in Search::Elasticsearch::Role::Cxn
o sniff_request_timeout in Search::Elasticsearch::Role::Cxn

    Inherited configuration

From Search::Elasticsearch::Role::CxnPool::Sniff
o sniff_interval
o sniff_max_content_length
From Search::Elasticsearch::Role::CxnPool
o randomize_cxns

METHODS

CWnext_cxn()



    $cxn = $cxn_pool->next_cxn



Returns the next available live node (in round robin fashion), or throws a NoNodes error if no nodes can be sniffed from the cluster.

CWschedule_check()



    $cxn_pool->schedule_check



Forces a sniff before the next Cxn is returned, to updated the list of healthy nodes in the cluster.

CWsniff()



    $bool = $cxn_pool->sniff



Sniffs the cluster and returns true if the sniff was successful.

    Inherited methods

From Search::Elasticsearch::Role::CxnPool::Sniff
o schedule_check()
o parse_sniff()
o should_accept_node()
From Search::Elasticsearch::Role::CxnPool
o cxn_factory()
o logger()
o serializer()
o current_cxn_num()
o cxns()
o seed_nodes()
o next_cxn_num()
o set_cxns()
o request_ok()
o request_failed()
o should_retry()
o should_mark_dead()
o cxns_str()
o cxns_seeds_str()
o retries()
o reset_retries()

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Elasticsearch BV.

This is free software, licensed under:



  The Apache License, Version 2.0, January 2004



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SEARCH::ELASTICSEARCH::CXNPOOL::SNIFF (3) 2015-10-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.