envoyproxy / envoyproxy/gateway

ClientTrafficPolicy: option to emit Retry-After header on rate-limit 429 responses

Open
#9,769 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
864
Avg merge
2d 2h
Merged PRs (30d)
140

Description

*Description*:

Envoy's rate-limit filters now support `enable_retry_after_header` (filter-wide, both global and local — [envoyproxy/envoy#46289](https://github.com/envoyproxy/envoy/pull/46289)), emitting `Retry-After` on 429s only, clamped to ≥1s, sourced from the same reset value used for `x-ratelimit-reset`.

Propose exposing this as `ClientTrafficPolicy.spec.headers.enableRetryAfterHeader` (bool, default `false` when unset), mirroring the existing `disableRateLimitHeaders`, wired to the same field on both filters.

```yaml
spec:
headers:
enableRetryAfterHeader: true
```

No further upstream Envoy work needed — this is a CRD + translator change only.

Per-rule override (mirroring `xRateLimitHeaders`, #8279) is tracked separately in #9078, pending further upstream Envoy work.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the ClientTrafficPolicy CRD definition and the translator handling disableRateLimitHeaders, then trace how the global and local rate-limit filters are configured. Add the headers option with an unset default of false and wire it to both filters; done means the generated configuration enables Retry-After for 429 responses in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.