Fault tolerance

The key to a fault-tolerant application is to make use of the supervisors and lifecycle monitoring techniques. These techniques can be used to manage not only the local actors, but also remote actors. The supervisor hierarchy can be composed of local and remote actors. Similarly, the application can monitor remote actors for Termination messages. We cover remote actors in more detail in Chapter 9, Remote Actors.

In a large, distributed application, actors can fail when:

  • There is a logic programming error when the message is received (for example, you received a message with incomplete data)
  • There is a failure of an external resource on which the actor is dependent (for example, database connection, socket connection, file connection, ...

Get Akka Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.