Update Aug 30: This article is discussed on Hacker News and lobste.rs.
In distributed systems, for instance when scaling out some workload to multiple compute nodes,
it is a common requirement to select a leader for performing a given task:
only one of the nodes should process the records from a Kafka topic partition, write to a file system, call a remote API, etc.
Otherwise, multiple workers may end up doing the same task twice, overwriting each other’s data, and worse.