I want to limit clients to an upper limit of number of calls to my REST APIs. What should I return to inform clients that they've been throttled ?
Amazon S3 is returning HTTP 503 with an error code SlowDown to inform clients.
What do you advise ?
I want to limit clients to an upper limit of number of calls to my REST APIs. What should I return to inform clients that they've been throttled ?
Amazon S3 is returning HTTP 503 with an error code SlowDown to inform clients.
What do you advise ?
Since RFC 2616 documents status 503 as (my emphasis):
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header.
it seems a reasonable approach, especially with a Retry-After
header.