Radmon.org API rate limiting and mass upload feature
- geigermantes
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
20 hours 43 minutes ago #7519
by geigermantes
Radmon.org API rate limiting and mass upload feature was created by geigermantes
Hi All,
2 questions in this topic, but they are related.
First I have searched the forum for these 2 questions but did not find anything. Apologies if they are posted somewhere.
1 - It looks like there is a rate limiting feature when uploading data too frequently. I explain:
I am posting CPM values every minute and it works fine.
I also store the values in a queue, just in case the API is not available at the time of the upload.
When it is not available, I wait 10 seconds for the API to be up again and resubmit the data every 2 seconds.
This seems to work for a few values, then the API replies that it is down, then comes up again after a while, and the process starts again, except that while the API was down - for me only I guess - new values have been added in the queue.
In the end the queue does not empty itself at a constant rate and barely beats the rates it is increasing at. Not ideal.
So I changed the values, increasing the delay from 2 to 13 seconds (not a divider of 60).
This works much better as now there are no more "API not available" answers anymore and the queue is emptying itself much faster and at a constant rate.
So there must be a rate limiting feature when uploading to radmon.org (which I can totally understand).
Just wanted to know the values I would have to set to empty the queue as fast as possible without overloading the system.
Which leads me to the 2nd question:
2 - Is there a mass upload feature built in the API ?
Something where you could submit not one but many values with different timestamps in an API call, so that you don't have to call the API so often?
I have not seen that in the API specifications.
Thanks and Regards,
2 questions in this topic, but they are related.
First I have searched the forum for these 2 questions but did not find anything. Apologies if they are posted somewhere.
1 - It looks like there is a rate limiting feature when uploading data too frequently. I explain:
I am posting CPM values every minute and it works fine.
I also store the values in a queue, just in case the API is not available at the time of the upload.
When it is not available, I wait 10 seconds for the API to be up again and resubmit the data every 2 seconds.
This seems to work for a few values, then the API replies that it is down, then comes up again after a while, and the process starts again, except that while the API was down - for me only I guess - new values have been added in the queue.
In the end the queue does not empty itself at a constant rate and barely beats the rates it is increasing at. Not ideal.
So I changed the values, increasing the delay from 2 to 13 seconds (not a divider of 60).
This works much better as now there are no more "API not available" answers anymore and the queue is emptying itself much faster and at a constant rate.
So there must be a rate limiting feature when uploading to radmon.org (which I can totally understand).
Just wanted to know the values I would have to set to empty the queue as fast as possible without overloading the system.
Which leads me to the 2nd question:
2 - Is there a mass upload feature built in the API ?
Something where you could submit not one but many values with different timestamps in an API call, so that you don't have to call the API so often?
I have not seen that in the API specifications.
Thanks and Regards,
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 0.110 seconds