Play joining Akka Cluster

I have a quick question regarding what is meant by embedding play-akka-http application in an Akka cluster. Does this mean there is a replica of play on each node or is this a play singleton participating in the cluster?

Additionally, is it a good idea (or even achievable) to put a standalone play instance outside the cluster which can then connect to the akka cluster in the same vpc / subnet (play can run its own classic actor system). I assume in this case Play won’t have any injected references to actor systems in the cluster so what would be the best way to achieve that?

Cheers
FK

I can’t answer the first part, the wording leaves it open for multiple interpretations.

On the second part : That is usually done using Cluster Client or its successor, gRPC. That gives you the option to route a message inside the cluster, assuming you know the target address.

1 Like

Hi @farooqkamal and @igmar,

please do no use cluster client to communicate two processes. The best way forward is to expose gRPC endpoints on your Akka Cluster and consume them from the Play application.

Cheers,

1 Like

gRPC isn’t always an option. But I agree, it should be a first preference.