I have some runtime data that I would like to place in the assigned actor on each node in my Akka cluster, which could be updated using an internal event or an API call for one node. I could store this data in a shared database to make it persistent, but I would rather store it in memory for speed, since it does not need to be saved. Akka Cluster Singleton, Distributed Pub Sub, and possibly other built-in modules use gossip protocols to synchronize the distributed state.
Is there any ready-made way to synchronize the data of my own members in my cluster?
I thought about just posting changes to Submitted by Distributed Pub Sub, but it seems like it would not be resistant to discarding messages. If I saved it in a singleton cluster, it would not survive if this node were down. I don't need persistence if the whole cluster goes down, but I want stability if the individual nodes did.
acjay source
share