# Zero downtime upgrade

**URL:** <https://discuss.elastic.co/t/zero-downtime-upgrade/12537>\
**Category:** Elasticsearch\
**Created:** [June 25, 2013, 6:17am UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537 "2013-06-25T06:17:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)\
**Post date:** [June 25, 2013, 6:17am UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/1 "2013-06-25T06:17:25Z")

</div>

Hi All,

I would like to know about the ways to upgrade or apply new patches in  
Elasticsearch with zero downtime.

Thanks,  
Ankit Jain

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 25, 2013, 6:40am UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/2 "2013-06-25T06:40:22Z")

</div>

Clinton wrote a Gist about it: [https://gist.github.com/clintongormley/3888120](https://gist.github.com/clintongormley/3888120)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 juin 2013 à 08:17, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :

Hi All,

I would like to know about the ways to upgrade or apply new patches in Elasticsearch with zero downtime.

Thanks,  
Ankit Jain

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 25, 2013, 2:57pm UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/3 "2013-06-25T14:57:05Z")

</div>

That recipe has the incredibly naive assumption of having a cluster with  
only two nodes. Long story short, you can't. You probably can, but it would  
require a lot of work. An entire secondary cluster would need to be setup  
and populated with data. In the past, I found that even two different  
versions on the network can cause issues with multicast zen discovery. If  
you are using the TransportClient, they would all have to be reconfigured.  
Rolling upgrades was a feature proposed for 1.0, but the community has been  
kept in the dark about what it actually will contain.

Cheers,

Ivan

On Mon, Jun 24, 2013 at 11:40 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Clinton wrote a Gist about it:  
> [Upgrading a running elasticsearch cluster · GitHub](https://gist.github.com/clintongormley/3888120)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 25 juin 2013 à 08:17, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :
> 
> Hi All,
> 
> I would like to know about the ways to upgrade or apply new patches in  
> Elasticsearch with zero downtime.
> 
> Thanks,  
> Ankit Jain
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 25, 2013, 4:37pm UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/4 "2013-06-25T16:37:12Z")

</div>

The critical phase of rolling upgrades is how to suspend ongoing writes and  
to redirect new writes into a temporary storage that can be replayed later  
automatically. I assume this is the feature that will appear in 1.0.

The steps can be done manually like in Clinton's gist, but it depends also  
on the external clients how they write to the cluster. You could force  
external clients to drop their connections while migration takes place, so  
they have to reconnect later. I doubt this can happen without exceptions  
(and maybe errors and write data loss) on client side. By accepting  
exceptions and ignoring how clients can resume smoothly, rolling upgrades  
are possible. Front-end load balancers can be very helpful for switching to  
the new ES cluster in zero downtime.

Jörg

On Tue, Jun 25, 2013 at 4:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> That recipe has the incredibly naive assumption of having a cluster with  
> only two nodes. Long story short, you can't. You probably can, but it would  
> require a lot of work. An entire secondary cluster would need to be setup  
> and populated with data. In the past, I found that even two different  
> versions on the network can cause issues with multicast zen discovery. If  
> you are using the TransportClient, they would all have to be reconfigured.  
> Rolling upgrades was a feature proposed for 1.0, but the community has been  
> kept in the dark about what it actually will contain.
> 
> Cheers,
> 
> Ivan
> 
> On Mon, Jun 24, 2013 at 11:40 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Clinton wrote a Gist about it:  
> > [Upgrading a running elasticsearch cluster · GitHub](https://gist.github.com/clintongormley/3888120)
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 25 juin 2013 à 08:17, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :
> > 
> > Hi All,
> > 
> > I would like to know about the ways to upgrade or apply new patches in  
> > Elasticsearch with zero downtime.
> > 
> > Thanks,  
> > Ankit Jain
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 25, 2013, 9:29pm UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/5 "2013-06-25T21:29:42Z")

</div>

Re-reading my post, I sounded a bit negative. Rolling upgrades is hard  
primarily due to the fact that cross-version clusters are not permitted.  
The binary protocol is version specific, so you not only have issues  
between cluster nodes, but between the client and server if you are using  
the Java clients.

On non-trivial clusters, you can "decommission" nodes using the cluster  
update API. Sematext has a good blog post about it:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[ElasticSearch Shard Placement Control - Sematext](https://sematext.com/blog/elasticsearch-shard-placement-control/)**
>
> In this post you will learn how to control ElasticSearch shard placement.  If you are coming to our ElasticSearch talk at BerlinBuzzwords, we’ll be talking about this and more. If you’ve ever used ElasticSearch you probably know that you can set...

If using the Java clients, you might need to setup load balancing nodes to  
help the transition.

I'm still hoping that rolling upgrades makes it into 1.0

--  
Ivan

On Tue, Jun 25, 2013 at 9:37 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
[joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:

> The critical phase of rolling upgrades is how to suspend ongoing writes  
> and to redirect new writes into a temporary storage that can be replayed  
> later automatically. I assume this is the feature that will appear in 1.0.
> 
> The steps can be done manually like in Clinton's gist, but it depends also  
> on the external clients how they write to the cluster. You could force  
> external clients to drop their connections while migration takes place, so  
> they have to reconnect later. I doubt this can happen without exceptions  
> (and maybe errors and write data loss) on client side. By accepting  
> exceptions and ignoring how clients can resume smoothly, rolling upgrades  
> are possible. Front-end load balancers can be very helpful for switching to  
> the new ES cluster in zero downtime.
> 
> Jörg
> 
> On Tue, Jun 25, 2013 at 4:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > That recipe has the incredibly naive assumption of having a cluster with  
> > only two nodes. Long story short, you can't. You probably can, but it would  
> > require a lot of work. An entire secondary cluster would need to be setup  
> > and populated with data. In the past, I found that even two different  
> > versions on the network can cause issues with multicast zen discovery. If  
> > you are using the TransportClient, they would all have to be reconfigured.  
> > Rolling upgrades was a feature proposed for 1.0, but the community has been  
> > kept in the dark about what it actually will contain.
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Mon, Jun 24, 2013 at 11:40 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > Clinton wrote a Gist about it:  
> > > [Upgrading a running elasticsearch cluster · GitHub](https://gist.github.com/clintongormley/3888120)
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 25 juin 2013 à 08:17, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :
> > > 
> > > Hi All,
> > > 
> > > I would like to know about the ways to upgrade or apply new patches in  
> > > Elasticsearch with zero downtime.
> > > 
> > > Thanks,  
> > > Ankit Jain
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:29am UTC](https://discuss.elastic.co/t/zero-downtime-upgrade/12537/6 "2017-07-06T02:29:31Z")

</div>


