Writing data in Elasticsearch index using Data Node (Having respective shard) directly


(Muhammad Asif) #1

Hi Geeks,

I have two nodes cluster.
Scenario 1
Both are Master and Data nodes(Default Settings). I know node one is currently working as active master node. So node two will be data node.
I have a an index which has shard on node two. I need to write in that shard.
Can I write data directly to that node in respective shard.
Scenario 2
Node 1 is master and node 2 is data node explicitly.
Can I write data directly in data node or i have to come through master node.

Thanks


(Mark Walkom) #2

What do you mean by "Can I write data directly to that node in respective shard.", directly how?

You can connect to any node in a cluster for an indexing operation, whether it's 5 of 500 nodes, the request will be redirected to the node that has the shard.
Don't think of it in terms of interacting with nodes, you're interacting with a cluster.


(system) #3