emissary icon indicating copy to clipboard operation
emissary copied to clipboard

Expose rate_limited_as_resource_exhausted in Ambassador configuration

Open pwen opened this issue 4 years ago • 4 comments

Please describe your use case / problem.

We've configured Ambassador to send rate limit requests to a 3rd party service, and noticed that all 429 HTTP responses code are translated to UNAVAILABLE, as per gRPC mapping document. This isn't particularly helpful. Per Google's recommendation, 429 response shall be translated to RESOURCE_EXHAUSTED.

Envoy added the support to explicitly specify whether we want 429 responses to be mapped to RESOURCE_EXHAUSTED while UNAVAILABLE remains default; this is configurable through a flag named rate_limited_as_resource_exhausted.

It doesn't seem like Ambassador supports this configuration.

Describe the solution you'd like

We'd like Envoy option rate_limited_as_resource_exhausted to be exposed via Ambassador configuration.

Describe alternatives you've considered Not at this moment.

Additional context Reference:

  • https://cloud.google.com/apis/design/errors#generating_errors
  • https://github.com/envoyproxy/envoy/pull/4879

pwen avatar Oct 12 '20 22:10 pwen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 12 '20 20:12 stale[bot]

Hate to necro this thread but... is there still no way to do this?

UNAVAILABLE gRPC status codes for rate-limited responses isn't cutting it for us...

OmegaVVeapon avatar Jun 08 '22 21:06 OmegaVVeapon

@pwen , @OmegaVVeapon , there's a resolution for this in the next release. Thanks for the contribution @jeromefroe!

cindymullins-dw avatar Sep 28 '23 16:09 cindymullins-dw

This was addressed in 3.8.2. Please let us know if issues persist.

cindymullins-dw avatar Jan 06 '24 06:01 cindymullins-dw