segmentio/ksuid

K-Sortable Globally Unique IDs

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 33 minutes ago
Added to GitGenius on September 12th, 2026
Created on May 11th, 2017
Open Issues & Pull Requests: 22 (+0)
GitHub issues: Enabled
Number of forks: 200
Total Stargazers: 5,269 (+0)
Total Subscribers: 38 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 6.4 hours
Mean response time: 83.6 days
90th percentile: 250.5 days
Tracked items: 3

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,760 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

ksuid is a Go library for generating and parsing K-Sortable Unique IDentifiers, a type of globally unique identifier designed to be naturally ordered by generation timestamp.

The problem ksuid solves is the need for unique identifiers that combine sortability with strong collision resistance and portability. Standard UUIDs like UUIDv4 lack timestamp ordering, while alternatives like Snowflake IDs require coordination between systems to prevent collisions. ksuid embeds a timestamp component that allows identifiers to be sorted by generation time without special logic, while including 128 bits of pseudorandom entropy—64 times larger than the 122 bits in UUIDv4—making collisions physically infeasible in practice. Both the binary and text representations are lexicographically sortable, so KSUIDs retain their time-ordered property even in systems that do not natively support them.

Developers should choose ksuid if their systems benefit from time-ordered identifiers without coordination overhead. It suits applications where natural sorting by creation time is useful, where strong collision resistance matters, or where portability across different systems is important. The library is particularly valuable for projects that need copy-and-paste-friendly text representations or that want to avoid the operational complexity of coordinated ID generation schemes.

The project is a battle-tested reference implementation maintained as a comprehensive library for the KSUID specification. Development activity shows consistent engagement with the codebase, indicating active maintenance and reliability for production use.