# go-redsync/redsync

Distributed mutual exclusion lock using Redis for Go

Repository: https://github.com/go-redsync/redsync
Canonical: https://ross.abutalabs.com/products/redsync
Homepage: http://redis.io/topics/distlock
Language: Go
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-25T07:16:36+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 3865, "days_push": 8, "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 4043, forks 349 (observed 2026-08-28T04:08:33.551097+00:00)

## What it is
Redsync is a Go library implementing the Redlock algorithm for distributed mutual exclusion locks backed by Redis. It supports multiple Redis client drivers (go-redis and redigo) and works with single or multiple Redis instances.

## Use cases
- acquire a distributed lock across multiple Go service instances
- prevent duplicate cron job execution in a cluster
- ensure only one worker processes a task at a time
- implement leader election with Redis
- coordinate access to a shared resource across microservices

## When to choose
- you need mutual exclusion across processes or machines using Redis
- your Go project already uses go-redis or redigo
- you want a mature, widely adopted Redlock implementation

## When to avoid
- you need formally proven correctness guarantees (Redlock is a proposal, not formally analyzed)
- you don't already run Redis and don't want to add it
- you only need single-process locking (use sync.Mutex instead)

## Facets
- artifact type: library
- maturity: stable
- function: caching, concurrency, database-driver
- domain: databases, microservices, developer-tools
- platform: go, windows, cross-platform
- tags: redis, distributed-lock, redlock, mutex, mutual-exclusion, linux, macos

## Member repositories
- go-redsync/redsync (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:33.551097+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:23:44.861907+00:00, confidence not recorded.
  - readme: https://github.com/go-redsync/redsync (fetched 2026-08-28T04:08:33.551097+00:00, sha 84dc13092f1b)
  - homepage: http://redis.io/topics/distlock (fetched 2026-08-29T09:16:16.636831+00:00, sha 08551405291f)
  - site_page: https://redis.io/docs/latest/operate/oss_and_stack (fetched 2026-08-29T09:16:16.648509+00:00, sha 3a14b9e8b81d)
  - site_page: https://redis.io/docs (fetched 2026-08-29T09:16:16.650068+00:00, sha a52f7d1aa690)
  - site_page: https://redis.io/docs/latest/develop/whats-new (fetched 2026-08-29T09:16:16.651727+00:00, sha 2101cc188adc)
  - site_page: https://redis.io/docs/latest/develop/tools (fetched 2026-08-29T09:16:16.646719+00:00, sha 9766e66d53f5)
  - site_page: https://redis.io/docs/latest/develop/ai/agent-builder (fetched 2026-08-29T09:16:16.640574+00:00, sha 3c0f20c8616b)
  - site_page: https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack (fetched 2026-08-29T09:16:16.642828+00:00, sha ad9fbb2b9cc6)
  - site_page: https://redis.io/docs/latest/develop/data-types (fetched 2026-08-29T09:16:16.644564+00:00, sha 349af348b168)
  - site_page: https://redis.io/docs/latest/develop/get-started (fetched 2026-08-29T09:16:16.653523+00:00, sha 3cdfdbbc3dcc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
