Webhook rate -- 1 request / 6 seconds?

Hi, I am learning to send data from Photon to AWS using webhook. Currently the connection is good, but it will show me “{“data”:“Rate limit exceeded, please wait and try again”,“ttl”:“60”,“published_at”:“2016-04-16T18:48:00.923Z”,“coreid”:“particle-internal”,“name”:“hook-error/test/0”}” if the delay for each publish loop is less than 6 seconds. 6 seconds for a single insertion to the AWS DB is too long for me. Also I see some other examples doing a webhook request per 0.1 second.

Is this webhook rate (1 request/ 6 seconds) normal? How can I improve this?

Thanks!

Taking a look at the docs never hurts…
https://docs.particle.io/guide/tools-and-features/webhooks/#limits
Could you show us the example where they do it at 0.1s?

Thank you! I see the reason now…


I read this post again, it’s not doing per 0.1s. But still much more frequent than 6s?

There might be another limit involved that slows down your speed of triggering the webhook

https://docs.particle.io/reference/firmware/photon/#particle-publish-

Especially if you once hit the limit, you have to remain silent for four seconds to recover.

From the link you posted:
“After one full minute of looping, the total is sent to my AWS API Gateway via the Particle webhook functionality.”

I’d also suspect a possible issue in the project code there in this section

    //The button's have been triggered! Record this!
    if ((b.buttonOn(2) and b.buttonOn(4)) or (b.buttonOn(1) and b.buttonOn(3))) {
        b.ledOn(3, 0, 255, 0); // Green
        b.ledOn(9, 0, 255, 0); // Green
        
        Particle.publish("sendSleep", "True", 60, PRIVATE);
        delay(500);
    }
    ...
    delay(100);

If you keep the buttons pressed long enough the creator will also run into the rate limit, since the average publishing rate will be 1.667 per second.

A user by default may trigger a webook up to 10 times per minute for every device that is registered to their account.

Does that mean each device has a limit of 10 times per minute?
ex. 10 devices can each trigger a webhook 10 times per minute = 100 triggers per minute

Or, does that mean each user has a limit of 10 times per minute for every device?
ex. 10 devices registered, but 1 device triggers a webhook 100 times per minute = 100 triggers per minute