What is the reasoning behind requiring the absolute port number AND offset in cluster configs?

When deploying a cluster on a single host with different ports the examples state you must use the -o flag to specify the port offset from the default port. However, you also have to specify the actual port being connected. This seems nonsensical and redundant as the default port should be of no consequence if the actual port the server is listening on must be specified as well.

--my flag is used to specify the advertising address. This is a very common approach in distributed systems to specify a listen address and an advertising address. Most of the databases and distributed systems that run at scale will have such flags available for users to use.

This is used when a node may have different private and public IPs (and even different port if a port mapping is done from a private IP port to public IP port). This is why we require you to specify the listening address (mostly port, we know the address) using -o option and advertising address using --my flag.

Advertising address is where other nodes can find this node which would be a public IP that may not even be known to this host. For example, on AWS, each EC2 machine gets a private IP and you could potentially assign a public IP which is not know to the ec2 machine (you won’t see the public IP in ifconfig). Other nodes, if outside the same network, could only reach this host using the public IP. Hope that helps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.