This document is going to discuss the design of quorum server (TiebreakerServer)
The quorum server keeps a list of HACluster.
Each HACluster represents a HA cluster configured in this quorum server.
1. How to configure the quorum server, using configure file? 1.5 What do we need to configure for each cluster? Authentication key? 2. Should we allow the quorum server to add unknown cluster at run-time?
The HACluster includes a list of struct SubCluster.
Each SubCluster represents a subcluster connecting to the quorum server.
In normal situation, there is only one SubCluster in HACluster.
The SubCluster includes the score(weight) of the subcluster.
The SubCluster also includes the timestamp of last update.
The leader of each subcluster will keep the connection with the quorum server.
The leaders will send the scores of their own subclusters to the quorum server periodically .
The quorum server will reply with "HAVEQUORUM" or "NOQUORUM".
If a subcluster hasn't updated its score for a pretty long time (deadtime), or the connection broken, it will be removed from HACluster.
Which subcluster has the quorum is decided the current scores of all subclusters of the cluster.
Before the quorum server tells a subcluster has quorum, it should make sure that the previous quorum holder has been notified.
Because the quorum server may serve multi-version HA clusters, the quorum calculating should be a plugin.
Only the leader of a subcluster will connect to the quorum server.
Should we use some authentication here? How?
The message sent to the quorum server should include following information.
Should we encrypt the message here? What is format of the message ? ha_msg? If we use ha_msg, it looks that there is no tcp/ip socket GSource support in current code. So it may need convert the message to buf/string forth and back on the two sides.
Now the quorum is calculated on each node just before send the memebership info to the clients of CCM. To support the quorum server, the quorum will be calculated only on the leader node everytime the memebership changed. Then the leader will broadcast the quorum status to other nodes in the subcluster. The other nodes will store the quorum status for query later.
Should we apply this way to non-split-site cluster ?
If the quorum status from the quorum server changed, the leader will send out the new membership message.
The CCM layer doesn't know the score of nodes now. It needs get the scores of nodes from the heartbeat layer.
And to calcuate the score of subcluster also need the concept of side.
Does this formula work?
score of subcluster = sigma ( score of node x score of node's side ) the score of site? does site have score?