Example producer consumer(s) application that shows how Akka routing can be used to balance the load of the nodes in an Akka Cluster.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project Update scala to 2.11.6 and sbt to 0.13.8 Mar 22, 2015
results updated charts Mar 7, 2015
sigar Initial commit Mar 3, 2015
src Update ConsumerSpec.scala Mar 8, 2015
.gitignore add sh scripts to run on *nix Mar 17, 2015
LICENSE Initial commit Mar 3, 2015
README.md Update README.md Mar 7, 2015
build.sbt Update scala to 2.11.6 and sbt to 0.13.8 Mar 22, 2015
consumer.cmd Added scripts that start nodes Mar 4, 2015
consumer.sh
producer.cmd Added scripts that start nodes Mar 4, 2015
producer.sh
run_with_adaptive.cmd Added scripts that start nodes Mar 4, 2015
run_with_adaptive.sh add jar file check Mar 17, 2015
run_with_round_robin.cmd Added scripts that start nodes Mar 4, 2015
run_with_round_robin.sh
scalastyle-config.xml Initial commit Mar 3, 2015

README.md

akka-cluster-load-balancing

Example producer consumer(s) application that shows how Akka routing can be used to balance the load of the nodes in an Akka Cluster.

diagram

Full description available at blog.kamkor.me

The easiest way to run the example application is to download akka-cluster-load-balancing-assembly-1.0.zip. It contains windows scripts that can run the application with the same setup as in this post. Customize the scripts to change:

  • node hostname and port;
  • seed node(s);
  • producer message send interval;
  • consumer message processing time;
  • memory settings of node;
  • metrics log interval (-Dproducer.metrics-interval-seconds);
  • message size (-Dproducer.data-array-size), if message size is too big, make sure to also update akka maximum-frame-size, receive-buffer-size, send-buffer-size.

Alternatively fork the project, perhaps modify it and use sbt assembly command to build the jar. Then use included windows scripts to execute that jar. The scripts assume that the jar and the sigar directory are present in their directory.