July 2015
Beginner to intermediate
162 pages
3h 31m
English
We previously saw how we can configure a simple cluster health check to ensure that a given number of nodes were present to support the application. However, should we need more detailed control over the quorum definition beyond a simple node count check, we can create our own quorum function that will allow us to programmatically define what it means to be healthy. This can be as simple or as complex as what the application requires. In the following example, we sourced an expected cluster size (probably from a suitable location than a hard-coded) and dynamically checked whether a majority of the nodes are present:
public class QuorumExample { public static void main(String[] args) throws Exception { QuorumConfig quorumConf = ...Read now
Unlock full access