Practice this topic in a realistic system design interview
Leader election is the process of choosing one node to coordinate work for a group.
A leader might:
The leader role simplifies many systems because one node decides the order of operations. The hard part is keeping that role safe when machines crash, networks partition, clocks drift, or old leaders keep running after losing contact with the cluster.
Every node does not need to know the leader instantly. Only a valid leader should be able to make decisions that matter.