alykoshin / express-queue

Express middleware to limit a number of simultaneously processing requests using queue
MIT License
45 stars 12 forks source link

Question - Multiple route level limits. #10

Open martyymc opened 2 years ago

martyymc commented 2 years ago

Hello,

If I set up limits on 2 or more individual routes will they each have their own queue or will they all share one queue?

So if I have:

app.use('/products', queue({ activeLimit: 1 }) ); app.use('/services', queue({ activeLimit: 100 }) );

If I make one request to /products that takes 5secs to complete - will users be blocked from /services during that time?

maxaug999 commented 7 months ago

Any update ?

It would seems as mentioned on other thread: "It should not used globally in this way, but as a per route middleware."