You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2026/09/08 15:36:00 UTC
[jira] [Created] (THRIFT-6209) Go: Provide standard Retry and Circuit Breaker client middlewares
Sylwester Lachiewicz created THRIFT-6209:
--------------------------------------------
Summary: Go: Provide standard Retry and Circuit Breaker client middlewares
Key: THRIFT-6209
URL: https://issues.apache.org/jira/browse/THRIFT-6209
Project: Thrift
Issue Type: Improvement
Components: Go - Library
Reporter: Sylwester Lachiewicz
THRIFT-5164 introduced the ClientMiddleware interface to lib/go/thrift, but the library currently does not provide standard, production-ready middleware implementations. Consequently, users must repeatedly implement custom retry loops, exponential backoff, and circuit breaker logic from scratch.
### Proposed Solution
Provide standard, opt-in client middlewares in lib/go/thrift:
1. Retry Middleware:
- NewRetryMiddleware(maxAttempts int, backoff BackoffStrategy, retryable func(error) bool) ClientMiddleware.
- Standard backoff strategies: ExponentialBackoff, LinearBackoff, and ConstantBackoff.
- Context-aware cancellation checks between retry attempts.
2. Circuit Breaker Middleware / Adapter:
- Provide a circuit breaker adapter interface and helper middleware to fail fast during downstream outages.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)