Community discussions

MikroTik App
 
merkkg
just joined
Topic Author
Posts: 5
Joined: Thu Jan 19, 2017 11:50 am

Rest API Limitations (if any)

Sat Feb 17, 2024 8:39 am

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
 
DarkNate
Forum Guru
Forum Guru
Posts: 1017
Joined: Fri Jun 26, 2020 4:37 pm

Re: Rest API Limitations (if any)

Mon Feb 19, 2024 7:51 am

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.
 
merkkg
just joined
Topic Author
Posts: 5
Joined: Thu Jan 19, 2017 11:50 am

Re: Rest API Limitations (if any)

Tue Feb 20, 2024 8:43 am

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.
 
elico
Member Candidate
Member Candidate
Posts: 147
Joined: Mon Nov 07, 2016 3:23 am

Re: Rest API Limitations (if any)

Fri Mar 15, 2024 11:07 pm

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...

Who is online

Users browsing this forum: No registered users and 8 guests