Dynamic machine ID leases in Elixir
Distributed ID generators often look simple: combine a timestamp, a counter, and a machine ID. NoNoncense uses that idea for fast counter, sortable, and encrypted nonces. It is a wonderfully fast design, right up until two running nodes receive the same machine ID. The hard part is not incrementing a counter. It is deciding who may use each machine ID, especially when pods are replaced, nodes…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.