A Go HTTP client wrapper that adds retries, backoff strategies, and concurrency for resilient network requests.
Pester is a Go library that wraps the standard HTTP client to enhance request resiliency in unreliable network conditions. It provides configurable retry logic, multiple backoff strategies, and concurrent request handling to improve reliability for HTTP calls.
Go developers building applications that make HTTP requests in environments with poor network conditions or variable delays, such as microservices, distributed systems, or clients interacting with unreliable APIs.
Developers choose Pester for its simplicity as a drop-in replacement for the standard http client, combined with powerful, configurable resiliency features like concurrent request racing and multiple built-in backoff strategies, without complicating the codebase.
Go (golang) http calls with retries and backoff
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly replaces standard http methods like Get and Post, allowing easy integration without major code changes, as shown in the simple example swapping http.Get for pester.Get.
Provides multiple built-in strategies like linear and exponential backoffs with jitter, plus support for custom implementations via the Backoff field, enabling tailored delay handling for retries.
Improves response times for GET calls by sending multiple requests concurrently and returning the first successful response, useful in unreliable network conditions.
Optional logging with the KeepLog flag captures retry attempts and errors, aiding in monitoring and troubleshooting, as demonstrated in the example log output.
The concurrent request feature is restricted to GET methods, limiting redundancy benefits for POST, PUT, or other HTTP verbs that might need similar resiliency.
The README mentions testing for file descriptor leaks, indicating users must be vigilant about resource cleanup in concurrent scenarios, which could add complexity.
As a wrapper around the standard http client, it doesn't extend core features like custom transports or protocol support, requiring additional work for non-standard use cases.