1Search::Elasticsearch::URsoelre:C:oCnxtnrPiSobeoualtr:ec:dhS:nP:ieEfrlfla(s3Dt)oiccusmeeanrtcaht:i:oRnole::CxnPool::Sniff(3)
2
3
4

NAME

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

VERSION

10       version 6.00
11

CONFIGURATION

13   "sniff_interval"
14       How often should we perform a sniff in order to detect whether new
15       nodes have been added to the cluster.  Defaults to `300` seconds.
16
17   "sniff_max_content_length"
18       Whether we should set the max_content_length dynamically while
19       sniffing. Defaults to true unless a fixed "max_content_length" was
20       specified.
21

METHODS

23   "schedule_check()"
24           $cxn_pool->schedule_check
25
26       Schedules a sniff before the next request is processed.
27
28   "parse_sniff()"
29           $bool = $cxn_pool->parse_sniff(\%nodes);
30
31       Parses the response from a sniff request and extracts the hostname/ip
32       of all listed nodes, filtered through "should_accept_node()". If any
33       live nodes are found, they are passed to "set_cxns()" in
34       Search::Elasticsearch::Role::CxnPool.  The max_content_length is also
35       detected if "sniff_max_content_length" is true.
36
37   "should_accept_node()"
38           $host = $cxn_pool->should_accept_node($host,$node_id,\%node_data)
39
40       This method serves as a hook which can be overridden by the user.  When
41       a sniff is performed, this method is called with the "host" (eg
42       "192.168.5.100:9200"), the "node_id" (the ID assigned to the node by
43       Elasticsearch) and the "node_data" which contains the information about
44       the node that Elasticsearch has returned, eg:
45
46           {
47               "transport_address" => "inet[192.168.5.100/192.168.5.100:9300]",
48               "http" : {
49                  "publish_address"    => "inet[/192.168.5.100:9200]",
50                  "max_content_length" => "100mb",
51                  "bound_address"      => "inet[/0:0:0:0:0:0:0:0:9200]",
52                  "max_content_length_in_bytes" : 104857600
53               },
54               "version"       => "0.90.4",
55               "name"          => "Silver Sable",
56               "hostname"      => "search1.domain.com",
57               "http_address"  => "inet[/192.168.5.100:9200]"
58           }
59
60       If the node should be accepted (ie used to serve data), then it should
61       return the "host" value to use.  By default, nodes are always accepted.
62

AUTHOR

64       Clinton Gormley <drtech@cpan.org>
65
67       This software is Copyright (c) 2017 by Elasticsearch BV.
68
69       This is free software, licensed under:
70
71         The Apache License, Version 2.0, January 2004
72
73
74
75perl v5.30.1                    Se2a0r2c0h-:0:1E-l3a0sticsearch::Role::CxnPool::Sniff(3)
Impressum