I don't know about the serialization. Sounds strange.

However, note that consistent hashing pool often doesn't make much sense in
a cluster, since routees of the pools are not shared between different
nodes. Group router is typically better, or Cluster Sharding if more strict
routing is needed.

/Patrik
lör 22 juli 2017 kl. 10:36 skrev Assaf A <assaf.abula...@gmail.com>:

> Hi,
>
> My application has a cluster router pool of stateful actors using
> consistent hashing,
> the app may work as a single node or scale out with multiple nodes.
> The router passes an object that implements consistent hashable which
> returns an integer as the hashing key.
> (the object itself has about 20 string and int fields, and 4 domain
> fields. both the object and the domain references are serialized using kryo)
>
> I did some profiling of the app while working with a single node,
> and it seems that the app spends a lot of cpu serializing using the java
> serializer within the ConsistentHashingRoutingLogic class.
>
> When running as a single node, I didn't expect to see any serialization
> taking place,
> is it something that the ConsistentHashingRoutingLogic does because I'm
> using it within a cluster router?
>
> Since I wrote the app 3 years ago, I've noticed that akka sharding was
> released.
> would using sharding minimize serialization when the traffic belongs on
> the same node?
>
> Is there a difference between using a consistent hashing router and using
> akka sharding in this use case?
>
>
>
> router configuration:
>
> actorSystem.actorOf(
>         new ClusterRouterPool(new ConsistentHashingPool(totalInstances),
>                 new ClusterRouterPoolSettings(totalInstances, *threads*,
>                         true, 
> useRole)).props(Props.create(MyRouter.class)).withDispatcher("router-dispatcher"),
>  "myRouter");
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to