Netherlandssvroonland/rezilience
ZIO-native utilities for making resilient distributed systems
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:
CircuitBreakerBulkheadRateLimiterRetryTimeout
Features / Design goals
- Type-safety: all errors that can result from any of the
reziliencepolicies are encoded in the method signatures, so no unexpected RuntimeExceptions. - Support for your own error types (the
EinZIO[R, E, A]) instead of requiring your effects to haveExceptionas error type - Lightweight:
rezilienceuses 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
reziliencepolicies are handled properly. - Thread-safe: all policies are safe under concurrent use.
- ZIO integration: some policies take for example ZIO
Schedules andreziliencetries 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
Further questions? Look for the #rezilience channel on the ZIO Discord: https://discord.gg/2ccFBr4
Installation
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.
Unified resilience patterns for Python — retry, circuit breaker, timeout, fallback, bulkhead, rate limiter, and cache in one decorator. Python's Resilience4j.
:elephant: A Circuit Breaker pattern implementation for PHP applications.
A data-driven, functionally-oriented, idiomatic Clojure library for circuit breakers, bulkheads, retries, rate limiters, timeouts, etc.
Modern circuit breaker for Ruby & Rails. Thread-safe, fiber-ready async support. Built-in fallbacks, rich introspection, clean DSL. Memory-efficient with jitter & monitoring.
Circuit breaker for Python: sync + async in one class, sliding-window rate, slow-call detection, Polly-style resilience pipeline, type-safe API
Apache Spark - A unified analytics engine for large-scale data processing