Are Middlewares a good point to add rate limiting ?
Unanswered
Pacific saury posted this in #help-forum
Pacific sauryOP
I want to rate limit specifc route handlers, is it correct to do this in middleware and match the routes and add the rate limiting ?
4 Replies
American Crow
yes it is. Here is an example using upstash
https://upstash.com/blog/edge-rate-limiting
https://upstash.com/blog/edge-rate-limiting
Pacific sauryOP
@American Crow one small question, can I use the upstash pacakges with a redis instance which is not on upstash ?
@Pacific saury <@240974567730970625> one small question, can I use the upstash pacakges with a redis instance which is not on upstash ?
American Crow
Don't know that, never tried, sorry
@Pacific saury <@240974567730970625> one small question, can I use the upstash pacakges with a redis instance which is not on upstash ?
it is not gonna work in middleware if you use redis client from node