A Go library for running functions resiliently by catching and restarting panics, with optional probabilistic crash injection.
Robustly is a Go library that runs functions resiliently by catching panics and automatically restarting them. It solves the problem of rare, hard-to-reproduce bugs crashing long-running programs like monitoring agents or event processors, making them usable even with occasional failures.
Go developers building high-availability, stateful applications that process continuous data streams and cannot afford downtime from rare panics.
Developers choose Robustly for its focused approach to resilience, allowing programs to survive once-in-a-million errors without complex error handling, plus its unique crash injection feature for testing recovery mechanisms.
Run functions resiliently in Go, catching and restarting panics
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Immediately catches panics and restarts the crashed function, ensuring long-running applications like monitoring agents stay operational despite rare bugs, as highlighted in the blog-inspired use case.
Implements rate limits and timeouts to avoid infinite restart cycles, using RunOptions to control behavior and fail gracefully if crashes are too frequent, protecting system stability.
Allows probabilistic panic injection at specific file:line locations with configurable probabilities, enabling developers to test resilience and recovery mechanisms realistically, as demonstrated with CrashSetup().
Mimics the net/http server's resilience where individual goroutine crashes don't bring down the whole service, offering a proven approach for high-availability Go programs.
By automatically recovering from panics, it can hide critical underlying issues that should be fixed, leading to technical debt and potential accumulation of rare errors over time, as warned in the philosophy.
Lacks built-in logging, metrics, or alerting for recovered panics; while PrintStack can be enabled, developers must add external tools for comprehensive monitoring, increasing complexity.
Focused on specific 2013-era use cases with minimal updates, so it may not integrate well with modern Go ecosystems or have active community support for new features.