Term (distributed systems)
In distributed consensus protocols like the Raft algorithm, a term is a monotonically increasing logical clock that uniquely identifies a leadership epoch. Each term begins with a leader election and ends when the leader fails or is deposed. Nodes track the current term and reject any message from a lower term, ensuring that stale leaders cannot issue new commands.
The term mechanism is Raft's solution to the stale-leader problem: a node that has been partitioned from the majority may continue to believe it is the leader, but because it cannot advance its term, all other nodes will reject its proposals once the partition heals. This transforms a coordination problem into an ordering problem — the higher term always wins.
Terms are not unique to Raft. The same concept appears in Paxos as proposal numbers, and in blockchain systems as block heights. What Raft calls a term is a specific instance of the more general pattern of logical clocks in distributed systems.