Changes

Jump to: navigation, search

Centralized logging in swarm

1,177 bytes added, 15:54, 29 September 2018
Multiple node ES cluster
# docker stack ps logmanager ...
</pre>
 
 
 
=Multiple node ES cluster=
* '''Automatikus cluster formálás:''' egy darab swarm service-t definiálunk, és egyszerűen meghatározzuk a replikák számát, elindul több konténerben az Elasticsearch egy swarm service-ként: http://derpturkey.com/elasticsearch-cluster-with-docker-engine-swarm-mode/
* '''Kézi cluster létrehozás:''' Minden egyes cluster tagot külön swarm service-ként definiálunk a compose fájlban, tehát előre pontosan megmondjuk, hogy hány darab fog futni, és hogy melyik node-nak milyen szerepe van: http://blog.ruanbekker.com/blog/2018/04/29/running-a-3-node-elasticsearch-cluster-with-docker-compose-on-your-laptop-for-testing/
 
 
===Node típusok===
 
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html
Ebben a paraméterben kell megadni, hogy hány master node-nak kell jelen lennie egyszerre, ahhoz hogy fenntartónak ítéljék meg az egyes nódok a cluster-t. Ezzel el lehet kerülni, hogy hálózati hiba estén, mikor a cluster két fele izolálódik egymástól önálló életre keljen a két oldal, mert mind a kettő azt hiszi, hogy ők teljes cluster-t alkotnak, és beindul egy párhuzamos működés, ami visszafordíthatatlan károkat okozna a cluser-ben. (split brain)
(master_eligible_nodes / 2) + 1
To explain, imagine that you have a cluster consisting of two master-eligible nodes. A network failure breaks communication between these two nodes. Each node sees one master-eligible node… itself. With minimum_master_nodes set to the default of 1, this is sufficient to form a cluster. Each node elects itself as the new master (thinking that the other master-eligible node has died) and the result is two clusters, or a split brain. These two nodes will never rejoin until one node is restarted. Any data that has been written to the restarted node will be lost.
 
 
Now imagine that you have a cluster with three master-eligible nodes, and minimum_master_nodes set to 2. If a network split separates one node from the other two nodes, the side with one node cannot see enough master-eligible nodes and will realise that it cannot elect itself as master. The side with two nodes will elect a new master (if needed) and continue functioning correctly. As soon as the network split is resolved, the single node will rejoin the cluster and start serving requests again.

Navigation menu