bhollis / ng-http-rate-limiter

Rate limiting for Angular 1's $http service
MIT License
2 stars 0 forks source link

Retry on "429 Too Many Requests" [Request] #1

Open apaatsio opened 8 years ago

apaatsio commented 8 years ago

It would be convenient to automatically re-add the request to the queue if server returns 429 Too Many Requests error. This should be configurable so we can set the maximum number of retries.

This is for situations where the network is not optimal (e.g. bad network can cause bursts and the rate limit to exceed at the server). Another situation is when you have two clients using the same API at the same time. If both clients are sending requests at the maximum rate, the total will be 2x rate limit and a lot of 429s.

bhollis commented 8 years ago

That'd be cool! Would you want to take a crack at submitting a PR for that?

On Tuesday, July 5, 2016, Antti Ahti notifications@github.com wrote:

It would be convenient to automatically re-add the request to the queue if server returns 429 Too Many Requests error. This should be configurable so we can set the maximum number of retries.

This is for situations where the network is not optimal (e.g. bad network can cause bursts and the rate limit to exceed at the server). Another situation is when you have two clients using the same API at the same time. If both clients are sending requests at the maximum rate, the total will be 2x rate limit and a lot of 429s.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bhollis/ng-http-rate-limiter/issues/1, or mute the thread https://github.com/notifications/unsubscribe/AATHeFzwS4z8MnROOLN1E-yGRhqFPVaWks5qShZfgaJpZM4JE4wj .

apaatsio commented 8 years ago

I might have time next week for that. Let's see :)