Terracotta DB 10.1 | Terracotta Server Administration Guide | Electing an Active Server
 
Electing an Active Server
When a new stripe comes online, the first thing the servers within it need to do is elect an active server which will coordinate the client interactions and passive servers within the stripe.
Additionally, if the active server of an existing stripe goes offline, the remaining passive servers need to elect a replacement active server. Note that only passive servers in the STANDBY state are candidates for this role. For related information, see the section Failover.
In either of these situations, the servers involved address this problem by holding an election.
High-level process
In an election, each server will construct a "vote" which it sends to the other involved servers. The vote with the highest score can be determined statically, so each server knows it has agreement on which server won the election.
In the case of a tie, the election is re-run until consensus is achieved.
Vote construction
The vote is a list of "weights" which represent the factors which should be considered when electing the most effective active server. The list is ordered such that the next element is only considered if the current element is a tie. This allows the earlier elements of the vote to be based around important concepts (such as how many transactions the server has processed), then concrete concepts (such as server up-time), ending in more arbitrary concepts designed to break edge-case ties (such as a randomly generated number).

Copyright © 2010-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release