Greetings --

I'm moving here a thread started on twitter. Here's my scenario: I am 
spinning up a cluster on a compute fabric that's managed by an external 
component. One consequence of this configuration is that the nodes' IP 
addresses and their ports aren't known a priori: they are dynamically 
allocated by the external component. I have code that performs the 
resolution and thus could configure the cluster nodes appropriately. 
Therein lies the rub:

A. The compute fabric performs periodic health checks via HTTP (which I 
implemented on top of akka-http). The external component will resolve the 
allocated IP and port only *after* the first health check succeeds.
B. The resolution code queries the external component to extract the IP and 
port, and then uses those values to inject 
the akka.remote.netty.tcp.{hostname, port} into the actor system's config.

Both steps require an actor system, and because the values of 
akka.remote.netty.tcp.{hostname, port} are not available prior to the http 
listener being up and ready I can't think of a clean way to accomplish this 
workflow. I see a few of workarounds; for example:

1. Factor the health check out of Akka into a different framework that 
doesn't need an actor system 
(https://bitbucket.org/vetler/minihttpserver/overview ???) and spin up the 
actor system after the first health check succeeds
2. Use 2 actor systems: start one w/o remoting configured and answer the 
health checks until the IP and port are allocated, then shut it down and 
start a 2nd one configured for remoting with the acquired IP + port info as 
well as ready to continue answering the health checks.

I don't know how common this scenario is. I'd be interested in your 
thoughts about tackling it.

Thanks,

-Dragos

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to