Split-brain resolver architecture decision log
It would be good to mention why is Lithium chosen as the akka split brain resolver and maybe explain it's configuration and behavior in the cluster or architecture documentation. How well tested is it? Can it be swapped out with other SBRs? What's it's configuration and how to override (if it makes sense for the NSDb use case).
Hi @schrepfler,
thanks for your interest in NSDb.
We have in our plans to write more detailed documentation about split-brain resolution (SBR) and also to release a series of blog posts which gives a
better overview of the NSdb architecture; from the basics (why Akka cluster etc.) to the more advanced topics (SBR).
To give you a quick answer to your questions, as for now, Lithium is configured with the keep-majority strategy.
That is, based on our use cases, the more suitable for a pure p2p architecture with a non-determined number of nodes.
Lithium was a quite straightforward choice. That project, in fact, implements a wide variety of strategies that might fit almost every use case,
and it's open-source.
We will keep this task open for tracking the work related to the documentation improvement and evaluate whether to include in our roadmap a feature that would allow swapping to another SBR
Lightbend just opened their official SBR. Do we want to move to it? It has been properly tested.
Hi @schrepfler, the release of the Lightbend SBR is, indeed, very good news! And for sure it is very well tested and, moreover, developed by the creators of Akka itself. On the other hand, the plugin that we are currently using (https://github.com/SwissBorg/lithium) is well tested too (even though it might not appear because not all the tests are included in the CI), and, afaik, still under active development. Also, the author, put a big effort into the development of its plugin while the "official" one was not publicly available.
The easiest and quickest way to proceed would be to switch to the Lightbend SBR which is included in the Akka codebase, relying completely on the Akka contributors. But, IMHO, from the open source community perspective, an ideal and fair way to proceed could be to
- perform a comparative analysis between Lightbend and Lithium SBR in terms of solidity, stability, features and strategies supported
- identify any possible improvements that can be added to the Akka source code (with all the credits deserved by the author)
- contribute to the Akka project providing the above identified additions.
- eliminate the plugin choice dilemma once the lithium plugin will be "merged" into the Akka codebase
Speaking specifically about NSDb, I guess that a comparative analysis is necessary in any case, then we can evaluate if Lithium plugin still covers all our requirements and decide whether to switch plugin in the near future or to wait and see if the community would work in the (maybe utopistic) direction of merging the two efforts.