Steps to remove the hard-coded REDIS_CLUSTER_PORT_INCR limit currently requiring Redis always uses a port at least 10,000 less than the highest port number:
INFO CLUSTER PORT
Reasons for this change: The 10,000 port offset is slightly arbitrary, and disallowing Redis to run on ports higher than 55535 isn't very clear at first.
Reasons against this change: Using a randomly assigned OS port for cluster communication makes firewalling and network permissions difficult. Options: allow a user-specified cluster port (which would still require custom cluster port discovery as above), or use a smaller port offset (next port up instead of 10,000 ports up).
Reasons against a cluster port at all: I haven't looked into it, but I assume muxing cluster communications over the regular Redis port would cause performance problems somewhere.
Hello Matt, thanks for analyzing the question. I still think the fixed offset is a good idea, you have plenty of opportunities to find a set of port/port+10k that are free, and it makes the Redis Cluster universe a bit simpler: nodes always communicate their primary port that is used everywhere, from cluster nodes, to logging of messages, It is implicit that the binary-chat port for the cluster bus is always at a fixed offset.
If you check your message above, it shows how complexity must be added to implement your proposal. However it is not clear for what gain, since you can run your 2, 20, or 100 cluster instances easily in any reasonable box.
Btw brainstorming is always good!