I need an Akka cluster to run multiple CPU intensive jobs. I cannot predict how much CPU power I need. Sometimes load is high, while at other times, there isn't much load. I guess autoscaling is a good option, which means, example: I should be able to specify that I need minimum 2 and maximum 10 Actors. The cluster should scale up or down along with a cool off period as load goes up or down. Is there a way to do that? I am guessing, maybe one can make an Docker image of the codebase, and autoscale it using Kubernetes. Is it possible? Is there a native Akka solution? Thanks
Asked
Active
Viewed 640 times
3
-
1You say "minimum 2 and maximum 10" actors.. that's one thing, which akka router/dispatcher/whatever can do. In K8s, this is a _Deployment_ with a certain number of min/max _replicas_, see [docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment). – StephenKing Aug 19 '18 at 12:05
-
@StephenKing alright thanks but how to specify on which server to start autoscaled instance? I don't think that can be done.. or can it? – Apurva Singh Aug 29 '18 at 20:59
-
You should not care about this. It will schedule it wherever resources are available. – StephenKing Aug 29 '18 at 21:08
1 Answers
2
If you consider a project like hseeberger/constructr
and its issue 179, a native Akka solution should be based on akka/akka-management
:
This repository contains interfaces to inspect, interact and manage various Parts of Akka, primarily Akka Cluster. Future additions may extend these concepts to other parts of Akka.
There is a demo for kubernetes.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
2Note to self: That was my **20000th answer** on Stack Overflow (in 119 months), 5 months after the [19000th answer](https://stackoverflow.com/a/49421565/6309). Before that, [18000th answer](https://stackoverflow.com/a/46860745/6309), [17000th answer](https://stackoverflow.com/a/43703956/6309), [16000th answer](http://stackoverflow.com/a/40698777/6309), [15000th answer](http://stackoverflow.com/a/37539529/6309) [14000th answer](http://stackoverflow.com/a/34327286/6309), [1300th answer](http://stackoverflow.com/a/31640408/6309). [12000th answer](http://stackoverflow.com/a/28412501/6309), ... – VonC Aug 19 '18 at 17:13