antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 537 forks source link

Join cluster using hostnames #118

Closed pulse00 closed 8 years ago

pulse00 commented 9 years ago

When joining a cluster using hostnames and not actual IP addresses, we see the following error using the command disque cluster meet some-node.example.com 7711:

(error) ERR Invalid node address specified: some-node.example.com:7711

If we supply the actual IP address of that server, the join command works.

Is this expected behavior?

simontabor commented 8 years ago

Might be worth referring to Redis for this - I had an old issue here: https://github.com/antirez/redis/issues/2410

antirez commented 8 years ago

Sorry no plans to work with hostnames so far. Consider that nodes can be moved to different IPs and will be able to rejoin the cluster and update the other nodes configuration with the new IP. However this only works when there is no natting or port remapping of any kind (see Docker & co). So first step is to fix Redis & Disque cluster to work well in natted environments. Then to consider if it's worth or not to use hostname (I doubt, because they add an additional layer of indirection, but who knows).

pulse00 commented 8 years ago

Consider that nodes can be moved to different IPs and will be able to rejoin the cluster and update the other nodes configuration with the new IP.

Ah, i had no idea that this is how it's supposed to work. Thank clears things up, thanks!