# Shopify/semian

:monkey: Resiliency toolkit for Ruby for failing fast

Repository: https://github.com/Shopify/semian
Canonical: https://ross.abutalabs.com/products/semian
Language: Ruby
License: MIT
License Family: permissive
Topics: resiliency, circuit-breaker, bulkheads, ruby, webscale
Last push: 2026-07-28T06:31:11+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 69, longevity 100
- inputs: {"age_days": 4362, "days_push": 36, "days_rel": 205, "gap_med": 7, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1484, forks 87 (observed 2026-08-28T04:04:51.298099+00:00)

## What it is
Semian is a Ruby resiliency library that prevents cascading failures when accessing slow or unresponsive external services like databases and HTTP APIs. It implements circuit breaker and bulkhead patterns (using SysV semaphores) to fail fast instead of blocking workers on timeouts.

## Use cases
- prevent cascading failures from slow redis or mysql in a rails app
- add circuit breaker to external http service calls in ruby
- limit concurrent connections to a slow downstream resource
- fail fast when a dependency is unresponsive instead of waiting for timeouts
- protect ruby workers from being exhausted by slow database queries
- build resilient ruby applications with bulkheads

## When to choose
- you run a multi-threaded Ruby app (e.g. Rails, Sidekiq) calling databases, Redis, or HTTP services
- you need server-wide concurrency control via SysV semaphores
- you want battle-tested resiliency patterns from Shopify production since 2014

## When to avoid
- you are not using Ruby
- your app is single-threaded or event-driven where blocking is not an issue
- you need resiliency patterns in other languages or non-supported adapters

## Facets
- artifact type: library
- maturity: stable
- function: caching, middleware, error-handling, concurrency
- domain: backend, web-development, developer-tools, microservices, performance
- platform: ruby
- tags: circuit-breaker, bulkhead, resiliency, fail-fast, ruby-gem, netflix-hystrix-inspired, linux, macos

## Member repositories
- Shopify/semian (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:51.298099+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-30T04:33:58.437481+00:00, confidence not recorded.
  - readme: https://github.com/Shopify/semian (fetched 2026-08-28T04:04:51.298099+00:00, sha e7e9fe6e6170)
- Data as of 2026-08-30T08:39:29.467469+00:00.
