I was not able to find any resources about this, hence wanted to ask if it is a good idea / necessary to add throttling to callable https cloud functions in firebase on per user basis?
Example, I want to limit one user to be only able to call https function every 5 seconds.
If it is a viable thing to do, how would it be acheived?
There is not any inbuilt per user throttling capabilities in cloud functions. You have a few options of doing your own:
Issue here is that if someone is trying to game you this wouldn't be 100% effective as they could use multiple windows, etc.
Issue here is you are still having the triggers of your functions incurring the costs.
This a heavy weight solution with an increased cost and so wouldn't do it unless necessary
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With