How rate limit of the request method works?

Hi,

Currently, We are creating 49 one-time schedulers after 5 mins with 10 secs delay.
So assume if the current time is 12:00:00 then our first scheduler will execute at 12:05:00 and the second one at 12:05:10 then the third at 12:05:20 and so on.

In one scheduler, we are first fetching 20 records from one platform using get request. After that, we are checking if any ticket is created with that record or not so we are calling the Freshservice tickets filter API for checking. After that, we will create or update tickets based on that.

So for all this, we are calling approx 22 requests in one scheduler and in one minute it will be 132 requests but we are not getting any rate limit issue despite it being higher than 50 requests.

We have also checked this result after uploading the app as a custom app.

So my question is how does this rate limit works on a minute basis and why we are not getting rate limit error?

Hey @Raj_Purohit,

Welcome to our Freshworks Developer Community. :tada:

I want to confirm if you are using the request method for all the API invocations.

The request rate limit is a platform limit where an app can make only 50 Requests in one minute. It could be any HTTP API request invoked by the request method.

Well, if I understand it correctly based on your use case -

  • 1 request get to fetch 20 records (200ms).
  • 20 requests to check if the ticket exists (considering 500ms response time for each, 10s in total).
  • 20 requests to create/update the ticket (based on the response from Filter API and also considering 200ms response time for each, 4s in total).

So in one scheduled execution, these 41 requests would be invoked and the execution would be within 20s (~15s to 16s) as each scheduled execution would have a timeout of 20s. And the same with 6 scheduled executions in 1 min, it would be 246 requests which would have breached the request rate limit.

Can you confirm if all the scheduled executions are executing at the scheduled times? And also the above understanding of mine is correct.

I will also DM you to get some app info.

Thanks!

Hello @zach_jones_noel ,

Thanks for your reply.

Yes, All the schedulers are executing at the scheduled time.

For this point,
20 requests to check if the ticket exists (considering 500ms response time for each, 10s in total).

We are not calling 20 requests for 20 records instead of we are calling only one Freshservice ticket filter API with a query that has 20 IDs with or condition

Understood and hence 22 API invocations. Thanks for confirming. Let me look into the logs and get back to you.