# sony/sonyflake

A distributed unique ID generator inspired by Twitter's Snowflake

Repository: https://github.com/sony/sonyflake
Canonical: https://ross.abutalabs.com/products/sonyflake
Language: Go
License: MIT
License Family: permissive
Topics: golang, id-generator
Last push: 2026-02-12T05:43:25+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 67, release rhythm 35, longevity 100
- inputs: {"age_days": 4114, "days_push": 202, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4404, forks 329 (observed 2026-08-28T04:08:48.371771+00:00)

## What it is
Sonyflake is a Go library that generates distributed unique 64-bit IDs, inspired by Twitter's Snowflake. It trades per-instance generation rate for a longer lifetime (174 years) and support for more machines (2^16), with configurable bit assignments.

## Use cases
- generate unique IDs for database rows across distributed servers
- replace Twitter Snowflake with longer-lifetime ID generation
- assign collision-free IDs in a multi-host Go service
- generate sortable time-ordered identifiers
- scale ID generation across many cores with goroutines

## When to choose
- you need distributed unique IDs in Go with long lifetime and many machine support
- you want configurable bit layout for time, sequence, and machine ID
- moderate per-instance rate (256 IDs per 10ms) is sufficient

## When to avoid
- you need very high ID generation rate on a single instance
- your stack is not Go
- you need IDs shorter than 64 bits or non-numeric IDs

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: microservices, backend, developer-tools
- platform: go, cross-platform
- tags: unique-id-generator, snowflake, distributed-ids, id-generation

## Member repositories
- sony/sonyflake (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:48.371771+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:06.899614+00:00, confidence not recorded.
  - readme: https://github.com/sony/sonyflake (fetched 2026-08-28T04:08:48.371771+00:00, sha 815695a18206)
- Data as of 2026-08-30T08:39:29.467469+00:00.
