How to safely terminate services, especially those that manage Persistent Entities?

How to safely terminate services, especially those that manage Persistent Entities?

This is already handled via Akka's CoordinatedShutdown, and Play and Lagom, both using Akka, have wired their lifecycles to this mechanism. They are set up such that when a SIGTERM signal is received, an orchestrated termination happens. In that termination, the node being SIGTERM'd notifies the peers it is leaving the cluster, entities running locally are removed and, eventually, moved to another node. Finally, direct TCP connection between nodes of the cluster is shutdown.
    • Related Articles

    • How to safely terminate services, especially those that manage Persistent Entities?

      This is already handled via Akka's CoordinatedShutdown, and Play and Lagom, both using Akka, have wired their lifecycles to this mechanism. They are set up such that when a SIGTERM signal is received, an orchestrated termination happens. In that ...
    • Should Kafka act as the source of truth in Lagom?

      > We are using Lagom with event sourcing and CQRS. Would you say that keeping the source of truth on the Kafka side is an option? Pragmatism always wins the day, and with that being said this idea has plenty of merit. The only concern we have with ...
    • How to do Rate Limiting in Akka Streams

      In certain scenarios it is important to limit the number of concurrent requests to other services. For example, to avoid overwhelming the services and avoid performance degradation, or to maintain service level agreements. This is particularly ...
    • How to run some Lagom services instead of one or all

      Currently, Lagom’s built-in tooling allows for running a single service via run or all of them via runAll. In some cases you may find it more convenient to run a specific subset of services. The simplest solution for this is to create ...
    • Does Lagom support multitenancy?

      Our suggestion is to not go down this path. Multi-tenancy was very popular back in the time when people used to deploy one single application on a huge application server. In the era of cloud computing, it's much easier to have different deployments, ...