OptimalBits / bull

Premium Queue package for handling distributed jobs and messages in NodeJS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

queue rate limit to Transactions Per Minute (TPM)

sibelius opened this issue · comments

This is not a bug, more an issue to understand how the queue rate limit works in practice

I have a queue like this

RATE_LIMITED: new Queue('RATE_LIMITED', config.REDIS_HOST, {
    defaultJobOptions,
    settings,
    limiter: {
      max: 50, // 50 transactions at most
      duration: 10000, // every 10 seconds
    },
  }),

setting this rate limit config is giving me 250/280 TPM in production

how do you convert TPM to rate limiter config?

can you also expand on bounceBack?

if the rate limit is hit when adding a new job, this new job will go directly to delayed instead of waiting?

what happens if we change the queue rate limit and make a new release ?

the new rate limit is applied to current jobs or new jobs? what about delayed jobs?