# Forcing only certain nodes to perform coordination within a cluster

**URL:** <https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120>\
**Category:** Elasticsearch\
**Created:** [October 17, 2019, 7:47pm UTC](https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120 "2019-10-17T19:47:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [October 17, 2019, 7:47pm UTC](https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120/1 "2019-10-17T19:47:09Z")

</div>

My understanding is the node receiving the REST query will act as a coordinating node.  
Is this assumption false?  
What I'm trying to do is to force say 3 nodes to handle both ingest and coordinating functions. Those 3 nodes are not data nodes. For the sake of this discussion, we can leave out ingest function because I can simply split it into 3 new nodes.

From my experience, the CPU pressure is not on the 3 nodes receiving query when I'm performing CPU intensive aggregations.

If my setup is wrong, how can I achieve forcing coordination from certain none-data nodes?  
The purpose is pretty simple. Have data nodes only to gather data. Leave aggregation to none-data nodes.  
This way, I can scale them differently based on query need.

---

<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:** [October 17, 2019, 8:55pm UTC](https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120/2 "2019-10-17T20:55:25Z")

</div>

> [@linkerc](#):
>
> My understanding is the node receiving the REST query will act as a coordinating node.  
> Is this assumption false?

No, that is correct.

> [@linkerc](#):
>
> From my experience, the CPU pressure is not on the 3 nodes receiving query when I'm performing CPU intensive aggregations.

That is expected as a lot of the processing is performed by the nodes holding the data, before processed results are send to the coordinating node for final processing and aggregation.

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [October 18, 2019, 1:12am UTC](https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120/3 "2019-10-18T01:12:15Z")

</div>

Thanks for the quick response.  
Can you please help answer this question?  
I have a query which results in 7K document hits (very small in the index with billions of documents).  
I then perform 2 layer aggregation. The search portion returns very quickly and consistently. But the aggr takes about 3 times longer.  
If the gathering phase yields only 7K documents (across say 5 nodes/shards), shouldn't the aggregation phase be very quick as well?

we have noticed a similar aggregation on a different smaller index seems to be much faster. This suggests the total number of documents in the index plays a role. If it does, why? Shouldn't the filtering phase reduce the result where aggregation time should be fast?

---

<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:** [November 15, 2019, 1:12am UTC](https://discuss.elastic.co/t/forcing-only-certain-nodes-to-perform-coordination-within-a-cluster/204120/4 "2019-11-15T01:12:19Z")

</div>

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