API Rate Limit Questions

amirnetop
Conversationalist

API Rate Limit Questions

Meraki API has the following two constraints as documented here

https://developer.cisco.com/meraki/api-latest/#!rate-limit

  1. Each Meraki organization has a call budget of 10 requests per second.
  2. Furthermore, a concurrency limit of 10 concurrent requests per IP is enforced

#1 is clear - we have a rate limit policy  (or a budget for) of 10 requests per second per organization 


#2 is not clear to me since it's under "Per Organization" section in the documentation, Does this means that we are allowed to drain the "per organization, per second budget" by making up to 10 concurrent calls (so we don't have to control the frequency of calls to be ~ per 100ms)? Or, Is it a global per IP limitation that limits the number of concurrent calls from the same IP address (regardless of the organization)?  if such then what does "concurrent" mean (same second, millisecond..)?

The confusing part os that #2 is placed under "Per Organization" section in the documentation
 

Will appreciate some clarification since we're managing a system that makes calls for multiple orgs from multiple IPs

Kind Regards


Amir

6 Replies 6
Badr-eddine
Getting noticed

Hello,

 

The statement "Each Meraki organization is allocated a call budget of 10 requests per second" implies that within the Meraki platform, every organization has a maximum allowance of 10 API requests per second, without considering the source IP or agent.

 

To further elaborate, if each Meraki organization is granted a call budget of 10 requests per second, we can divide the requests evenly within intervals of 100 milliseconds (0.1 seconds). By doing so, we can determine the number of requests that can be made within that specific timeframe.

 

I usually conduct a Postman runner test with numerous requests, where I followed the practice of separating each request by a 100-millisecond or greater interval, and it worked flawlessly.

 

Please it's me knew if this information answers your question?

amirnetop
Conversationalist

Thank you,


That's definitely helps with the 1st limitation.

 

But what does the 2nd limitation, "Furthermore, a concurrency limit of 10 concurrent requests per IP is enforced" means

How does it limit our ability to make API calls


Amir

PhilipDAth
Kind of a big deal
Kind of a big deal

At the moment, the per IP and per org API limit is the same, so it doesn't matter what IP address you are doing the requests from.

sungod
Kind of a big deal

Tbh I would not worry about this.

 

Just wrap the 429 Retry-After logic around your API calls and retry until success, it works extremely well.

 

Then the rate limiting is effectively hidden and you don't have to worry about multiple independent callers getting in each other's way.

 

amirnetop
Conversationalist

Thanks,

I'm dealing with a large number of orgs simultaneously so I'll go a test the recommendations provided here before moving forward,

Thanks for everyone's feedback,
 

david_n_m_bond
Building a reputation

@amirnetop if you're able to use C# (.NET) for your work, our free-to-use (MIT license), open source Meraki.Api nuget package has rate limit handling built in.  It respects the back-off message and tries again later.  This means that the developer does not have to worry about rate limiting while developing:

 

https://www.nuget.org/packages/Meraki.Api/ 

 

David

Author, https://www.nuget.org/packages/Meraki.Api/
Get notified when there are additional replies to this discussion.