Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle HTTP 429 responses #457

Open
1 task
aalbu opened this issue Mar 29, 2024 · 0 comments
Open
1 task

Handle HTTP 429 responses #457

aalbu opened this issue Mar 29, 2024 · 0 comments

Comments

@aalbu
Copy link
Member

aalbu commented Mar 29, 2024

Describe the feature

In production, Trino is almost always deployed behind some sort of proxy. It's not uncommon for these proxies to employ some rate limiting mechanism, which typically responds to requests with HTTP 429 (Too Many Requests) to high load. The response might contain a Retry-After header that indicates either the number of seconds the client should wait before retrying the request or the date when the request can be retried.

The Trino Python Client should handle such responses by retrying the request. Incidentally, HTTP 503 (Service Unavailable), which is currently being retried, can also include a Retry-After header, which is not taken into account currently.

Describe alternatives you've considered

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant