# Mixing Dgraph versions in a cluster while upgrading

**URL:** <https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899>\
**Category:** Dgraph\
**Tags:** dgraph\
**Created:** [April 27, 2021, 3:36pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899 "2021-04-27T15:36:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugaia](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@eugaia](https://discuss.dgraph.io/u/eugaia)\
**Post date:** [April 27, 2021, 3:36pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/1 "2021-04-27T15:36:00Z")

</div>

Is it possible to have different versions of Dgraph in a cluster?

In particular, is it possible to upgrade a Dgraph cluster with zero downtime by adding servers running the newer version, rebalancing the cluster, then removing the servers running the older version?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [April 27, 2021, 5:06pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/2 "2021-04-27T17:06:41Z")

</div>

In theory, maybe. In practice, not recommended. There are breaking changes that can be problematic for your deployment.

---

<div class="post-metadata">

**Author:** ![eugaia](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@eugaia](https://discuss.dgraph.io/u/eugaia)\
**Post date:** [April 27, 2021, 5:15pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/3 "2021-04-27T17:15:51Z")

</div>

Thanks. Is there any way currently to perform server version upgrades with zero downtime?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [April 27, 2021, 6:14pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/4 "2021-04-27T18:14:18Z")

</div>

Not that I am aware of. Maybe the learner nodes could be used for this at some point. The learner nodes could hold the data, you could upgrade the cluster and the learner could “feed” the new cluster. But I’m just guessing. Also, I think that the learner node is a EE feature.

You can try to upgrade to minor upgrades. But in general major upgrades and especially those who have PRs with breaking changes you must export and reimport.

---

<div class="post-metadata">

**Author:** ![eugaia](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@eugaia](https://discuss.dgraph.io/u/eugaia)\
**Post date:** [April 27, 2021, 6:23pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/5 "2021-04-27T18:23:53Z")

</div>

I’m wondering if it might be possible to implement a way to upgrade a cluster from one version to the next one with zero downtime, perhaps using a learner nodes concept and/or having a ‘cluster version’ setting which would tell newer server versions to operate on an interface level as though they were an older server until the upgrade to the new servers was complete over all the alphas and zeros - then switching to the new version once all updates had been complete.

This could itself be made an enterprise feature - since zero downtime upgrades is something many businesses would be willing to pay for.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [April 27, 2021, 6:31pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/6 "2021-04-27T18:31:34Z")

</div>

I have thought about it a few years ago. I have never tested it, but worth a shot. The idea is to move the tablets to new nodes and these new nodes are in a newer version. In theory, the “transmission” of predicate(tablets) has no issues with breaking changes as we almost never touch that part of the code. In the end, kill the old instances and remove them from the zero awareness.

---

<div class="post-metadata">

**Author:** ![eugaia](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@eugaia](https://discuss.dgraph.io/u/eugaia)\
**Post date:** [April 27, 2021, 6:36pm UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/7 "2021-04-27T18:36:41Z")

</div>

Are there any plans to add zero-downtime upgrades to the TODO list, if not for 2021 then for 2022? Can I request that it be added if not?

---

<div class="post-metadata">

**Author:** ![chewxy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/chewxy/32/4339_2.png) [@chewxy](https://discuss.dgraph.io/u/chewxy)\
**Post date:** [April 29, 2021, 4:49am UTC](https://discuss.dgraph.io/t/mixing-dgraph-versions-in-a-cluster-while-upgrading/13899/8 "2021-04-29T04:49:33Z")

</div>

Yes you can. If you start a new thread I’ll mark it as a feature request
