RepositoryScalaNLNetherlands
svroonland

svroonland/rezilience

ZIO-native utilities for making resilient distributed systems

164stars
20forks
14issues
2views

Rezilience

Use and like this library? Consider sponsoring its ongoing development and maintenance

rezilience is a ZIO-native collection of policies for making asynchronous systems more resilient to failures.

It is inspired by Polly, Resilience4J and Akka.

It consists of these policies:

  • CircuitBreaker
  • Bulkhead
  • RateLimiter
  • Retry
  • Timeout

Features / Design goals

  • Type-safety: all errors that can result from any of the rezilience policies are encoded in the method signatures, so no unexpected RuntimeExceptions.
  • Support for your own error types (the E in ZIO[R, E, A]) instead of requiring your effects to have Exception as error type
  • Lightweight: rezilience uses only ZIO fibers and will not create threads or block
  • Switchable at runtime with two transition modes
  • Resource-safe: built on ZIO's ZManaged, any allocated resources are cleaned up safely after use.
  • Interrupt safe: interruptions of effects wrapped by rezilience policies are handled properly.
  • Thread-safe: all policies are safe under concurrent use.
  • ZIO integration: some policies take for example ZIO Schedules and rezilience tries to help type inference using variance annotations
  • Metrics: all policies (will) provide usage metrics for monitoring purposes
  • Composable: policies can be composed into one overall policy
  • Discoverable: no syntax extensions or implicit conversions, just plain scala

Documentation

Documentation

Further questions? Look for the #rezilience channel on the ZIO Discord: https://discord.gg/2ccFBr4

Installation

Sonatype Nexus (Releases) Sonatype Nexus (Snapshots)

Add to your build.sbt:

libraryDependencies += "nl.vroste" %% "rezilience" % "<version>"

Used by

If you are using this library and find it useful, please consider adding your company or project to the list below!

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
AhsanSheraz/pyresilience

Unified resilience patterns for Python — retry, circuit breaker, timeout, fallback, bulkhead, rate limiter, and cache in one decorator. Python's Resilience4j.

104
Nov 29, 2026
RepositoryJava
failsafe-lib/failsafe

Fault tolerance and resilience patterns for the JVM

4.3k
Dec 28, 2025
RepositoryGo
failsafe-go/failsafe-go

Fault tolerance and resilience patterns for Go

2.3k
Nov 23, 2026
RepositoryPHP
ackintosh/ganesha

:elephant: A Circuit Breaker pattern implementation for PHP applications.

670
Jun 20, 2026
RepositoryRuby
bolshakov/stoplight

:traffic_light: Traffic control for code.

632
Nov 17, 2026
RepositoryClojure
KingMob/TrueGrit

A data-driven, functionally-oriented, idiomatic Clojure library for circuit breakers, bulkheads, retries, rate limiters, timeouts, etc.

132
Jul 28, 2026
RepositoryRust
seuros/breaker_machines

Modern circuit breaker for Ruby & Rails. Thread-safe, fiber-ready async support. Built-in fallbacks, rich introspection, clean DSL. Memory-efficient with jitter & monitoring.

113
Nov 23, 2026
RepositoryPython
bagowix/interlock

Circuit breaker for Python: sync + async in one class, sliding-window rate, slow-call detection, Polly-style resilience pipeline, type-safe API

68
Nov 28, 2026
RepositoryScala
apache/spark

Apache Spark - A unified analytics engine for large-scale data processing

44.7k
Dec 2, 2026