# Specifying endpoint for performing reading/writing operations

**URL:** <https://discuss.elastic.co/t/specifying-endpoint-for-performing-reading-writing-operations/273304>\
**Category:** Elasticsearch\
**Created:** [May 18, 2021, 2:44pm UTC](https://discuss.elastic.co/t/specifying-endpoint-for-performing-reading-writing-operations/273304 "2021-05-18T14:44:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)\
**Post date:** [May 18, 2021, 2:44pm UTC](https://discuss.elastic.co/t/specifying-endpoint-for-performing-reading-writing-operations/273304/1 "2021-05-18T14:44:16Z")

</div>

Assuming we are trying to perform a read and/or a write operation on an es cluster reachable at  
`https://my-es-cluster`

Assuming this cluster is deployed on `kubernetes` and we have a way to directly reach a `master` service (or pod).

Is by any chance any reason it would be better to perform the indexing or reading operation directly on the master pod rather than through the cluster endpoint? `https://my-es-cluster` ?

Shouldn't we assume that all operations should go through the cluster's endpoint and then es is able to optimize / route the requests appropriately?

---

<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:** [May 19, 2021, 1:13am UTC](https://discuss.elastic.co/t/specifying-endpoint-for-performing-reading-writing-operations/273304/2 "2021-05-19T01:13:07Z")

</div>

If you are running dedicated masters, then we do not recommend sending any client requests to them as it reduces their ability to fulfil their role if they are also serving client traffic.

> [@pkaramol](#):
>
> Shouldn't we assume that all operations should go through the cluster's endpoint and then es is able to optimize / route the requests appropriately?

Yes, and it will. But see the above comment.

---

<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:** [June 16, 2021, 1:13am UTC](https://discuss.elastic.co/t/specifying-endpoint-for-performing-reading-writing-operations/273304/3 "2021-06-16T01:13:08Z")

</div>

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