'Creating a cluster of nodes having different MarkLogic version

I am trying to create a Marklogic Cluster in which I want to have two nodes having different versions of Marklogic (Marklogic 8 and Marklogic9).

I have created two separate docker containers on my local machine one for MarkLogic 8 and another for MarkLogic 9. When MarkLogic 9 host is initialized (skipped the join cluster step) successfully, I try to join another host having MarkLogic 8 version but when I proceed get an error related to EFFECTIVE VERSION. Can't we create a MarkLogic cluster of nodes having different ML versions in any way?



Solution 1:[1]

You can upgrade from 8.x to 9.x using the 'rolling upgrade' feature, then do not complete the final host upgrade. This will leave you in a 'abandoned head'-like state (git-ish, and appropriately graphic metaphor). The cluster will be 'running' a mixture of 8 and 9 software, but will be running 'as if' it were in v8. While this 'works' and is 'supported' (with 'appropriate disclaimers') -- it is not a state I would suggest running the cluster for longer then it takes to resolve any upgrade issues. There are significant capabilities which are 'locked out' in this state awaiting completion of the upgrade. But it is the closest to what was asked.

Alternatively 'foreign clusters' can run in mixed-versions -- they are designed to do so, where 'mixed' means that each 'cluster' in a 'foreign cluster replication' is running servers with the same version as that cluster, but the clusters may be different versions from each other. Note: 'cluster' is 1 or more servers. Thus: one could create a set of 'clusters' from as few as 2 server (v8, v9 say ...) -- then join them as a foreign replica and 'voila' v8 + v9 in a "'cluster'" (of clusters). Why do this? Depends on what your goals are. Foreign replication is designed to accommodate servers in difficult to manage locations for long periods (on ships, planes, farms, factories, backpacks) -- where upgrades are impractical for long periods if ever.

Solution 2:[2]

MarkLogic server can support clustering for some minor version differences by forcing the the servers to the lowest common denominator in versions. With a major version difference this is not possible, as a 9.x server can not 'act' like an 8.x server.

Also, the clustering between minor versions is primarily intended to support rolling upgrades, not for regular operations.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DALDEI
Solution 2 Mike Gardner