firebase-functions-rate-limiter icon indicating copy to clipboard operation
firebase-functions-rate-limiter copied to clipboard

Does the limiter affect firebase reads/writes?

Open purpleh00d opened this issue 4 years ago • 2 comments

The problem with firebase as you might know is that there's really no way to stop users from abusing your db by spamming functions calls. Even if you do stop them, the fact that they still call them might result in a huge bill anyway, which is what really scares me and can put any business out.

So basically, my question is: do I have to be careful about billing anyway, even if I use this limiter?

Also... if I choose Firestore to save that data limit, then there will be a limit of 1 Mb per document, will it be handled by this library or by ourself ?

Thanks

purpleh00d avatar Jan 12 '21 22:01 purpleh00d

its $0.06/100K read after 50K free daily for Firestore. $0.40/1M invocations after 2M free monthly. So if you do you math right, spammers will pay more electriciry bill than your google bill. Let them.

oguzeray avatar Apr 12 '21 22:04 oguzeray

There are two backends: Realtime Database and Firestore. If you are concerned with costs use the Firestore one. It is optimized for low write count :)

Jblew avatar Jun 13 '22 18:06 Jblew