Mixing Dgraph versions in a cluster while upgrading

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?

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

1 Like

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

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.

1 Like

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.

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.

1 Like

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?

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

1 Like