Rest API Limitations (if any)

Hi everyone,

I’ve written some scripts to monitor the Mikrotik CPU, Temp, BGP, etc as well as ports to other Mikrotiks using the REST API. I have also built up simple queues based on syslog events of every DHCP lease so on average I’m looking at approximately 4,000 requests per hour (per device) so far its working fine but just curious if it is acceptable to do so.

Is there any limitation.?

Devices are CCR2216 and running at around 5-10% CPU usage

For monitoring purposes, in general, for most things, use SNMP.

If there is something that’s not covered by SNMP, then use the RESTful API.

Hi,

Yes i do agree, that SNMP normally used but 99% of the commands are for provisioning (add/edit) of simple queues which is why I used REST API

The other 1% is not polled on regular basis but more of just snapshot on demand when page is opened.

I do also poll via SNMP which is sent to Zabbix which is for historical data.

is 10k provisioning requests per hour via REST API ok and I shouldn’t expect any issues.

It depends id the web service is built to take such a load.
normal web services are ok with 300 requests per sec but in bursts of max 300.
Above this you need threading of so sort of parallel processing.
Also, it depends on other factors and if you take 10k per an hour it’s about ~166 per minute which is pretty normal for an API service to my opinion.
The last time I tried to run parallel rest api requests the service just “died” and I had to disable and re-enable it on a hap ac3.
I don’t know if it’s the CPU, RAM or software but it’s one of them…