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

**URL:** <https://discuss.elastic.co/t/writing-data-in-elasticsearch-index-using-data-node-having-respective-shard-directly/43352>\
**Category:** Elasticsearch\
**Created:** [March 3, 2016, 8:51am UTC](https://discuss.elastic.co/t/writing-data-in-elasticsearch-index-using-data-node-having-respective-shard-directly/43352 "2016-03-03T08:51:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![masifpak](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@masifpak](https://discuss.elastic.co/u/masifpak)\
**Post date:** [March 3, 2016, 8:51am UTC](https://discuss.elastic.co/t/writing-data-in-elasticsearch-index-using-data-node-having-respective-shard-directly/43352/1 "2016-03-03T08:51:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 3, 2016, 9:40am UTC](https://discuss.elastic.co/t/writing-data-in-elasticsearch-index-using-data-node-having-respective-shard-directly/43352/2 "2016-03-03T09:40:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:11pm UTC](https://discuss.elastic.co/t/writing-data-in-elasticsearch-index-using-data-node-having-respective-shard-directly/43352/3 "2017-07-05T23:11:41Z")

</div>


