upstash / ratelimit-js

Rate limiting library for serverless runtimes
https://ratelimit-with-vercel-kv.vercel.app
MIT License
1.66k stars 33 forks source link

QStash integration #42

Closed guy-borderless closed 8 months ago

guy-borderless commented 1 year ago

It would be cool if I could associate rate limits to endpoints in the qstash UI and not have to change my code

chronark commented 1 year ago

Can you share a bit more how you would like to use this? Like what would it look like from a user perspective and what problem does it solve?

guy-borderless commented 1 year ago

My worker encapsulates a resource that has a throttling constraint and concurrency constraint (which changes every once in a while). Multiple endpoints send this worker messages. Since everything runs through your queue(👌) it would be nice if I could just attach the rate/concurrency limits to the endpoint and have the queue take care of delivering messages according to the throttling & concurrency constraints. This saves me

  1. writing some infra code and
  2. delivering failed responses due to an expected scenario
chronark commented 1 year ago

Ah ok, so you want per endpoint ratelimiting in qstash and it's not really related to @upstash/ratelimit, right?

guy-borderless commented 1 year ago

I'll use @upstash/ratelimit didn't find a better repo

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 8 months ago

This issue was closed because it has been stalled for 30 days with no activity.