https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44025

            Bug ID: 44025
           Summary: Elasticsearch: use all addresses of a single <server>
                    host name as nodes, so the client can fail over
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Searching - Elasticsearch
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  Target Milestone: ---

A site normally has a single <server> in koha-conf.xml, for example
https://user:[email protected]:9200. When that name resolves to several
addresses (DNS round robin for the nodes of a cluster), Search::Elasticsearch
still gets
one node. Requests are not spread over the nodes, and there is nothing to fail
over to
when that node hangs, is slow or answers with errors. The only fallback is in
the socket
layer, which tries the next address only when the TCP connect itself fails.

When the configuration has exactly one <server> and its host name resolves to
several
IPv4 addresses, get_elasticsearch_params now returns one node per address, with
user,
password, scheme and port kept. For https, ssl_options SSL_verifycn_name and
SSL_hostname
are set to the original name, so the certificate is still verified against the
name and
not the address (giving the client the addresses directly fails certificate
verification).

Left unchanged: several <server> entries, an IP address, a name that resolves
to one
address, a failed lookup. Installations without a name that has several
addresses are not
affected. The addresses are resolved when the client is created, so a long
running process
needs a restart to see changes in the DNS.

The patch adds t/Koha/SearchEngine/Elasticsearch/DnsNodes.t (no Elasticsearch
or database
needed).

Failing over from a failed node to the next one needs bug 44022: without it the
first
failed request makes the process reject every healthy response.

We have run this on 26.05 against a three node cluster behind one name,
blocking one or
two nodes for the indexer while it indexed: the jobs finished using the
remaining node.

I have made this as it was the behavior I expected when I configured elastic
search for 
the first time in Koha.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to