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

Honor rate limiting headers sent by the server #358

Open
ePaul opened this issue Jul 9, 2020 · 1 comment
Open

Honor rate limiting headers sent by the server #358

ePaul opened this issue Jul 9, 2020 · 1 comment

Comments

@ePaul
Copy link

ePaul commented Jul 9, 2020

Current behavior

Nakadi (at least on the staging system at Zalando) now has some rate limiting (via a gateway).
This has the effect that all kinds of calls can get 429 responses with a Retry-After header.

When they happen during a cursor commit, Nakadi-Java just throws them out of the StreamOffsetObserver.onNext() method (see #357).
If those exceptions are caught (as our application is doing right now, apparently), this is just continued with the next messages, resulting in ~25k log lines over 45 seconds, until the rate limit window is over.

Expected behavior
For a 429 response, the Retry-After header is evaluated. After that many seconds, the request is tried again.

@ePaul
Copy link
Author

ePaul commented Jan 13, 2023

Also, it would be helpful to actually print the Retry-After header when logging these exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant