Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. wuid

wuid

BSD-3-ClauseGo

An extremely fast globally unique number generator that produces 64-bit integers using Redis, MySQL, MongoDB, or custom callbacks.

GitHubGitHub
545 stars48 forks0 contributors

What is wuid?

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.

Target Audience

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.

Value Proposition

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.

Overview

An extremely fast globally unique number generator.

Use Cases

Best For

  • High-throughput distributed systems needing millions of unique IDs per second
  • Microservices architectures requiring sequential, globally unique identifiers across instances
  • Applications using Redis, MySQL, or MongoDB as a coordination point for ID generation
  • Scenarios where performance-critical ID generation must avoid locks or bottlenecks
  • Systems that benefit from obfuscated or partitioned IDs for security or organization
  • Go-based projects seeking a faster alternative to UUIDv1/v4 or Snowflake-like ID generators

Not Ideal For

  • Applications requiring human-readable or string-based IDs for web API compatibility
  • Systems that need ID generation without external dependencies, such as embedded or offline environments
  • Projects where time-ordered IDs with embedded timestamps are essential, like for event sourcing
  • Teams using non-Go languages without a port, as support is limited primarily to Go and Swift

Pros & Cons

Pros

Extreme Performance

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.

Flexible Data Sources

Supports Redis, MySQL, MongoDB, and custom callbacks for loading high bits, ensuring distributed uniqueness without locking, as demonstrated in the usage examples.

Thread-Safe Design

Built to be lock-free and thread-safe, allowing concurrent ID generation without bottlenecks, which is critical for high-throughput applications.

Automatic Renewal

Automatically refreshes high 28 bits when low bits are nearly exhausted, reducing manual oversight and ensuring continuous operation.

Cons

External Dependency Overhead

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.

Setup Complexity

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.

Limited Metadata Support

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.

Frequently Asked Questions

Quick Stats

Stars545
Forks48
Contributors0
Open Issues1
Last commit2 years ago
CreatedSince 2018

Tags

#high-performance#redis#unique-id-generator#concurrent#distributed-systems#go-library#sequence-generation#uuid#mongodb#mysql#snowflake#guid

Built With

G
Go

Included in

Go169.1k
Auto-fetched 5 hours ago

Related Projects

uuiduuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.

Stars6,108
Forks426
Last commit1 year ago
ulidulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Go

Stars5,044
Forks184
Last commit1 year ago
xidxid

xid is a globally unique id generator thought for the web

Stars4,277
Forks212
Last commit3 months ago
uuiduuid

A UUID package for Go

Stars1,810
Forks124
Last commit23 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub