1Search::Elasticsearch::UCsxenrPoCooln:t:rSitbauttiecdS(e3Pa)errclh:D:oEcluamsetnitcasteiaornch::CxnPool::Static(3)
2
3
4
6 Search::Elasticsearch::CxnPool::Static - A CxnPool for connecting to a
7 remote cluster with a static list of nodes.
8
10 version 8.00
11
13 $e = Search::Elasticsearch->new(
14 cxn_pool => 'Static' # default
15 nodes => [
16 'search1:9200',
17 'search2:9200'
18 ],
19 );
20
22 The Static connection pool, which is the default, should be used when
23 you don't have direct access to the Elasticsearch cluster, eg when you
24 are accessing the cluster through a proxy. It round-robins through the
25 nodes that you specified, and pings each node before it is used for
26 the first time, to ensure that it is responding.
27
28 If any node fails, then all nodes are pinged before the next request to
29 ensure that they are still alive and responding. Failed nodes will be
30 pinged regularly to check if they have recovered.
31
32 This class does Search::Elasticsearch::Role::CxnPool::Static and
33 Search::Elasticsearch::Role::Is_Sync.
34
36 "nodes"
37 The list of nodes to use to serve requests. Can accept a single node,
38 multiple nodes, and defaults to "localhost:9200" if no "nodes" are
39 specified. See "node" in Search::Elasticsearch::Role::Cxn for details
40 of the node specification.
41
42 See also
43 • "request_timeout" in Search::Elasticsearch::Role::Cxn
44
45 • "ping_timeout" in Search::Elasticsearch::Role::Cxn
46
47 • "dead_timeout" in Search::Elasticsearch::Role::Cxn
48
49 • "max_dead_timeout" in Search::Elasticsearch::Role::Cxn
50
51 Inherited configuration
52 From Search::Elasticsearch::Role::CxnPool
53
54 • randomize_cxns
55
57 next_cxn()
58 $cxn = $cxn_pool->next_cxn
59
60 Returns the next available live node (in round robin fashion), or
61 throws a "NoNodes" error if no nodes respond to ping requests.
62
63 Inherited methods
64 From Search::Elasticsearch::Role::CxnPool::Static
65
66 • schedule_check()
67
68 From Search::Elasticsearch::Role::CxnPool
69
70 • cxn_factory()
71
72 • logger()
73
74 • serializer()
75
76 • current_cxn_num()
77
78 • cxns()
79
80 • seed_nodes()
81
82 • next_cxn_num()
83
84 • set_cxns()
85
86 • request_ok()
87
88 • request_failed()
89
90 • should_retry()
91
92 • should_mark_dead()
93
94 • cxns_str()
95
96 • cxns_seeds_str()
97
98 • retries()
99
100 • reset_retries()
101
103 Enrico Zimuel <enrico.zimuel@elastic.co>
104
106 This software is Copyright (c) 2022 by Elasticsearch BV.
107
108 This is free software, licensed under:
109
110 The Apache License, Version 2.0, January 2004
111
112
113
114perl v5.38.0 2023S-e0a7r-c2h1::Elasticsearch::CxnPool::Static(3)