# After Create ElasticSearch Cluster with 3 nodes as master and data nodes , how to access apis of elasticssearch to aggregate , insert and update?

**URL:** <https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245>\
**Category:** Elasticsearch\
**Created:** [January 7, 2019, 4:54pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245 "2019-01-07T16:54:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_5amy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m_5amy/32/32662_2.png) [@m\_5amy](https://discuss.elastic.co/u/m_5amy)\
**Post date:** [January 7, 2019, 4:54pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/1 "2019-01-07T16:54:56Z")

</div>

After Create ElasticSearch Cluster with 3 nodes as master and data nodes , how to access apis of elasticssearch to aggregate , insert and update?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2019, 7:47pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/2 "2019-01-07T19:47:57Z")

</div>

What did you try so far?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 7, 2019, 7:50pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/3 "2019-01-07T19:50:27Z")

</div>

This [practical introduction to Elasticsearch](https://www.elastic.co/blog/a-practical-introduction-to-elasticsearch) might be useful.

---

<div class="post-metadata">

**Author:** ![m\_5amy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m_5amy/32/32662_2.png) [@m\_5amy](https://discuss.elastic.co/u/m_5amy)\
**Post date:** [January 7, 2019, 9:22pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/4 "2019-01-07T21:22:48Z")

</div>

@dadoonet @Christian_Dahlqvist after create the cluster how , which node my code will deal with to insert to elastic?  
We must use loadbalancing to distribute insertion over all nodes?  
My cluster contains only three nodes they are master and data nodes same time and have the same indexes.  
I need to know in which index I will insert and how?  
And how I will search?

---

<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:** [January 7, 2019, 9:25pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/5 "2019-01-07T21:25:00Z")

</div>

Any node in the cluster can accept requests - index or search - and will pass those requests onto the node that needs to execute them.

It can make sense to use a load balancer, or if you are interacting with the cluster via code, use one of our clients which will handle this for you.

---

<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:** [February 4, 2019, 9:25pm UTC](https://discuss.elastic.co/t/after-create-elasticsearch-cluster-with-3-nodes-as-master-and-data-nodes-how-to-access-apis-of-elasticssearch-to-aggregate-insert-and-update/163245/6 "2019-02-04T21:25:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
