@@ -100,7 +100,7 @@ trigger retries if specified, while errors like `403` and `404` are not retryabl
100
100
### HAProxy
101
101
1 . ** Retry Conditions** : HAProxy can retry requests based on various network conditions
102
102
(e.g., connection failures, timeouts) and some HTTP error codes. While HAProxy does support gRPC via HTTP/2, it does not
103
- have built-in support for handling specific gRPC error codes (like ` Cancelled ` , ` Deadline Exceeded ` ).
103
+ have built-in support for handling specific gRPC status codes (like ` Cancelled ` , ` Deadline Exceeded ` ).
104
104
It relies on HTTP-level conditions for retries, so its gRPC support is less granular than the GEP requires.
105
105
2 . ** Retry Limits** : HAProxy allows you to set a maximum number of retries for a request using the ` retries ` directive.
106
106
It also supports setting a timeout for the entire retry process using the ` timeout connect ` and ` timeout server ` directives.
@@ -110,7 +110,7 @@ It also supports setting a timeout for the entire retry process using the `timeo
110
110
certain HTTP status codes like 500, 502, 503, and 504), but it does not natively interpret specific gRPC status codes
111
111
like ` UNAVAILABLE ` or ` DEADLINE_EXCEEDED ` . This means that, while Traefik can retry requests on common HTTP errors
112
112
that might represent temporary issues, it lacks the ability to directly handle and retry based on
113
- gRPC-specific error codes, limiting its alignment with the GEP’s requirement for granular gRPC error handling.
113
+ gRPC-specific error codes, limiting its alignment with the GEP’s requirement for granular gRPC status codes handling.
114
114
2 . ** Retry Limits** : Traefik provides configurable retry attempts and can set a maximum number of retries. However,
115
115
Traefik does not offer per-try timeout controls specific to each retry attempt. Instead, it typically relies on a
116
116
global request timeout, limiting the flexibility needed for more precise gRPC retry management (like Envoy’s ` per_try_timeout ` ).
@@ -140,28 +140,28 @@ type GRPCRouteRule struct {
140
140
141
141
// GRPCRouteRetry defines retry configuration for a GRPCRoute.
142
142
//
143
- // Implementations SHOULD retry on common transient gRPC errors
143
+ // Implementations SHOULD retry on common transient gRPC status codes
144
144
// if a retry configuration is specified.
145
145
//
146
146
type GRPCRouteRetry struct {
147
- // Reasons defines the gRPC error conditions for which a backend request
147
+ // Reasons defines the gRPC status codes for which a backend request
148
148
// should be retried.
149
149
//
150
- // Supported gRPC error conditions :
151
- // * "cancelled "
152
- // * "deadline-exceeded "
153
- // * "internal "
154
- // * "resource-exhausted "
155
- // * "unavailable "
150
+ // Supported gRPC status codes :
151
+ // * "CANCELLED "
152
+ // * "DEADLINE_EXCEEDED "
153
+ // * "INTERNAL "
154
+ // * "RESOURCE_EXHAUSTED "
155
+ // * "UNAVAILABLE "
156
156
//
157
- // Implementations MUST support retrying requests for these conditions
157
+ // Implementations MUST support retrying requests for these status codes
158
158
// when specified.
159
159
//
160
160
// Support: Extended
161
161
//
162
162
// +optional
163
163
// <gateway:experimental>
164
- Reasons []GRPCRouteRetryCondition ` json:"reasons,omitempty"`
164
+ Reasons []GRPCRouteRetryStatusCode ` json:"reasons,omitempty"`
165
165
166
166
// Attempts specifies the maximum number of times an individual request
167
167
// from the gateway to a backend should be retried.
@@ -200,21 +200,21 @@ type GRPCRouteRetry struct {
200
200
Backoff *Duration ` json:"backoff,omitempty"`
201
201
}
202
202
203
- // GRPCRouteRetryCondition defines a gRPC error condition for which a backend
203
+ // GRPCRouteRetryStatusCode defines a gRPC status code for which a backend
204
204
// request should be retried.
205
205
//
206
- // The following conditions are considered retryable:
206
+ // The following status codes are considered retryable:
207
207
//
208
- // * "cancelled "
209
- // * "deadline-exceeded "
210
- // * "internal "
211
- // * "resource-exhausted "
212
- // * "unavailable "
208
+ // * "CANCELLED "
209
+ // * "DEADLINE_EXCEEDED "
210
+ // * "INTERNAL "
211
+ // * "RESOURCE_EXHAUSTED "
212
+ // * "UNAVAILABLE "
213
213
//
214
- // Implementations MAY support additional gRPC error codes if applicable.
214
+ // Implementations MAY support additional gRPC status codes if applicable.
215
215
//
216
- // +kubebuilder:validation:Enum=cancelled;deadline-exceeded;internal;resource-exhausted;unavailable
217
- type GRPCRouteRetryCondition string
216
+ // +kubebuilder:validation:Enum=CANCELLED;DEADLINE_EXCEEDED;INTERNAL;RESOURCE_EXHAUSTED;UNAVAILABLE
217
+ type GRPCRouteRetryStatusCode string
218
218
219
219
// Duration is a string value representing a duration in time.
220
220
// Format follows GEP-2257, which is a subset of Golang's time.ParseDuration syntax.
@@ -259,7 +259,7 @@ To ensure correct gRPC retry functionality, the following tests must be implemen
259
259
- **Test**: Verify retries respect the BackendRequestTimeout. Requests should fail if the timeout is reached, even with retries.
260
260
- **Expected**: Retries occur within the configured timeout, and fail if exceeded.
261
261
2. `SupportGRPCRouteRetry`
262
- - **Test**: Ensure retries are triggered for retryable gRPC errors (cancelled, deadline-exceeded, internal, resource-exhausted, unavailable).
262
+ - **Test**: Ensure retries are triggered for retryable gRPC status codes (cancelled, deadline-exceeded, internal, resource-exhausted, unavailable).
263
263
- **Expected**: Retries for retryable errors; no retries for non-retryable errors.
264
264
3. `SupportGRPCRouteRetryBackoff`
265
265
- **Test**: Confirm retries use the configured backoff strategy.
0 commit comments