In an Elasticsearch cluster, must all nodes be identical i.e. having the same:
- Operating System
- Amount of RAM
- CPU speed and number of cores
- etc.
or is it allowed for the nodes to be different? (Apart from the obvious fact that an homogeneous cluster would be much easier to configure, manage, and monitor than an heterogeneous one.)
No, they do not need to be identical. Depending on use case of the cluster, and the roles assigned to each node, hardware differences are to be expected.
It depends. They don't need to be identical in hardware resources. But they should be identical in OS (at least linux distribution or windows version) and must be identical in ES version.
ES doesn't support running multiple versions of ES in one cluster for long time because indices created or migrated on higher version cannot be migrated back to older version (due internal data mechanics and so on), so you will be in trouble when node with newer version will fail.
The ElasticSearch nodes do not need to be the same, aside from running a compatible ES version. Since queries often span multiple ES nodes then you'll be beholden to the slowest node, and the differences will make it hard to tune.