I’m using WebSockets in my Play 2.5 app. This app is replicated (2 instances) behind a NGINX load balancer. Because each WebSocket connection is stored as an ActorRef, how can I share the ref between the 2 instances of my app? Thanks.
First, websockets are persistent connection, so they will always be on a single instance. ActorRefs can be shared accros instances. Hook up akka cluster, en then directly target an actor on an instance, or use one of the cluster features. It pretty much boils down to the specific use case.