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 ...
    • 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, ...
    • Can I customize error handling in Lagom?

      Yes, the best way to customize error handling in Lagom is to use a custom ExceptionSerializer.  This Knoldus blog post explains it well: https://blog.knoldus.com/2018/02/05/exception-serializer-in-lagom/ That example, however, is more focused on how ...
    • How to implement versioning in Lagom microservices?

      Lagom doesn't provide any solution, plugin or feature that enables API versioning. However you can use the following to decide and pick what works best for you: When versioning you must keep in mind both the service endpoints and payloads and the ...