Are you running a separate Actor system on each host in a distributed system using Akka Cluster?

Here, my guess is based on reading Stackoverflow.

You have several system components:

  • Database
  • Authentication
  • Web

Each system component runs on a separate host, as described in the microservice template. In another case, to glue these nodes you need:

  • Run the Actor system , which functions as one of the seed nodes on each host.
  • Describe the role for each host so that you can forward messages to the correct component

Here are my questions:

  • Can you not start the Actor system on each host and still refer to the cluster?
  • How do you send role-based messages? Say I want to forward a database message to a database component from a web component?
+4
source share
1 answer

Find out the answer after some study.

1) Yes, you need to run a separate acting system if it is physically located in another system. This means that you can join the seed nodes. Otherwise, when an actor dies, there is no actor system to restart it.

2) Roles are not used to send messages. It is simply used to tell other nodes in the cluster that a node has joined the cluster with this tag..

, Custer

+1

Source: https://habr.com/ru/post/1608178/


All Articles