Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ rate based trigger (Published/sec.) #1643

Closed
rwkarg opened this issue Mar 1, 2021 · 3 comments · Fixed by #1653
Closed

RabbitMQ rate based trigger (Published/sec.) #1643

rwkarg opened this issue Mar 1, 2021 · 3 comments · Fixed by #1653
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@rwkarg
Copy link
Contributor

rwkarg commented Mar 1, 2021

Proposal

Add a trigger based on the Published/sec. metric on a queue.

Use-Case

We have a workload that has a Publishing rate that varies between 1k and 3k/sec. When we are keeping up with the throughput, the Ready count on the queue is 0 regardless of the Publishing rate. Even using the Unacked count, that stay around a few hundred, independent of the Publishing rate. While handling 3k/sec. requires three times the instances as 1k/sec., the metrics I can choose now look identical. I have to wait for scaling to reach min. instances (since Ready == 0), then wait for a backlog to build up (since we're running too few instances to keep up), then have the instances scale up to something (since Ready > 0 now) and keep scaling up until we're at a high enough instance count to work through the backlog, reach Ready == 0 again and scale back down to min. instances.

This keeps bouncing between min. instances and some scaled up count over and over again.

I would expect to be able to configure two triggers

  • X messages/sec. per instance to scale against the Published/sec. rate on the queue (to handle the steady-state happy path)
  • Y backlog (Ready/Unacked backlog) per instance (to handle cases where a dependency slowed or stopped processing for a while or otherwise failed to keep up)
@rwkarg rwkarg added feature-request All issues for new features that have not been committed to needs-discussion labels Mar 1, 2021
@rwkarg
Copy link
Contributor Author

rwkarg commented Mar 2, 2021

I can take a look at this.

@rwkarg
Copy link
Contributor Author

rwkarg commented Mar 2, 2021

Draft PR here: #1648

I appear to be having issues connecting to the http API over https so that's holding up verifying this locally.

@zroubalik
Copy link
Member

Makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants