Search...NoPing(3pm)

πŸ“¦
version 8.12 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Search::Elasticsearch::CxnPool::Static::NoPing πŸ’–

okay bestie, this is the Search::Elasticsearch::CxnPool::Static::NoPing page β€” it's a CxnPool for connecting to a remote cluster when you literally cannot ping it. yes, that's a thing. come sit, i'll explain 🫢


✨ VERSION ✨

version 8.12 β€” she's current, she's fresh πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so the Static::NoPing connection pool β€” much like the plain Static pool β€” is the one you reach for when your access to the cluster is limited. but here's the plot twist: the Static pool needs to be able to ping nodes in the cluster, with a HEAD / request. if you can't ping your nodes? then nope, Static isn't it β€” you want the Static::NoPing connection pool instead. periodt.

and because the cluster cannot be pinged, this CxnPool can't use a cute lil short ping request to figure out whether nodes are live or not 😭 β€” it just has to send requests to the nodes to determine whether they are alive or not. sending it fr fr.

most of the time, a dead node will cause the request to fail quickly. however, in situations where node failure takes time (eg malfunctioning routers or firewalls), a failure may not be reported until the request itself times out (see "request_timeout" in Search::Elasticsearch::Cxn). lowkey stressful but that's the vibe.

failed nodes will be retried regularly to check if they have recovered. πŸ’–

this class does Search::Elasticsearch::Role::CxnPool::Static::NoPing and Search::Elasticsearch::Role::Is_Sync.


πŸŽ€ CONFIGURATION πŸŽ€

"nodes"

the list of nodes to use to serve requests. can accept a single node, multiple nodes, and defaults to localhost:9200 if no nodes are specified. see "node" in Search::Elasticsearch::Role::Cxn for details of the node specification. 🌈

πŸ‘€ See also

  • "request_timeout" in Search::Elasticsearch::Role::Cxn
  • "dead_timeout" in Search::Elasticsearch::Role::Cxn
  • "max_dead_timeout" in Search::Elasticsearch::Role::Cxn

πŸ’œ Inherited configuration

from Search::Elasticsearch::Role::CxnPool::Static::NoPing

  • max_retries

from Search::Elasticsearch::Role::CxnPool

  • randomize_cxns

πŸ”₯ METHODS πŸ”₯

⭐ next_cxn()

$cxn = $cxn_pool->next_cxn

returns the next available node in round robin fashion β€” either a live node which has previously responded successfully, or a previously failed node which should be retried. and if all nodes are dead? it will throw a "NoNodes" error. πŸ’€ (that's your cue to go check things.)

🧚 Inherited methods

from Search::Elasticsearch::Role::CxnPool::Static::NoPing

  • should_mark_dead()
  • schedule_check()

from Search::Elasticsearch::Role::CxnPool

  • cxn_factory()
  • logger()
  • serializer()
  • current_cxn_num()
  • cxns()
  • seed_nodes()
  • next_cxn_num()
  • set_cxns()
  • request_ok()
  • request_failed()
  • should_retry()
  • should_mark_dead()
  • cxns_str()
  • cxns_seeds_str()
  • retries()
  • reset_retries()

πŸ‘‘ AUTHOR πŸ‘‘

Enrico Zimuel <enrico.zimuel@elastic.co> β€” icon, legend, wrote the whole thing πŸ’–


this software is Copyright (c) 2024 by Elasticsearch BV.

this is free software, licensed under:

The Apache License, Version 2.0, January 2004

and that's the whole page bestie, no cap 🫢 mwah πŸ’‹

this was Search...NoPing(3pm) from the User Contributed Perl Documentation, generated by perl v5.38.2 and dated 2024-02-04 β€” go forth and pool your connections, you've got this βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from