ex icon indicating copy to clipboard operation
ex copied to clipboard

[NOTICKET] Handle Retry-After header in HTTP Client

Open SemanticallyNull opened this issue 1 year ago • 4 comments

SemanticallyNull avatar Dec 01 '23 19:12 SemanticallyNull

Looks like a couple new nolints are required in the refactored tests

bjohnso5 avatar Dec 04 '23 13:12 bjohnso5

Looks like a couple new nolints are required in the refactored tests

Oh this was supposed to be a draft... I'm still trying to figure out if there's a less awful way to test these

SemanticallyNull avatar Dec 04 '23 14:12 SemanticallyNull

If I'm understanding the code correctly, this change would "block" any calls that are made using the client during the rate limiting window but doesn't handle retrying those calls? So whoever is using the HTTP client would have to explicitly implement retry logic themselves?

DomParfitt avatar Dec 04 '23 14:12 DomParfitt

If I'm understanding the code correctly, this change would "block" any calls that are made using the client during the rate limiting window but doesn't handle retrying those calls? So whoever is using the HTTP client would have to explicitly implement retry logic themselves?

When we receive a 429 it's a signal from the service to back off, we explicitly don't retry those. Specifically the 429 with a Retry-After header, it's desireable for those requests to not be retried until (for example) the worker loop picks that up again. It effectively throttles throughput on the basis that the downstream cannot handle the number of requests.

SemanticallyNull avatar Dec 04 '23 15:12 SemanticallyNull