An extremely fast globally unique number generator that produces 64-bit integers using Redis, MySQL, MongoDB, or custom callbacks.
WUID is a universal unique identifier generator designed for high-performance applications. It generates sequential 64-bit integers, with the high 28 bits loaded from a data source like Redis, MySQL, or MongoDB, ensuring uniqueness across distributed instances. It solves the need for extremely fast, distributed, and sequential ID generation without the overhead of traditional UUIDs.
Developers building distributed systems, microservices, or high-throughput applications that require fast, unique, and sequential identifier generation, such as those using Go for backend services.
Developers choose WUID for its extreme performance—capable of generating 100 million IDs per second per instance—and its flexibility in supporting multiple data sources for distributed uniqueness, offering a lightweight, lock-free alternative to slower UUID implementations.
An extremely fast globally unique number generator.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show WUID generates IDs at 7.661 ns/op, far faster than UUIDs (43-310 ns/op) and alternatives like Snowflake (2092 ns/op), enabling 100M IDs/sec per instance.
Supports Redis, MySQL, MongoDB, and custom callbacks for loading high bits, ensuring distributed uniqueness without locking, as demonstrated in the usage examples.
Built to be lock-free and thread-safe, allowing concurrent ID generation without bottlenecks, which is critical for high-throughput applications.
Automatically refreshes high 28 bits when low bits are nearly exhausted, reducing manual oversight and ensuring continuous operation.
Requires setting up and maintaining an external data source (e.g., Redis, MySQL) for uniqueness, adding operational complexity and potential failure points, as highlighted by the need to monitor 'renew failed' warnings.
Initial configuration involves database-specific setups, like creating MySQL tables or Redis keys, which can be error-prone and time-consuming compared to drop-in solutions.
Generates plain 64-bit integers without embedded timestamps or machine identifiers, making it less suitable for debugging or auditing compared to IDs like ULID or Snowflake.