Version 1.0
Master ------> Worker0
--> Worker1
...
--> WorkerN
Master and WorkerX are just cluster's nodes. Each node prints cluster state each 1 minute. The Master sends some DebugEvent to cluster nodes via some balancer.
- Scala: 2.11.8
- Akka: 2.5.9
- JRE: 8
1) Set static mode at core/main/resources/application.conf
:
aws.cluster.staticConfig = true
2) Set current and sibling's IP and ports at <module>/core/main/resources/application.conf
3) Start master module
$ sbt
> project master
> container:start
4) Start worker module
$ sbt
> project worker
> container:start
See below screenshot and comments for the local testing:
1) Set dynamic mode at core/main/resources/application.conf
:
aws.cluster.staticConfig = false
2) The following ports should be allowed in EC2 environment: 2551
, 3000
, 5000
. Also a port biding is used in this mode automatically (at com.example.util.EC2Utils).
See Akka behind NAT or in a Docker container for more details.
3) Deploy to EC2/dockers
4) See logs
https://github.com/chrisloy/akka-ec2
https://medium.com/@ukayani/deploying-clustered-akka-applications-on-amazon-ecs-fbcca762a44c
https://github.com/hseeberger/constructr
https://github.com/typesafehub/constructr-zookeeper
http://grokbase.com/t/gg/akka-user/153s1neq95/2-3-9-cluster-unstable-on-ec2