Function call rate limitation

Hi there,

I’m using JS to call functions to pass information to the cloud. We noticed that there are a lot of failed transmissions when trying to send consecutive function calls, and therefore we added a delay between each call to prevent that (200 ms). However, the delay prevents us from achieving the speed we require. Is there a way to send a lot of function calls with rapid succession without failures? Or is there a rate limiting on the number of function calls from the cloud to the P1?


I’m not aware of rate limits, but 5 function calls per second is already quite a lot. To stay a good ‘netizen’ something along the lines of once per second is generally kept as a rule of thumb.
What are you trying to do that requires a frequency that high?
Have you considered the latency of going through the cloud? Depending on where you’re located, there might be physical limits as to how fast you can go. You might want to look into a direct connection.

@tnyqu, have you considered using Particle.variable() instead to make your data available? How fast are you trying to poll/call the Particle.function()?

We are trying to drive 384 calls as soon as possible to transmit data to the Particle, preferably under 10s. Right now, calling 5 times a second drives it in 60s. Does Particle.variable transmit from the Cloud to the Particle?

I am currently looking up UDP and TCP, but are those options available through the cloud? Are they any faster?

@tnyqu, variables are polled whereas functions are called. Based on 384 calls in 10 seconds, that is 1 call each 26ms. What is the amount of data (bytes) being sent on each call? I don’t believe you will be able to poll a variable at that rate.

UDP and TCP do not go through the cloud. However, they are also not encrypted at this time. Using TCP is very fast when connecting to a server on a local network. It is fast over the internet but subject to any delays caused by the internet.