liveBook · Manning

Fault-tolerant workload

As explained in Akka in Action, Second Edition

A fault-tolerant application is software designed to continue providing acceptable operation despite component failures.

A fault-tolerant workload continues acceptable operation when components fail. Actor-based designs keep domain logic on the happy path and move recovery decisions into supervision. section 5.1.2

Actor supervision handles a failed message-processing actor through predefined strategies:

  • Restart recreates the actor while preserving its ActorRef and mailbox for subsequent messages. section 5.1.2
  • Resume keeps the same actor instance processing messages and logs the exception. section 5.1.2
  • Stop terminates the actor so it no longer processes messages. section 5.1.2
  • While supervision decides, the failing actor’s mailbox is suspended; incoming messages are stashed. section 5.1.2
Figure 5.6 Supervisor wrapping an actor’s behavior and deciding on a recovery action after an exception
CH05_F06_Abraham2

Use the supervisor-wrapping-actor diagram to distinguish business processing from exception recovery and strategy selection. section 5.1.2

How Akka in Action, Second Edition covers it

How deep it goes
Explains mailbox suspension, stashing, and restart, resume, and stop strategies, but defers failed-message recovery details.
Examples
Uses a failing message-processing actor, suspended mailbox, stashed messages, and three supervisor decisions.
What you can do after
Operate/configure actor supervision by choosing whether a faulty actor restarts, resumes, or stops.
How it connects
Connects actor supervision with exceptions, mailboxes, messages, ActorRef, and domain logic.

This explainer was generated by Manning's knowledge graph from the text of Akka in Action, Second Edition. The section links point to the parts of the book it draws on.