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::ROLE::CXNPOOL::SNIFF (3)

.ds Aq ’

NAME

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

CONTENTS

VERSION

version 2.00

CONFIGURATION

CWsniff_interval

How often should we perform a sniff in order to detect whether new nodes have been added to the cluster. Defaults to ‘300‘ seconds.

CWsniff_max_content_length

Whether we should set the max_content_length dynamically while sniffing. Defaults to true unless a fixed max_content_length was specified.

METHODS

CWschedule_check()



    $cxn_pool->schedule_check



Schedules a sniff before the next request is processed.

CWparse_sniff()



    $bool = $cxn_pool->parse_sniff(\%nodes);



Parses the response from a sniff request and extracts the hostname/ip of all listed nodes, filtered through should_accept_node(). If any live nodes are found, they are passed to set_cxns() in Search::Elasticsearch::Role::CxnPool. The max_content_length is also detected if sniff_max_content_length is true.

CWshould_accept_node()



    $host = $cxn_pool->should_accept_node($host,$node_id,\%node_data)



This method serves as a hook which can be overridden by the user. When a sniff is performed, this method is called with the host (eg 192.168.5.100:9200), the node_id (the ID assigned to the node by Elasticsearch) and the node_data which contains the information about the node that Elasticsearch has returned, eg:



    {
        "transport_address" => "inet[192.168.5.100/192.168.5.100:9300]",
        "http" : {
           "publish_address"    => "inet[/192.168.5.100:9200]",
           "max_content_length" => "100mb",
           "bound_address"      => "inet[/0:0:0:0:0:0:0:0:9200]",
           "max_content_length_in_bytes" : 104857600
        },
        "version"       => "0.90.4",
        "name"          => "Silver Sable",
        "hostname"      => "search1.domain.com",
        "http_address"  => "inet[/192.168.5.100:9200]"
    }



If the node should be accepted (ie used to serve data), then it should return the host value to use. By default, nodes are always accepted.

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::ROLE::CXNPOOL::SNIFF (3) 2015-10-28

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