# Graceful Cluster Shutdown

**URL:** <https://discuss.elastic.co/t/graceful-cluster-shutdown/32493>\
**Category:** Elasticsearch\
**Created:** [October 19, 2015, 1:33pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493 "2015-10-19T13:33:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![taspotts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taspotts/32/5346_2.png) [@taspotts](https://discuss.elastic.co/u/taspotts)\
**Post date:** [October 19, 2015, 1:33pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493/1 "2015-10-19T13:33:18Z")

</div>

What is the preferred method now(1.7.x) for a graceful shutdown of an entire cluster?

Looks like the \_shutdown option is going away soon...  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 19, 2015, 1:42pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493/2 "2015-10-19T13:42:33Z")

</div>

As the [ES 2.0 documentation page for the `_shutdown` API](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-shutdown.html) indicates, install ES as a service and shut it down by shutting down that service. In the Unix case this will in the end translate to a SIGTERM signal to the ES process.

---

<div class="post-metadata">

**Author:** ![taspotts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taspotts/32/5346_2.png) [@taspotts](https://discuss.elastic.co/u/taspotts)\
**Post date:** [October 19, 2015, 3:05pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493/3 "2015-10-19T15:05:46Z")

</div>

> install ES as a service and shut it down by shutting down that service  
> Understood and am already doing this.

I was more concerned in the order of shutting things down in a larger sized cluster where master/client/data nodes are on separate machines to prevent a master election and/or shard re-allocation.

---

<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:** [October 19, 2015, 11:06pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493/4 "2015-10-19T23:06:41Z")

</div>

Disable allocation and then shut things down, it doesn't really matter in what process but it'd make sense to do clients then data then masters.

---

<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 5, 2017, 11:43pm UTC](https://discuss.elastic.co/t/graceful-cluster-shutdown/32493/5 "2017-07-05T23:43:58Z")

</div>


