Hi Patrik,
Thank you for your answer. It helped me to better understand what I need.
However, I still didn't find good solution. I need one routee on each node
which has the role of managing all tasks delegated by load balancer router.
One of the option is to have a router only on one main node, and it would
work, but I don't like the idea to have router on one node only, as it's
not failure safe.
The other option as you suggested is to create group, but for some reason
router delegates job only to the local node. It never employs remote nodes.
Here is the code that I'm using to setup ClusterRouterGroup on each node.
Is there any reason you can see here why AdaptiveLoadBalancer is not
working as it should?
int totalInstances = 100;
> boolean allowLocalRoutees = true;
> String useRole = null;
> Iterable<String> routeesPaths =
> Arrays.asList("/user/clusterManager", "");
> ClusterRouterGroupSettings settings=new
> ClusterRouterGroupSettings(totalInstances,routeesPaths,allowLocalRoutees,useRole);
> AdaptiveLoadBalancingGroup group=new AdaptiveLoadBalancingGroup(
> MixMetricsSelector.getInstance(), Collections.<String>
> emptyList());
> ActorRef backend = getContext().actorOf(
> new ClusterRouterGroup(group,settings).props());
> crawlerManager = getContext().actorOf(
> Props.create(CrawlerManagerActor.class),"clusterManager");
>
Thanks,
Zoran
On Thursday, 5 December 2013 12:04:23 UTC-8, Zoran Jeremic wrote:
>
> Hi,
>
> I created application following the tutorial
> http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
> I have 2 nodes having 1 front-end and 1 back-end on each. Backend is
> initiated as AdaptiveLoadBalancingPool and it is subscribed to memberUp
> events.
> I implemented registration of backends through the processing of
> CurrentClusterState and MemberUp messages in the same way as described in
> Worker Dial-in Example of the tutorial. However, the problem is that I end
> up with 12 registered backends on each node.
>
> Do you have any idea what could be the problem there?
>
> Thanks,
> Zoran
>
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.