Cluster
Overview
The cluster engine depends upon the discovery mechanism to find other nodes in the cluster. Under the hood, it leverages Olric to scale out and guarantee performant, reliable persistence, simple scalability, partitioning (sharding), and re-balancing out-of-the-box. It requires remoting to be enabled. One can implement a custom hasher for the partitioning using the Hasher interface and the Actor System
option to set it. The default hasher uses the XXH3 algorithm
.
At the moment the following providers are implemented:
kubernetes api integration is fully functional
NATS integration is fully functional
DNS is fully functional
Static is fully functional and for demo purpose
Note: One can add additional discovery providers using the following discovery provider.
Operations Guide
The following outlines the cluster mode operations which can help have a healthy GoAkt cluster:
One can start a single node cluster or a multiple nodes cluster.
One can add more nodes to the cluster which will automatically discover the cluster.
One can remove nodes. However, to avoid losing data, one need to scale down the cluster to the minimum number of nodes which started the cluster.
Actors Recreation
When a node leaves the cluster, as long as the cluster quorum is stable, its actors are redeployed on the remaining nodes of the cluster. The redeployed actors are created with their initial state. Every field of the Actor set using the PreStart
will have their value set as expected. On the contrary every field of the Actor will be set to their default go type value because actors are created using reflection.
Discovery Providers
GoAkt ships with a discovery provider API that can help any developer to extend GoAkt cluster capability. See Discovery Providers
Client
The GoAkt client facilitates interaction with a specified GoAkt cluster, contingent upon the activation of cluster mode. See Client
Last updated