vasanthv / jsonbox

HTTP-based JSON storage.
https://jsonbox.io
MIT License
2.49k stars 173 forks source link

Document rate-limiting POST requests #54

Closed jsejcksn closed 4 years ago

jsejcksn commented 4 years ago

From:

https://github.com/vasanthv/jsonbox/blob/6781bd24a2e292fe3ea2cd33c76a52d99f801b99/src/routes.js#L17-L18

jsejcksn commented 4 years ago

@vasanthv Just curious: Was this an arbitrary value or does it align with some quota calculation? I noticed it's reduced by 75% from the examples in express-rate-limit, which were 100 per 15 min.

vasanthv commented 4 years ago

@jsejcksn Yes it's just an arbitrary number. I don't have any logic behind it. My main intention is that it should be around 1/minute.

jsejcksn commented 4 years ago

Thanks for sharing. I was wondering if you thought about situations where there are lots of devices behind a single IP (like a classroom), and that there will be short bursts of rapid activity for an hour or so during the class, but very little activity at other times in a 24-hour period.

vasanthv commented 4 years ago

I see your case, but jsonbox isn't for all use cases. They could use it as long they stick within limits for creating records. As you know, read & update isn't rate limited.