# Scaling my cluster back down

**URL:** <https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701>\
**Category:** Elasticsearch\
**Created:** [June 24, 2011, 1:48pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701 "2011-06-24T13:48:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_Baum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karl_baum/32/3186_2.png) [@Karl\_Baum](https://discuss.elastic.co/u/Karl_Baum)\
**Post date:** [June 24, 2011, 1:48pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/1 "2011-06-24T13:48:06Z")

</div>

In an attempt to index 200 million documents as quickly as possible, i scaled my elasticsearch cluster up to 31 instances and my index consists of 20 shards and 1 replica. Everything is going well but my question is can I scale the cluster down once i am done indexing? What happens if i drop down to let's say 5-10 elasticsearch instances within the cluster?

thx.

-karl

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 24, 2011, 1:50pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/2 "2011-06-24T13:50:15Z")

</div>

Thats not a problem, those shards will get rebalanced into the remaining nodes. When you scale down, make sure to shutdown nodes one at a time, and wait for a green status between nodes being shutdown (we, you can shutdown nodes up to the replica count of the index without the chance of missing shards, note missing, and not loosing data, the data can still be recovered if you start the node back up).

On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:

> In an attempt to index 200 million documents as quickly as possible, i scaled my elasticsearch cluster up to 31 instances and my index consists of 20 shards and 1 replica. Everything is going well but my question is can I scale the cluster down once i am done indexing? What happens if i drop down to let's say 5-10 elasticsearch instances within the cluster?
> 
> thx.
> 
> -karl

---

<div class="post-metadata">

**Author:** ![Karl\_Baum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karl_baum/32/3186_2.png) [@Karl\_Baum](https://discuss.elastic.co/u/Karl_Baum)\
**Post date:** [June 24, 2011, 2:57pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/3 "2011-06-24T14:57:46Z")

</div>

Interesting, in my case I have 20 shards but only one replica. Is that a replica per shard? If so, then can I safely shut down 20 instance?

Thanks for your help!

Sent from my iPhone

On Jun 24, 2011, at 9:50 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> Thats not a problem, those shards will get rebalanced into the remaining nodes. When you scale down, make sure to shutdown nodes one at a time, and wait for a green status between nodes being shutdown (we, you can shutdown nodes up to the replica count of the index without the chance of missing shards, note missing, and not loosing data, the data can still be recovered if you start the node back up).  
> On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:
> 
> > In an attempt to index 200 million documents as quickly as possible, i scaled my elasticsearch cluster up to 31 instances and my index consists of 20 shards and 1 replica. Everything is going well but my question is can I scale the cluster down once i am done indexing? What happens if i drop down to let's say 5-10 elasticsearch instances within the cluster?
> > 
> > thx.
> > 
> > -karl

---

<div class="post-metadata">

**Author:** ![Chris\_Berkhout](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_berkhout/32/3058_2.png) [@Chris\_Berkhout](https://discuss.elastic.co/u/Chris_Berkhout)\
**Post date:** [June 24, 2011, 3:09pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/4 "2011-06-24T15:09:19Z")

</div>

You want to shut down one instance at a time.

Each of your shards is on two nodes (the original on one and the  
replica on the other).

If you shut down two nodes, you may take out both copies of a shard  
before it has a chance to regenerate.

Cheers,  
Chris

On Fri, Jun 24, 2011 at 10:57 PM, Karl Baum [karl.baum@gmail.com](mailto:karl.baum@gmail.com) wrote:

> Interesting, in my case I have 20 shards but only one replica. Is that a  
> replica per shard? If so, then can I safely shut down 20 instance?  
> Thanks for your help!
> 
> Sent from my iPhone  
> On Jun 24, 2011, at 9:50 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)  
> wrote:
> 
> Thats not a problem, those shards will get rebalanced into the remaining  
> nodes. When you scale down, make sure to shutdown nodes one at a time, and  
> wait for a green status between nodes being shutdown (we, you can shutdown  
> nodes up to the replica count of the index without the chance of missing  
> shards, note missing, and not loosing data, the data can still be recovered  
> if you start the node back up).
> 
> On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:
> 
> In an attempt to index 200 million documents as quickly as possible, i  
> scaled my elasticsearch cluster up to 31 instances and my index consists of  
> 20 shards and 1 replica. Everything is going well but my question is can I  
> scale the cluster down once i am done indexing? What happens if i drop down  
> to let's say 5-10 elasticsearch instances within the cluster?
> 
> thx.
> 
> -karl

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 24, 2011, 3:31pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/5 "2011-06-24T15:31:50Z")

</div>

Yep, what Chris said :). You can scale down to even 2 nodes (and those shards will be allocated on both).

On Friday, June 24, 2011 at 6:09 PM, Chris Berkhout wrote:

> You want to shut down one instance at a time.
> 
> Each of your shards is on two nodes (the original on one and the  
> replica on the other).
> 
> If you shut down two nodes, you may take out both copies of a shard  
> before it has a chance to regenerate.
> 
> Cheers,  
> Chris
> 
> On Fri, Jun 24, 2011 at 10:57 PM, Karl Baum \<[karl.baum@gmail.com](mailto:karl.baum@gmail.com) ([mailto:karl.baum@gmail.com](mailto:karl.baum@gmail.com))\> wrote:
> 
> > Interesting, in my case I have 20 shards but only one replica. Is that a  
> > replica per shard? If so, then can I safely shut down 20 instance?  
> > Thanks for your help!
> > 
> > Sent from my iPhone  
> > On Jun 24, 2011, at 9:50 AM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) ([mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com))\>  
> > wrote:
> > 
> > Thats not a problem, those shards will get rebalanced into the remaining  
> > nodes. When you scale down, make sure to shutdown nodes one at a time, and  
> > wait for a green status between nodes being shutdown (we, you can shutdown  
> > nodes up to the replica count of the index without the chance of missing  
> > shards, note missing, and not loosing data, the data can still be recovered  
> > if you start the node back up).
> > 
> > On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:
> > 
> > In an attempt to index 200 million documents as quickly as possible, i  
> > scaled my elasticsearch cluster up to 31 instances and my index consists of  
> > 20 shards and 1 replica. Everything is going well but my question is can I  
> > scale the cluster down once i am done indexing? What happens if i drop down  
> > to let's say 5-10 elasticsearch instances within the cluster?
> > 
> > thx.
> > 
> > -karl

---

<div class="post-metadata">

**Author:** ![Karl\_Baum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karl_baum/32/3186_2.png) [@Karl\_Baum](https://discuss.elastic.co/u/Karl_Baum)\
**Post date:** [June 24, 2011, 4:31pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/6 "2011-06-24T16:31:49Z")

</div>

Wow, that is really amazing. Should i be paying attention to disk space during this process?

Sent from my iPad

On Jun 24, 2011, at 11:31 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> Yep, what Chris said :). You can scale down to even 2 nodes (and those shards will be allocated on both).  
> On Friday, June 24, 2011 at 6:09 PM, Chris Berkhout wrote:
> 
> > You want to shut down one instance at a time.
> > 
> > Each of your shards is on two nodes (the original on one and the  
> > replica on the other).
> > 
> > If you shut down two nodes, you may take out both copies of a shard  
> > before it has a chance to regenerate.
> > 
> > Cheers,  
> > Chris
> > 
> > On Fri, Jun 24, 2011 at 10:57 PM, Karl Baum [karl.baum@gmail.com](mailto:karl.baum@gmail.com) wrote:
> > 
> > > Interesting, in my case I have 20 shards but only one replica. Is that a  
> > > replica per shard? If so, then can I safely shut down 20 instance?  
> > > Thanks for your help!
> > > 
> > > Sent from my iPhone  
> > > On Jun 24, 2011, at 9:50 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)  
> > > wrote:
> > > 
> > > Thats not a problem, those shards will get rebalanced into the remaining  
> > > nodes. When you scale down, make sure to shutdown nodes one at a time, and  
> > > wait for a green status between nodes being shutdown (we, you can shutdown  
> > > nodes up to the replica count of the index without the chance of missing  
> > > shards, note missing, and not loosing data, the data can still be recovered  
> > > if you start the node back up).
> > > 
> > > On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:
> > > 
> > > In an attempt to index 200 million documents as quickly as possible, i  
> > > scaled my elasticsearch cluster up to 31 instances and my index consists of  
> > > 20 shards and 1 replica. Everything is going well but my question is can I  
> > > scale the cluster down once i am done indexing? What happens if i drop down  
> > > to let's say 5-10 elasticsearch instances within the cluster?
> > > 
> > > thx.
> > > 
> > > -karl

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 24, 2011, 4:32pm UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/7 "2011-06-24T16:32:03Z")

</div>

Yes, you need to make sure that you are not overloading the cluster by making it too small.

On Friday, June 24, 2011 at 7:33 PM, Karl Baum wrote:

> Wow, that is really amazing. Should i be paying attention to disk space during this process?
> 
> Sent from my iPad
> 
> On Jun 24, 2011, at 11:31 AM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) ([mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com))\> wrote:
> 
> > Yep, what Chris said :). You can scale down to even 2 nodes (and those shards will be allocated on both).
> > 
> > On Friday, June 24, 2011 at 6:09 PM, Chris Berkhout wrote:
> > 
> > > You want to shut down one instance at a time.
> > > 
> > > Each of your shards is on two nodes (the original on one and the  
> > > replica on the other).
> > > 
> > > If you shut down two nodes, you may take out both copies of a shard  
> > > before it has a chance to regenerate.
> > > 
> > > Cheers,  
> > > Chris
> > > 
> > > On Fri, Jun 24, 2011 at 10:57 PM, Karl Baum \<[karl.baum@gmail.com](mailto:karl.baum@gmail.com) ([mailto:karl.baum@gmail.com](mailto:karl.baum@gmail.com))\> wrote:
> > > 
> > > > Interesting, in my case I have 20 shards but only one replica. Is that a  
> > > > replica per shard? If so, then can I safely shut down 20 instance?  
> > > > Thanks for your help!
> > > > 
> > > > Sent from my iPhone  
> > > > On Jun 24, 2011, at 9:50 AM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) ([mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com))\>  
> > > > wrote:
> > > > 
> > > > Thats not a problem, those shards will get rebalanced into the remaining  
> > > > nodes. When you scale down, make sure to shutdown nodes one at a time, and  
> > > > wait for a green status between nodes being shutdown (we, you can shutdown  
> > > > nodes up to the replica count of the index without the chance of missing  
> > > > shards, note missing, and not loosing data, the data can still be recovered  
> > > > if you start the node back up).
> > > > 
> > > > On Friday, June 24, 2011 at 4:48 PM, Karl Baum wrote:
> > > > 
> > > > In an attempt to index 200 million documents as quickly as possible, i  
> > > > scaled my elasticsearch cluster up to 31 instances and my index consists of  
> > > > 20 shards and 1 replica. Everything is going well but my question is can I  
> > > > scale the cluster down once i am done indexing? What happens if i drop down  
> > > > to let's say 5-10 elasticsearch instances within the cluster?
> > > > 
> > > > thx.
> > > > 
> > > > -karl

---

<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 6, 2017, 4:02am UTC](https://discuss.elastic.co/t/scaling-my-cluster-back-down/4701/8 "2017-07-06T04:02:40Z")

</div>


