I'd use Meituan's Leaf algorithm, specifically its Snowflake-based ID generation approach.
It meets all your requirements:
✅ Globally unique IDs across all 50 servers
✅ Roughly time-ordered, 64-bit IDs
✅ Generated locally without calling another server
✅ Efficient database indexing
With properly assigned worker IDs and clock rollback handling, this is a proven solution for distributed ID generation.
🚀 DeepSeek-V4.1-Flash-1017 is here!
Stronger benchmark performance, faster task completion, and shorter outputs than the previous version—a Pareto improvement in performance and cost. Now live on our website, app, and API.
🛠️ Optimized for @DeepSeekHarness, Tencent CodeBuddy, WorkBuddy, and more. Upgrade to DeepSeek Harness v0.2.1-rc.1 or later for the best experience with the new model.
1/4