There’s a backend service that holds 2 instances on AWS. Service is communicating messages via actors. So, actors are created when the websocket request comes to the backend service. An actor can be created on instance1 or instance2. It’s randomly balanced by the environment. When I need to find an actor and send a message in a specific scenario, actors misbehave since the service is having multiple instances. Let’s say the expected actor need to find has been created on instance1. But my message is going to instance2. Due to that, the actor does not get the message. When I send it again, sometimes the actor gets the message. This issue is not happening when the service is having only 1 instance. Anyone can help me here? How to correctly handle this? Do I need to use Akka Cluster? how to pass messages between correct instances? Should it be done on devops side?
1 post - 1 participant