I think you can randomly delay start of the entity actors by using a supervisor actor (similar to the BackoffSupervisor). By the way, I will fix the passivation issue in the BackoffSupervisor.
/Patrik On Mon, Nov 9, 2015 at 1:51 PM, Brice Figureau <[email protected]> wrote: > Hi, > > I have a ClusterSharding whose remembered entries are PersistentActors, > using the cassandra journal. > > The problem is if one of the node fails over (or if the cluster is fully > restarted), then all those entries try to recover at the exact same > time, overloading the persistence backend which sometimes is not able to > fulfill all the requests. > > I could use a BackoffSupervisor as parent of those ClusterSharding > entries to restart a bit later the actor in case of recovery failure, > except that it would break passivation, and can lose messages while > waiting for the actor restart. > > I was thinking about triggering the recovery after a random bounded > delay after the actor start, and meanwhile stash all incoming messages, > but it doesn't seem to be possible to trigger a recovery (I think it was > possible in Akka 2.3 since we were sending a message to trigger the > recovery). > > Is there any other options I didn't think about? > -- > Brice Figureau <[email protected]> > > -- > >>>>>>>>>> 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 [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/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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 [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/d/optout.
