Hardware Servers, ES Instances and Replicas


(Marc) #1

Hi,
I have the following question (regardsless whether the resulting cluster design is ideal and fits the general concept of elasticsearch).
If I have two hardware servers with each running 3 instances of elasticsearch, is it possible to assure that each hardwareserver holds a full copy of the total data (indices)? Or to put it differently I want on each server three different elasticsearch instances that cover 100% of the data so that from the perspective of the hardware the cluster is failproof.

Cheers,
Marc


(Marc) #2

ok found the solution

cluster.routing.allocation.awareness.attributes
A key way to achieve failure tolerance with ES is to use replicas, so
that if one host goes down, the affected shards stay available. If
you’re running multiple instances on each physical host, it’s entirely
possible to automatically allocate all replicas for a shard to the same
host, which isn’t going to help you! Thankfully this is avoidable with
the use of shard allocation awareness. You can set the hostname as a node attribute on each instance and use that attribute as a factor in shard assignments.
ES_JAVA_OPTS="$ES_JAVA_OPTS -Des.node.host=${HOSTNAME}"
ES_JAVA_OPTS="$ES_JAVA_OPTS -Des.cluster.routing.allocation.awareness.attributes=host"


(system) #3