Replies: 2 comments 4 replies
-
There is no one true way to use .NEXT Raft in K8s environment. Instead, there are many ways much or less convenient in your circumstances. I can provide a quick overview of how it was applied in one of the companies that uses the library.
Or you can implement background service as a part of your node and poll a list of nodes through Service abstraction and compare the list with the actual list of cluster members. If there are changes, just apply them to the configuration if the current node is a leader node. Another way is to implement K8s Operator. |
Beta Was this translation helpful? Give feedback.
-
In the worst scenario, it can switch Leader node many times when deploying new build to k8s. Let's say we have 5 nodes in the cluster, k8s can deploy to the leader node first which will make the cluster select a new Leader, k8s finish deploying first node and now move on to next which happen to be the new Leader, and keep being unlucky in this way and switch Leader node 5 times for the whole process. In our case switching Leader node will have some negative impact due to the replication process, is there a more graceful way for the deployment so that it need to change Leader only once? Is there a way we can somehow influence the leader selection algorithm to choose a node that has been just upgraded? thanks @sakno |
Beta Was this translation helpful? Give feedback.
-
hi,
I had a couple of questions on the usage, when hosting on K8s./Openshift. Lets say my Asp.Net Core API is hosted on Openshift, So when trying to join a pod instance to the RAFT cluster, do we need to still join the cluster using IP and port only or is there alternative option? Also since IPs will be random assigned, whenever the pod comes up, how will a specific instance know which cluster join? It would be helpful, if we have specific examples around usage on K8s.
Also, if API is hosted on 2 different K8s cluster, is it possible to join a single Raft cluster as the IP of the pods will be internal to that K8s/Openshift cluster. Typically for outside Openshift cluster access, we use routes which gives a load balanced URL. So behind the route, based on my deployment configuration, I could be running 1 pod, 2 pod or 10 pods. So in such cases, how do I ensure that every pod instance joins the Raft cluster?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions