System and method for designating a leader using a consensus protocol within a database management system
A networked database management system (DBMS) is disclosed. In particular, the disclosed DBMS includes a plurality of nodes, one of which is elected as a designated leader. The designated leader is elected using a consensus algorithm, such as tabulated random votes, RAFT or PAXOS. The designated leader is responsible for managing open coding lines, and determining when to close an open coding line.
1. A database management system comprising:
a plurality of coding clusters of the database management system, wherein a coding cluster of the plurality of coding clusters stores data and includes:
a plurality of nodes, wherein each node of the plurality of nodes includes a server having a network interface,
wherein the plurality of nodes include a designated leader node and at least two other nodes,
wherein the designated leader node assigns one of the at least two other nodes to be an aggregation node that collects and aggregates performance data associated with the plurality of nodes,
wherein the designated leader node creates a collection of coding lines that are associated with the plurality of nodes, maintains the collection of coding lines, maintains an inventory of open coding lines of the collection of coding lines, and creates, in response to a request from one of the at least two other nodes, a new open coding line to add to the collection of coding lines,
wherein the maintaining includes keeping open a minimum number of coding lines of the collection of coding lines,
wherein, in response to an election event, a majority of the plurality of nodes elect a new designated leader node to become the designated leader node using a consensus protocol, and
wherein the consensus protocol includes nodes of the plurality of nodes randomly voting for any node of the plurality of nodes; and
a high-speed hardware switch coupled to the network interface of each node of the plurality of nodes, wherein the high-speed hardware switch allows each node to communicate with other nodes of the plurality of nodes.
2. The database management system of claim 1 , wherein the designated leader node creates a new open coding line to add to the collection of coding lines when the inventory of the open coding lines is empty.
3. The database management system of claim 1 , wherein the election event includes one or more of: the majority of the plurality of nodes losing contact with the designated leader node; a verified failure of the designated leader node; and a system startup.