Cluster Sharding(2.4, Java/Groovy)-how to avoid a rebalance during a rolling release?

63 views
Skip to first unread message

Michael Kohout

unread,
Jun 17, 2016, 3:21:07 PM6/17/16
to Akka User List
Hi All-

I'm prototyping a system that will use cluster sharding at a shop where Operations generally does rolling deployments-so it deploys an application one host(of a cluster) at a time.

Is there any way to have Akka avoid rebalancing during these events?  Something that will give us a 20 minute window to do a single machine deployment?

thanks for any suggestions

Michael Kohout

Martynas Mickevičius

unread,
Jun 24, 2016, 1:26:28 AM6/24/16
to akka...@googlegroups.com
Hi,

you can provide a custom shard allocation strategy that during rolling release returns empty set of shards that need to be rebalanced.

--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Siva Kommuri

unread,
Jun 24, 2016, 4:08:46 AM6/24/16
to akka...@googlegroups.com
Interesting. Could you kindly elaborate?

Best wishes,
Siva on 6+

Patrik Nordwall

unread,
Jun 27, 2016, 9:37:22 AM6/27/16
to akka...@googlegroups.com
Custom shard allocation strategy can be defined in an optional parameter to ClusterSharding.start. See the API documentation of ShardAllocationStrategy for details of how to implement a custom shard allocation strategy.


The allocation strategy returns a Future, so you can delegate the call to an Actor, using ask. The actor could be controlled by the operator, e.g. via HTTP or JMX API.

/Patrik


Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Reply all
Reply to author
Forward
0 new messages