Sorry for late reply here... On Wed, May 24, 2017 at 5:53 AM, Dai Yinhua <[email protected]> wrote:
> I'm using akka cluster sharding to build for *a long connection > streaming *distributed calculation engine. > It's driven by request, basically for each request, there will be one > entity actor started for calculation of that request, and this is a > streaming request, which means the calculation actor will generate endless > calculation result and sending back to client. > > How should I do rolling update in this case to avoid data interrupt to the > client? > > I am thinking of this way: > 1. set remember-entities to on > 2. upgrade application node by node, when some node is upgrading, all > entities will be re-balanced to other available nodes so there should be a > very short time outage(time cost for moving actor) for the calculation. > 3. after all nodes have been upgraded, auto re-balance will be happened > again to balance the load to the whole cluster. > > Is this an feasible solution? > Sounds good. Don't use remember entities if you don't have to. It has some overhead, and can put a lot of load on the system when many are recovering at the same time. Often it's better to let the entities recover when the first message is sent. You will see better rolling upgrades if you leave the oldest node until last, because the shard coordinator is running on that node and it's better to keep it running as long as possible. > > And another question which bother me is that with "remember-entites" is > set to "on", I can't find a place to call > *shardRegion.tell(ShardRegion.gracefulShutdownInstance(), > null);* > to really shutdown all entites in the shard region? > Use Akka 2.5.2, then this is handled automatically by the new Coordinated Shutdown: http://doc.akka.io/docs/akka/current/scala/project/migration-guide-2.4.x-2.5.x.html#coordinated-shutdown Cheers, Patrik > > Thank you. > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Akka Tech Lead Lightbend <http://www.lightbend.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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
