# Swapping out nodes in the cluster

**URL:** https://discuss.elastic.co/t/swapping-out-nodes-in-the-cluster/371882
**Category:** Elasticsearch
**Created:** [December 12, 2024, 2:05am UTC](https://discuss.elastic.co/t/swapping-out-nodes-in-the-cluster/371882 "2024-12-12T02:05:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://discuss.elastic.co/u/stecino)
#### Post date: [December 12, 2024, 2:05am UTC](https://discuss.elastic.co/t/swapping-out-nodes-in-the-cluster/371882/1 "2024-12-12T02:05:38Z")

</div>

Hello,

I am swapping out some old nodes in Elasticsearch 5.6.3 cluster with new ones. I don’t have a lot of indices/shards in it at the moment.

If were to stop the old node, and start the new node (provided I don’t have same replica and primary shards located on that node) will everything eventually re-allocate through out the cluster including the new node?

Or if I were to add the new node, is it possible to set one of the old nodes not accept any more nodes and manually moves shards out of that old node?

Thanks in advance

---

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://discuss.elastic.co/u/stecino)
#### Post date: [December 12, 2024, 4:49am UTC](https://discuss.elastic.co/t/swapping-out-nodes-in-the-cluster/371882/2 "2024-12-12T04:49:46Z")

</div>

Found this transient setting I can use to prep the node for decommissioning

cluster.routing.allocation.exclude.\_ip  
After which I should be able to start moving the shards from that node to the new
