This is the same feature as Akka's ClusterSingleton.
The idea is the following (from Konrad):
pick the leader (from Membership), and if you are the leader you spawn it, if you are not you kill it (and all nodes run code looking at who is leader and have the actor “ready to spawn”)