# bsm/redislock

Simplified distributed locking implementation using Redis

Repository: https://github.com/bsm/redislock
Canonical: https://ross.abutalabs.com/products/redislock
Language: Go
License: NOASSERTION
License Family: other
Topics: golang, redis, lock, distributed, distlock, distributed-lock
Last push: 2026-06-27T10:03:05+00:00

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

## Adoption (not part of the score)
Stars 1767, forks 165 (observed 2026-08-28T04:05:33.559956+00:00)

## What it is
A Go library providing a simplified distributed locking implementation built on Redis. It supports obtaining, refreshing, releasing, and TTL-checking locks, plus fencing tokens for safe lock-loss mitigation.

## Use cases
- implement distributed locks across multiple service instances
- prevent concurrent cron jobs from running twice
- coordinate access to a shared resource using Redis
- add fencing tokens to distributed locking
- acquire and refresh locks with TTL in Go
- build a mutex backed by Redis

## When to choose
- you need a small, focused distributed lock library for Go with Redis
- you want fencing token support to guard against GC-pause lock loss
- you already use go-redis and want a simple Obtain/Refresh/Release API

## When to avoid
- you need multi-node consensus locking without trusting a single Redis instance (e.g. Redlock across clusters)
- your project is not in Go
- you need locks persisted outside Redis

## Facets
- artifact type: library
- maturity: active
- function: caching, concurrency, database-driver
- domain: databases, microservices, developer-tools
- platform: go, windows, self-hosted
- tags: redis, distributed-lock, golang, fencing-tokens, mutex, synchronization, linux, macos, docker

## Member repositories
- bsm/redislock (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:33.559956+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-30T03:26:24.253108+00:00, confidence not recorded.
  - readme: https://github.com/bsm/redislock (fetched 2026-08-28T04:05:33.559956+00:00, sha 714b461338dd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
