Qualification parameters for captain selection in a search head cluster
Abstract
Embodiments of the present disclosure provide solutions for determining an elected search head captain is unqualified for the position, identifying a more qualified search head, and transferring the captain position to the more qualified search head. A method is provided that includes referencing qualification parameters in an elected search head captain, determining whether the newly elected search head captain is qualified for the position based on the parameters, identifying a more qualified search head to be the search head captain if the newly elected search head captain is determined to be unqualified for the position, and transferring the position of captain to the more qualified search head. The qualification parameters may include, for example, a pre-determined static flag set by an administrator of the search environment, and configuration replication status that corresponds to the most recent configuration state of the search head as recorded by the previous search head captain.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method for search head captaincy selection, the method comprising:
in a search head cluster comprising a search head captain and a plurality of search heads of a search environment, retrieving, by a first search head in the search head cluster, wherein each search head of the plurality of search heads in the search head cluster coordinates with other search heads in the search head cluster to execute searches on one or more indexers comprised within a data intake and query system, a set of captaincy qualification parameters corresponding to each search head of the search head cluster, wherein the set of captaincy qualification parameters indicates whether a particular search head qualifies to be the search head captain and comprises a preference flag corresponding to the particular search head, the preference flag comprising a static indication of whether the particular search head has been pre-selected as a preferred search head to be the search head captain for the search head cluster, wherein the set of captaincy qualification parameters is stored in a data structure accessible to each search head of the search head cluster, and wherein the data structure stores metadata corresponding to interactions between search head captains and search heads in the search head cluster;
determining, by the first search head, that it is not qualified to be the search head captain for the search head cluster based on the set of captaincy qualification parameters corresponding to the first search head;
identifying, by the first search head, based on the set of captaincy qualification parameters, a second search head in the search head cluster that is qualified to be the search head captain; and
transferring captaincy of the search head cluster to the second search head.
2. The method of claim 1 , wherein the preference flag comprises a static indication of whether the particular search head has been pre-selected by an administrator of the search environment as a preferred search head to be the search head captain for the search head cluster.
3. The method of claim 1 , wherein the preference flag comprises a Boolean indication of whether the particular search head has been pre-selected as a preferred search head to be the search head captain for the search head cluster.
4. The method of claim 1 , wherein the preference flag comprises a static indication of whether the particular search head has been pre-selected as a preferred search head to be the search head captain for the search head cluster based on at least one: of a physical locality of the particular search head, and a computing capability of the particular search head.
5. The method of claim 1 , wherein the set of captaincy qualification parameters for the particular search head further comprises a configuration replication status corresponding to the particular search head, the configuration replication status being based on a last interaction between the particular search head and the search head captain of the search head cluster.
6. The method of claim 1 , wherein the set of captaincy qualification parameters for the particular search head further comprises a configuration replication status corresponding to the particular search head, the configuration replication status being based on a timestamp of a last interaction between the particular search head and the search head captain of the search head cluster.
7. The method of claim 1 , wherein the set of captaincy qualification parameters for the particular search head further comprises a configuration replication status corresponding to the particular search head, the configuration replication status being indicative of whether a last interaction between the particular search head and the search head captain of the search head cluster exceeds a pre-determined threshold duration.
8. The method of claim 1 , wherein the set of captaincy qualification parameters for the particular search head comprises a configuration replication status corresponding to the particular search head, the configuration replication status being indicative of whether a timestamp of a last interaction between the particular search head and the search head captain of the search head cluster exceeds a pre-determined threshold duration relative to timestamps of last interactions between other search heads of the search head cluster and the search head captain.
9. The method of claim 1 , wherein the set of captaincy qualification parameters comprises a configuration replication status corresponding to each search head of the search head cluster, the configuration replication status of the particular search head of the search head cluster being based on a last interaction between the particular search head and the search head captain,
further wherein the configuration replication status for each search head is periodically updated by the search head captain.
10. The method of claim 1 , wherein the set of captaincy qualification parameters comprises a configuration replication status corresponding to each search head of the search head cluster, the configuration replication status of a particular search head of the search head cluster being based on a last interaction between the particular search head and the search head captain,
wherein a persistent communication thread is maintained between the search head captain and each search head of the search head cluster;
further wherein the configuration replication status for a particular search head is periodically updated by the search head captain of the search head cluster based on a status communication sent via the persistent communication thread maintained between the particular search head and the search head captain.
11. The method of claim 1 , wherein the retrieving the set of captain qualification parameters is performed in response to the first search head being elected the search head captain of the search head cluster.
12. The method of claim 1 , wherein the transferring captaincy to the second search head comprises transferring captaincy from the first search head to the second search head.
13. The method of claim 1 , wherein the transferring captaincy to the second search head comprises:
communicating, to the second search head, a request for the second search head to initiate a captain election protocol;
receiving a request for a vote for the second search head to be the next search head captain of the search head cluster via the captain election protocol; and
submitting a vote for the second search head to be the next search head captain of the search head cluster.
14. The method of claim 1 , wherein each search head of the search head cluster maintains a captain-response timer corresponding to that particular search head, the captain-response timer being configured to countdown the time between a time a communication from the particular search head is sent to a current search head captain in the search head cluster and a time a responsive communication from the current search head captain is received by the particular search head,
further wherein the particular search head initiates a captain election protocol when the captain-response timer corresponding to the particular search head expires.
15. The method of claim 1 , wherein the set of captaincy qualification parameters for the particular search head of the search head cluster comprises at least a flag indicative of a preference for the particular search head to be the search head captain, and a configuration replication status corresponding to the particular search head corresponding to a timing of a last configuration replication performed between the particular search head and the search head captain,
further wherein determining the first search head is not qualified to be the current search head captain comprises determining either that the flag indicative of the preference for the first search head is set to false, or that the configuration replication status corresponding to the first search head indicates that the last configuration replication between the first search head and a last search head captain exceeds a threshold duration.
16. The method of claim 1 , wherein the retrieving the set of captain qualification parameters is performed in response to the first search head being elected the search head captain of the search head cluster, and wherein an election protocol to elect the first search head comprises a Raft Consensus Algorithm.
17. The method of claim 1 , wherein the retrieving the set of captain qualification parameters by the first search head comprises accessing the set of captaincy qualification parameters in the data structure, wherein the data structure is selected from a group including a lookup table and a key-value store.
18. A non-transitory computer-readable medium having computer-readable program code embodied therein for causing a computer system to perform a method of search head captaincy selection, the method comprising:
in a search head cluster comprising a search head captain and a plurality of search heads of a search environment, retrieving, by a first search head in the search head cluster, wherein each search head of the plurality of search heads in the search head cluster coordinates with other search heads in the search head cluster to execute searches on one or more indexers comprised within a data intake and query system, a set of captaincy qualification parameters corresponding to each search head of the search head cluster, wherein the set of captaincy qualification parameters indicates whether a particular search head qualifies to be the search head captain and comprises a preference flag corresponding to the particular search head, the preference flag comprising a static indication of whether the particular search head has been pre-selected as a preferred search head to be the search head captain for the search head cluster, wherein the set of captaincy qualification parameters is stored in a data structure accessible to each search head of the search head cluster, and wherein the data structure stores metadata corresponding to interactions between search head captains and search heads in the search head cluster;
determining, by the first search head, that it is not qualified to be the search head captain for the search head cluster based on the set of captaincy qualification parameters corresponding to the first search head;
identifying, by the first search head, based on the set of captaincy qualification parameters, a second search head in the search head cluster that is qualified to be the search head captain; and
transferring captaincy of the search head cluster to the second search head.
19. A system comprising:
a processing device comprised in a first search head in a search head cluster of a search environment, wherein the search head cluster comprises a search head captain, wherein each search head of the plurality of search heads in the search head cluster coordinates with other search heads in the search head cluster to execute searches on one or more indexers comprised within a data intake and query system, the processing device being configured to:
retrieve a set of captaincy qualification parameters corresponding to each search head of the search head cluster, wherein the set of captaincy qualification parameters indicates whether a particular search head qualifies to be the search head captain and comprises a preference flag corresponding to the particular search head, the preference flag comprising a static indication of whether the particular search head has been pre-selected as a preferred search head to be the search head captain for the search head cluster, wherein the set of captaincy qualification parameters is stored in a data structure accessible to each search head of the search head cluster, and wherein the data structure stores metadata corresponding to interactions between search head captains and search heads in the search head cluster;
determine whether the first search head is qualified to be the search head captain for the search head cluster based on the set of captaincy qualification parameters corresponding to the first search head;
identify, based on the set of captaincy qualification parameters, a second search head in the search head cluster that is qualified to be the search head captain; and
transfer captaincy of the search head cluster to the second search head when the first search head is determined not to be qualified to be the search head captain.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.