Bootstrap on GCE

I (think) I would like to use akka-management-cluster-bootstrap on GCE, however AFAICT there is no DNS record for all instances of a managed instance group. I can call GCP APIs, however I don’t know where to start to define a custom discovery mechanism.

Background: I would like to implement a task queue an an app that’s autoscaled, and to ensure that the same task doesn’t get executed on two nodes simultaneously I thought of having the nodes form a cluster and specifying that I want a single instance of an actor on them. I’ve used akka actors before (though not typed, which I might prefer to use), but not in a cluster. I’m open to other ways of solving the objective too.

Bootstrap can work with any of the service discovery implementations (currently DNS, Consul, AWS API, Kubernetes API, Marathon API, etc). If you can’t get a DNS record then implementing a service discovery mechanism for GCE is a good idea, we have one for the AWS API.

Would you want to give it a try? Here is the AWS one for reference: https://github.com/akka/akka-management/blob/master/discovery-aws-api-async/src/main/scala/akka/discovery/awsapi/ecs/AsyncEcsSimpleServiceDiscovery.scala they are usually quite straight forward to implement.

You can start off by copying one of the other service discovery projects in Akka Management e.g. https://github.com/akka/akka-management/tree/master/discovery-aws-api-async/

Once you get started you can raise a WIP PR to ask any questions / get guidance on whether you’re on the right track.

TBH I would probably implement it in my application codebase, at least initially. Once it’s working I can probably contribute it.

Thanks for the pointer.

Do you think my broader approach is right though?

Yes, it is the equivalent of the AWS API discovery mechanism, it would be great to have GCE API as well.

After thinking about the the underlying problem more, I decided that I don’t really need a task queue after all. Perhaps one would make things more robust, but it’s not worth it right now.

Thanks for the help anyway