Pachube API request
I use the Pachube in Mango.
It workes fine, until the data sourche has to many update's in a short period. pr having to much feeds
Pachube calculate's the amount of API requests, ist an avarage of3 minute's
If there are to many reguests the APIkey wil be ignored.
The frequentie of giving data to pachube depends on the Pachube acount
a free acount is 10 API request / min allowed
How do i limit the rate of API request's to PAchube ?
this is how Pachube works with API requests:
"API usage is rate limited and this rate is determined by the account type of the user making requests. While the API rate limit is expressed in 'requests per minute' the calculation is averaged over 3 minutes.
If your application exceeds this rate, it will be unable to make any successful requests, whether to access feed data or to post new data, and will receive an error* for every request until the rate has diminished. Once the rate has diminished service will return to normal, so you don't have to do anything other than reducing the rate of requests.
Note that this means that you can either make requests regularly, or you can make a burst of requests -- but then you will need to prevent any further requests for another two minutes. Therefore, if you are consistently making requests more frequently than your limit, then none of your requests will ever be successful.
- PLEASE NOTE that in the v1 api this is a 503 error and in the v2 api this a 403 error, as this is more semantically correct. "
Because of the way that the Pachube API works a request is made every time a published point is updated. If you are publishing, say, 3 points, and your data source updates them every 10 seconds, you will end up making 30 requests a minute. If you are exceeding your limits there, you should reduce the amount of updates coming from your data source.