Hi Asad, > The term counter is incremented everytime a new leader is elected
More precisely, the (local) term counter is incremented whenever a server starts a leader election. > ... what is the expected value of the term? Should it stay relatively static? ... The term should be fixed to a particular value if there is no leader election. Note that the initial leader election may increment the term more than one time since the first leader election may not succeed. > ... If it goes up to 50 or 100 is that a sign something is unstable? It does indicate that there are multiple (abnormal) leader elections. The cluster health may not be good. Or the cluster may be too busy, such as gc, so that the leader becomes too slow to maintain its leadership. Increasing the rpc timeout (raft.server.rpc.timeout.min) may help in such cases. Thanks for your questions. Hope it helps! Tsz-Wo On Tue, Jul 26, 2022 at 6:36 AM Asad Awadia <[email protected]> wrote: > Hello, > > My understanding: The term counter is incremented everytime a new leader > is elected > > Question: in the happy path/stable cluster scenario - what is the expected > value of the term? Should it stay relatively static? 1? If it goes up to 50 > or 100 is that a sign something is unstable? > > Regards, > Asad >
