Search code examples
multithreadingscalaakkaactor

Replacing bad performing workers in pool


I have a set of actors that are somewhat stateless and perform similar tasks. Each of these workers is unreliable and potentially low performing. In my design- I can easily spawn more actors to replace lazy ones.

The performance of an actor is assessed by itself. Is there a way to make the supervisor/actor pool do this assessment, to help decide which workers are slow enough for me to replace? Or is my current strategy "the" right strategy?


Solution

  • I'm new to akka myself, so only trying to help, but my attack would be something along the following lines: