akka-cluster

akka-streams with akka-cluster

让人想犯罪 __ 提交于 2019-12-10 17:33:18
问题 My akka-streams learn-o-thon continues. I'd like to integrate my akka-streams application with akka-cluster and DistributedPubSubMediator. Adding support for Publish is fairly straight forward, but the Subscribe part I'm having trouble with. For reference, a subscriber is given as follows in the Typesafe sample: class ChatClient(name: String) extends Actor { val mediator = DistributedPubSub(context.system).mediator mediator ! Subscribe("some topic", self) def receive = { case ChatClient

Akka cluster-sharding: Can Entry actors have dynamic props

为君一笑 提交于 2019-12-08 15:55:40
问题 Akka Cluster-Sharding looks like it matches well with a use case I have to create single instances of stateful persistent actors across Akka nodes. I'm not clear if it is possible though to have an Entry actor type that requires arguments to construct it. Or maybe I need to reconsider how the Entry actor gets this information. Object Account { def apply(region: String, accountId: String): Props = Props(new Account(region, accountId)) } class Account(val region: String, val accountId: String)

Akka cluster setup with play framework

隐身守侯 提交于 2019-12-08 00:08:52
问题 I'm currently trying to implement a clustered play + akka implementation with an auto discovery service. However, I seem to be running into issues with the Guice DI loader that's included with play. The excerpt from their documentation states: https://www.playframework.com/documentation/2.5.x/ScalaAkka#Integrating-with-Akka While we recommend you use the built in actor system, as it sets up everything such as the correct classloader, lifecycle hooks, etc, there is nothing stopping you from

Akka cluster setup with play framework

醉酒当歌 提交于 2019-12-06 07:32:32
I'm currently trying to implement a clustered play + akka implementation with an auto discovery service. However, I seem to be running into issues with the Guice DI loader that's included with play. The excerpt from their documentation states: https://www.playframework.com/documentation/2.5.x/ScalaAkka#Integrating-with-Akka While we recommend you use the built in actor system, as it sets up everything such as the correct classloader, lifecycle hooks, etc, there is nothing stopping you from using your own actor system. It is important however to ensure you do the following: Register a stop hook

Create actor on any unspecified/random node in cluster

蹲街弑〆低调 提交于 2019-12-05 20:57:26
It is possible to programmatically create an actor on a remote node, if you specify the exact node . However, I would like to simply ask the actor system to create an actor on a random, or perhaps the least utilised node. Is it possible to create an actor on any remote node given an optional node role? In Akka 2.3 you should use Cluster Aware Routers All routers can be made aware of member nodes in the cluster, i.e. deploying new routees or looking up routees on nodes in the cluster. So you can use RnadomPool, RoundRobinPool or BalancingPool router in your case. See also Remote Deployed

max number of actors per host in akka

空扰寡人 提交于 2019-12-05 11:19:35
How many max actors can we have on one box in akka? public void MyActor extends AkkaActor{ receive(Objet obj){ // so something } } 1)Is there some limit on max number of actors instances?I am planning to created around 10K actors on one box. I will have 50 such boxes so that i can scale horizontally 2)IS there some performance problems with this? It is just a matter of having enough memory: the overhead of one actor is roughly 400 bytes (plus whatever state you keep within it). This means that on typical systems you can have millions of actors. The performance does not depend on the number of

“max allowed size 128000 bytes, actual size of encoded class scala” error in akka remoting

[亡魂溺海] 提交于 2019-12-04 02:40:01
I want to use Akka Remoting to exchange message over network between actors, but for large String message i got the following error: akka.remote.OversizedPayloadException: Discarding oversized payload sent to Actor :: max allowed size 128000 bytes , actual size of encoded class scala. How can i fix this limitation? I add the following configuration and now everything is ok: akka { actor { provider = "akka.remote.RemoteActorRefProvider" } remote { maximum-payload-bytes = 30000000 bytes netty.tcp { hostname = "127.0.0.1" port = 2552 message-frame-size = 30000000b send-buffer-size = 30000000b

Kubernetes - Akka clustering Deployment

时光总嘲笑我的痴心妄想 提交于 2019-12-03 16:50:54
We have a docker image and a corresponding yaml file for the deployment using kubernetes. The application we have built is in scala with akka-http. We have used akka-cluster. We have a particular variable(seed-nodes in our case - akka cluster) in the configuration file which is used in our application code that uses the pod ip. But, we will not get the pod ip unless the deployment is done. How should we go about tackling the issue? Will environment variables help, if yes how? More specifically, Once the docker images is deployed in the container in a pod, and when the container starts, the pod

Tuning message frequency based on cluster load

泄露秘密 提交于 2019-12-01 12:04:54
问题 I am writing a simple homogenous cluster application using Akka 2.2.3 and Scala; a particle filtering algorithm in which each node shares data with other cluster members at random points in time. It's currently a research application, not a business critical system. At present, every node sends a fixed size message to a randomly selected node each second. This works, but I have concerns regarding performance when scaling (e.g. cloud versus local) Nodes may get overloaded sending data Nodes