Cloud Code and Request limits

35 views
Skip to first unread message

Ryan

unread,
May 15, 2019, 9:21:50 PM5/15/19
to Back4App
I've read the FAQ's about what constitutes a API Request in terms of requests/second and requests/month, but I'm curious about some of the specifics.

One case is Cloud Code. Do queries or other API requests made in Cloud Functions count against my request limits, as well as the call to the Cloud function?

For example:
Query A returns 75 objects, and Query B returns 50 objects.

If a client calls Query A and then Query B, that's 2 API requests, right?

If a client calls Cloud Function X, which in turn calls Query A and Query B, does that count as 3 API requests?

Thanks for the clarification.

Ricardo Paiva

unread,
May 16, 2019, 10:10:29 AM5/16/19
to Ryan, Back4App
Hi Ryan,

Access to a cloud code functions counts only one request.

If a client calls Query A and then Query B, that's 2 API requests, right?
YES!

If a client calls Cloud Function X, which in turn calls Query A and Query B, does that count as 3 API requests?
NO, only one. But we have a 60s timeout for requests, so, be careful with performance.

Regards,

  name     : “Ricardo Paiva", 
  company  : “Back4app, Inc.", 
  twitter  : “@back4app", 
  web      : [“www.back4app.com"] 


--
You received this message because you are subscribed to the Google Groups "Back4App" group.
To unsubscribe from this group and stop receiving emails from it, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/32503d56-6bec-4518-ac96-39c3f0617166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan

unread,
May 16, 2019, 10:29:51 AM5/16/19
to Back4App
Thanks Ricardo! Very interesting. So here's a small followup:

Do all the queries in a Cloud Job also not count toward the request limit?



On Thursday, May 16, 2019 at 10:10:29 AM UTC-4, Ricardo Paiva wrote:
Hi Ryan,

Access to a cloud code functions counts only one request.

If a client calls Query A and then Query B, that's 2 API requests, right?
YES!

If a client calls Cloud Function X, which in turn calls Query A and Query B, does that count as 3 API requests?
NO, only one. But we have a 60s timeout for requests, so, be careful with performance.

Regards,

  name     : “Ricardo Paiva", 
  company  : “Back4app, Inc.", 
  twitter  : “@back4app", 
  web      : [“www.back4app.com"] 


Em qua, 15 de mai de 2019 às 22:21, Ryan <dirt...@gmail.com> escreveu:
I've read the FAQ's about what constitutes a API Request in terms of requests/second and requests/month, but I'm curious about some of the specifics.

One case is Cloud Code. Do queries or other API requests made in Cloud Functions count against my request limits, as well as the call to the Cloud function?

For example:
Query A returns 75 objects, and Query B returns 50 objects.

If a client calls Query A and then Query B, that's 2 API requests, right?

If a client calls Cloud Function X, which in turn calls Query A and Query B, does that count as 3 API requests?

Thanks for the clarification.

--
You received this message because you are subscribed to the Google Groups "Back4App" group.
To unsubscribe from this group and stop receiving emails from it, send an email to back...@googlegroups.com.

Ricardo Paiva

unread,
May 16, 2019, 2:02:28 PM5/16/19
to Ryan, Back4App
Ryan,

Each job execution counts 1 request.
To unsubscribe from this group and stop receiving emails from it, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/8edbf3f9-e95e-4caa-9995-dd6a9d434380%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages