Karthikraj
Karthikraj

Reputation: 7

configure sidekiq queues to display in descending order

We have list of queues in our sidekiq dashboard , Is there any way to configure the queue to be displayed in descending order if the queue size get increased .

Say for example , I have 100 sidekiq queues listed in the dashboard , if one of the queues ,say 70 th queue size got increased (obviously queue will be in the middle of the dashboard).

So the 70 the queue must be displayed on top of the page by own ( i.e.,queues must be displayed in descending order based on the queue size) ,so that it could be helpful for monitoring . Is there anyway to configure in this way ?Please assist on this.

Upvotes: 0

Views: 225

Answers (1)

Mike Perham
Mike Perham

Reputation: 22208

There's a couple things to understand here:

  1. I don't recommend having more than a dozen queues per Sidekiq process. If you have a single process checking 100 queues, that's not a good idea.
  2. The default behavior is to sort queues by name. This makes it easy for you to know where to expect each queue to be in the table. If it was sorted based on size, the queues would effectively be in random order much of the time. While I understand your requirement, I'm not sure if it's better or worse than the current behavior.

If you had fewer queues, you'll see better performance (lower latency) and your queues page would be easier to scan visually. That's what I would recommend doing.

Lastly, monitoring queues manually is painful. Set up an automated health check by monitoring queue latency which will alert you when there is a problem.

Upvotes: 1

Related Questions