Comcast/sirius

Remove implicit coupling between SiriusConfiguration.HOST and ClusterConfig

clinedome-work opened this issue · 2 comments

It’s currently the case that whatever a given Sirius node identifies as in its own configuration — hostname, ip, localhost, etc — that name must match the way that it’s addressed by other nodes. This comes as a direct result of Akka doing the same. If a node fired up on 127.0.0.1 catches a message sent to localhost, it drops it on the floor. So it’s not surprising that Sirius works this way, since the cluster config consists of akka addresses, but it is unfortunate.

Perhaps the cluster config should change. Instead of akka paths, it could simply contain hostnames, or ip addresses, some resolvable address. From there, based on either a configuration property (use_ip, use_dns, etc), as well as the specified protocol (enable_ssl or no), sirius could turn that into the proper akka path. This conjunction of configuration properties would also be used when setting up remoting on the node in the first place, so that the node would answer on the correct address/hostname/etc.

However it happens, basically: clients shouldn’t have to know how to construct akka paths and it would be really nice if the specification of other nodes in the cluster were less finicky.

Yes please! This caused me significant confusion, both in quickly bringing up a single instance of Sirius for initial testing, and in subsequently deploying on multiple servers.

SiriusShortNameParser may help with this, though I think it may need to be brought up to date for the new akka stuff.