# spotify/sparkey

Simple constant key/value storage library, for read-heavy systems with infrequent large bulk inserts.

Repository: https://github.com/spotify/sparkey
Canonical: https://ross.abutalabs.com/products/sparkey
Language: C
License: Apache-2.0
License Family: permissive
Last push: 2023-08-17T09:06:05+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4751, "days_push": 1112, "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 1208, forks 83 (observed 2026-08-28T04:03:59.614446+00:00)

## What it is
Sparkey is a simple constant key/value storage library written in C, essentially a read-only hash table on disk optimized for read-heavy systems with infrequent large bulk inserts. It ships as a C library (libsparkey) plus a command-line utility for inspecting and reading sparkey index/log files.

## Use cases
- store a large immutable key/value dataset on disk for fast random reads
- periodically rebuild a lookup table with bulk writes and serve it read-only
- embed a persistent hashtable in a C application without running a database server
- inspect and read sparkey index/log files from the command line
- serve rarely-updated reference data to high-throughput low-latency services

## When to choose
- your data is written in infrequent large bulk loads and read far more often than updated
- you want a lightweight embedded key/value store with no server or network layer
- you need many concurrent readers with low per-entry overhead and block compression

## When to avoid
- you need frequent incremental writes or multiple concurrent writers
- you need a distributed or replicated key/value store
- you need robustness against data corruption or a compacted data store

## Facets
- artifact type: library
- maturity: maintenance
- function: database, caching, serialization
- domain: databases, developer-tools, performance
- platform: cpp, cli, cross-platform
- tags: key-value-store, persistent-hashtable, read-heavy, bulk-inserts, snappy-compression, c-library, linux, macos

## Member repositories
- spotify/sparkey (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.614446+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-30T06:18:56.156010+00:00, confidence not recorded.
  - readme: https://github.com/spotify/sparkey (fetched 2026-08-28T04:03:59.614446+00:00, sha eefbbd075fd6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
