Building a Distributed Sequence Generator with ZooKeeper and C#

Building a Distributed Sequence Generator with ZooKeeper and C#

1. Goal and Motivation This demo project explores how to assign unique, dynamic sequence numbers to multiple server instances in a distributed environment, inspired by challenges that surface when designing things like global ID generators (e.g., Twitter’s Snowflake). As described in the project’s README, the scenario began as a typical interview problem: how do you ensure each server instance receives (and keeps) a unique ID, especially if instances are started, stopped, or restarted? ...

March 17, 2025 · 5 min · 1047 words · Raul