2 Node Cluster, 1 node being passive


(David Charle) #1

Hi

I am newbie to ES, and wanted to get simple 2 node cluster (1 in one DC and
another one in another DC) .. think as simple master->slave; where one
being the primary for all activities; and another being just a slave with
up2date indexes and can be used for failover without waiting on rebuilding
the indexes. Basically don't want secondary node to participate in live
requests due to latency it introduces.

Any recommendations on best configuration ?

My proposal:

Node A (master)
node.master: true
node.data: true
index.number_of_shards: 5 # need this for speeding up index time
index.number_of_replicas: 1

Node B (slave)
node.master: false
node.data: true
index.number_of_shards: 5
index.number_of_replicas: 1

Does this work ?

Thanks
David

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Radu Gheorghe) #2

Hi David,

I think the master can be either node, because it doesn't do much work
anyway. What you're probably interested in is which node is loaded with
indexing and search requests.

Indexing requests will hit both anyway, because you need both nodes to be
in sync. So you're left with searching, where you should be able to use
search preference to specify which node would be hit by searches if it's up
(_prefer_node:xyz):
http://www.elasticsearch.org/guide/reference/api/search/preference/

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Jun 25, 2013 at 4:09 AM, David Charle dbchar2012@gmail.com wrote:

Hi

I am newbie to ES, and wanted to get simple 2 node cluster (1 in one DC
and another one in another DC) .. think as simple master->slave; where one
being the primary for all activities; and another being just a slave with
up2date indexes and can be used for failover without waiting on rebuilding
the indexes. Basically don't want secondary node to participate in live
requests due to latency it introduces.

Any recommendations on best configuration ?

My proposal:

Node A (master)
node.master: true
node.data: true
index.number_of_shards: 5 # need this for speeding up index time
index.number_of_replicas: 1

Node B (slave)
node.master: false
node.data: true
index.number_of_shards: 5
index.number_of_replicas: 1

Does this work ?

Thanks
David

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(alap) #3

hi,

and why you don't use this configuration
Any recommendations on best configuration ?

My proposal:

Node A (master)
node.master: true
node.data: true
index.number_of_shards: 5 # need this for speeding up index time
index.number_of_replicas: 1

Node B (slave)
node.master: true
node.data: true
index.number_of_shards: 5
index.number_of_replicas: 1

whith a physical loadbalancer for load is two node. if the node A is down the node 2 logs. and after the node 1 is UP we have all data any times for me.


(system) #4