While waiting on the rate limit stuff to process, I want to talk about the network based on what I am learning.
Looking here, https://www.nslookup.io/domains/robotevents.com/webservers/
Whenever you go to www.robotevents.com, it returns Cloudflare’s ip addresses in Florida 104.18.40.111and California 172.64.147.145. So if I ping RobotEvents, I will only get a response cycle times from my server to one of CloudFlare’s servers and back.
Pinging from My Computer → CloudFlare California → My Computer
| Min Process Time |
Q1 Process Time |
Median Process Time |
Q3 Process Time |
Max Process Time |
Average Process Time |
Standard Deviation |
| 0.02 |
0.03 |
0.03 |
0.04 |
0.17 |
0.04 |
0.03 |
Pinging from My Computer → CloudFlare Florida → My Computer
| Min Process Time |
Q1 Process Time |
Median Process Time |
Q3 Process Time |
Max Process Time |
Average Process Time |
Standard Deviation |
| 0.02 |
0.08 |
0.08 |
0.11 |
0.20 |
0.08 |
0.04 |
So location affects the downtime quite drastically with CloudFlare servers adding a relatively considerable amount of delay. If packets are sent in larger amounts, cloudflare might add more delay due to higher processing requirements.
Firstly, RobotEvents is masked by CloudFlare so the closest thing would to be seeing the time for a request return from https://www.robotevents.com/api/v2/swagger.yml. This will be the closest baseline I can get to a ping, given that I am not really able to ping the actual server for RobotEvents. → This will be necessary to see how much of the time to process is looking into the RobotEvents database when compared to the network itself, as geographic locations make the times to receive information vary.
Swagger rough ping estimate of My Computer → CloudFlare Servers → RobotEvents Servers → CloudFlare Servers → My Computer
| Min Process Time |
Q1 Process Time |
Median Process Time |
Q3 Process Time |
Max Process Time |
Average Process Time |
Standard Deviation |
| 0.0755 |
0.0831 |
0.0831 |
0.0854 |
0.1499 |
0.0847 |
0.0091 |
Personally, I believe above show a good baseline. It isn’t actual ping, but it lets us know the database access and process time.
After 8639 requests, with a delay of 5 seconds between requests (inclusively and not exclusively delayed), calling https://www.robotevents.com/api/v2/events.
| Min Process Time |
Q1 Process Time |
Median Process Time |
Q3 Process Time |
Max Process Time |
Average Process Time |
Standard Deviation |
| 0.58 |
0.63 |
0.63 |
0.65 |
2.76 |
0.64 |
0.05 |
From this, we can find a relative estimate on dabase processing time on RobotEvent’s side via Time To List Events - Swagger Time in seconds.
| Median Database Processing Time |
Average Database Processing Time |
| 0.5470 |
0.5539 |
This seems like database retreival takes some time from RobotEvents side, and should be factored in with your programs that taps into RobotEvents API.
So, a TL;DR:
- When making an API call, it takes around 0.58 seconds to receive a message.
- When accessing data, it takes around 0.08 seconds for network communication and 0.55 seconds for RobotEvents to process a database query roughly.
- These times may vary based on what is requested, but the bottleneck is very much database retreival.
- For 12 hours, I ran code that made an API call every 5 seconds, and none of them returned a status other than 200 (essentially, no issues or push-backs). → 8639 requests were made yesterday
- I will keep posted about the future, to see how RobotEvents handles calls every 4, 3, 2, and 1 seconds.
Now there appears to be a gauranteed safe zone. And with time we can hone in on how close we can make this ‘safe zone’ of API calls be, in a couple more days. 