Why ID Format Matters More Than ID Generation (Lessons from Production)
5 days ago
- #database
- #architecture
- #distributed-systems
- Distributed ID formats are architectural commitments, not just data types, due to their widespread use across systems.
- Auto-increment IDs are simple but become problematic with database sharding, multi-region deployments, and microservices.
- UUIDv4 offers uniqueness without coordination but lacks ordering and structure.
- ULID and UUIDv7 provide time ordering but face issues with high concurrency and clock drift.
- Snowflake offers strong ordering and performance but is rigid and hard to evolve.
- OrderlyID was designed to provide structured, evolvable, and decentralized IDs with features like tenant encoding and checksums.
- Choosing an ID format depends on system constraints like ordering guarantees and extensibility needs.