Closed L-Mario564 closed 3 months ago
Did some research about it, most sources state that it can be done with Redis instance. Upstash provides both Redis and API for rate limiting, so we can easily implement it with these two.
It comes with free plan with daily limit of 10k commands, but if we will encounter traffic increase in the future, we can opt-in for paid plan of (very generous imo) 0.02$ per 100k commands
Using Upstash in prod sounds like a good option. For development, you think we can install Redis locally and use that? (I assume yes but asking just in case).
Also, do you want to work on a PR for this issue @ArtemOsuskyi?
I'll look into it a bit further, but I guess it anyway requires an Upstash API key to use it.
Also yeah I'm down to work on it
Why?
To lessen the amount of data transferred and processed if any tRPC procedure or API route is abused.
How?
Haven't looked much into this myself, suggestions are welcome.