throttling http api calls with delay
问题 I'm trying to implement some throttles on our REST API. A typical approach is after a certain threshold to block the request (with 403 or 429 response). However, I've seen one api that adds a delay to the response instead. As you make calls to the API, we will be looking at your average calls per second (c/s) over the previous five-minute period. Here's what will happen: over 3c/s and we add a 2 second delay over 5c/s and we add a 4 second delay over 7c/s and we add a 5 second delay From the